Clicks outside the context menu are not dismissing the context menu
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(firefox95 wontfix, firefox96 wontfix, firefox97 affected)
People
(Reporter: rajapriya.jr, Unassigned)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Steps to reproduce:
I'm trying to simulate context-click action in the latest firefox (my version is Mozilla Firefox 95.0.1). So currently using the 'Actions' class from the python-based marionette driver for simulating the context-click.
Here is my test code to simulate context-click using pointer actions.
start
from marionette_driver.marionette import ActionSequence, Actions, Marionette
from marionette_driver.by import By
driver1 = Marionette()
driver1.start_session()
driver1.navigate("https://www.linkedin.com/")
element = driver1.find_element(By.LINK_TEXT, "Join now")
touchHandler = ActionSequence(driver1, "pointer", "mouse", {"pointerType":"mouse"})
touchHandler.pointer_move(0, 0, origin=element).pointer_down(button=2).pause(1500).pointer_up(button=2).perform()
touchHandler.pointer_move(10, 10, origin="viewport").pointer_down().pointer_up().pointer_down().pointer_up().perform()
end
Here, sending double clicks in order to
- quit the context menu first (button=2 indicates right-click, this triggers context-click on the particular element)
- then it will deselect the element.
Actual results:
The problem is element got deselected in my case but the context menu still exists.
Not sure why the menu is not quitting though the element is deselected.
Issue occurrence is 5/10 trials (not always)
Expected results:
The expected behavior is (in case the element is chosen for context-click),
- For the first left click, it should close the menu.
- Then the element must be deselected when sending 2nd left click.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Menus' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Reporter | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Hey Rajapriya,
Can you test the issue while in Safe Mode? You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode .
Also a fresh new profile could help. You can find more about creating a new profile here : https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems#w_6-create-a-new-firefox-profile .
If possible, you can test this issue on the nightly build as well. Download the build from : https://www.mozilla.org/en-US/firefox/nightly/all/ .
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
Hi Andrei,
Just to update: We use the below command to run the firefox with our profile.
firefox -marionette -safe-mode --profile /home/rar/.mozilla/firefox/mvl93j2z.owmc_port2828-1639568481032 --new-instance
And tested the issue in the ways you mentioned previously and we still observe the issue in these ways too.
- By running in safe mode
- By creating new profile and customized only the below setting.
dom.w3c_touch_events.enabled set to 1 (was 2) - In the nightly build
I need to know one thing first that is any config setting is required in simulating touch actions using pointer events. Because I referred some mozilla' test code to test context click action (test code can be found here - https://searchfox.org/mozilla-central/source/testing/web-platform/tests/pointerevents/pointerevent_contextmenu_is_a_pointerevent.html), verified the pointer events which we send are proper (If anything is wrong here, please correct me).
mozilla-central/testing/web-platform/tests/pointerevents/pointerevent_contextmenu_is_a_pointerevent.html
...
actions = actions.addPointer(testPointer, inputSource)
.pointerMove(0,0, {sourceName:testPointer, origin:target})
.pointerDown({sourceName:testPointer, button:actions.ButtonType.RIGHT})
.pause(inputSource === "touch" ? 1500 : 0, "pointer", {sourceName:testPointer})
.pointerUp({sourceName:testPointer, button:actions.ButtonType.RIGHT});
...
Also, observed some other issues with this action.
- context menu is not quitting (the current issue)
- sometimes menu will come and will quit immediately without getting any user option.
- sometimes element will only be selected but menu will not come.
Please comment.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Please don't set severity and priorities - those are meant to be set by the engineers investigating and fixing the bugs who can weigh this in context with other bugs within their component. Furthermore, this bug doesn't meet the criteria for neither P1 priority nor S1 severity.
Reporter | ||
Comment 5•3 years ago
|
||
I assume that it is possible to close the context menu by sending double left clicks, that's why we are sending double clicks once the context click is triggered. Please comment if it is wrong.
Do we have any other ways to close the context menu?
Comment 6•3 years ago
|
||
(In reply to Rajapriya Radhakrishnan from comment #5)
Do we have any other ways to close the context menu?
Maybe whimboo can help.
Comment 7•3 years ago
|
||
Note that the context menu is not part of the webdriver specification. It's a browser specific element, and as such not being part of any web page you are trying to automate.
The click is not closing the context menu because it is a native element. For details see bug 1702633, which I'm going to use and dupe this bug against.
If you still have to handle the context menu there is some code that exercises exactly what you want:
Reporter | ||
Comment 8•3 years ago
|
||
Reporter | ||
Comment 9•3 years ago
|
||
Reporter | ||
Comment 10•3 years ago
|
||
Hi Henrik,
Thanks for your updates. Now we are able to close the pop-up properly by calling the hidePopup.
As I already mentioned in the comment #3, we still have some other issues while the pop-up is shown.
-
sometimes pop-up will come but it is getting hidden abruptly without any user inputs. Please see the attached video - rightclick_popup_is_hidden_abruptly.mp4.
Occurrence - Random -
sometimes element will only be selected but pop-up wont come. Please check the video rightclick_popup_is_not_diplayed_intermittently.mp4, where I am sending right click action to 'Sign in' button, but pop-up is not coming.
Occurrence - Random
Please note, we trigger the right click action like below.
touchHandler = ActionSequence(driver1, "pointer", "mouse", {"pointerType":"mouse"})
touchHandler.pointer_move(0, 0, origin=element).pointer_down(button=2).pointer_up(button=2).perform()
Could you please check these too.
Reporter | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Please note that Bugzilla is a bug tracker and not a support site. If you have issues that you want to get clarification for please use our mailing list at https://groups.google.com/a/mozilla.org/g/dev-webdriver.
Also this bug was for closing the context menu and that means it's still a dupe of bug 1702633. Please do not reopen the bug again. Thanks.
Updated•2 years ago
|
Description
•