Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPerforming a click by sending a POST-request on /session/{id}/click doesn’t seem to work with standalone selenium server v3.6.0 #4786
Comments
p0deje
added
the
C-server
label
Sep 29, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Oct 1, 2017
Member
I'm not sure why it used to work correctly, but I see that you send the following payload:
{"button":1}Per JSON wire protocol, it means to click with mouse middle-button. I don't know if onclick should be triggered upon middle-mouse button click (Google tells it varies per browsers), but it is definitely triggered upon left button click.
I can reproduce the issue by using the following payload:
$ curl -X POST -d '{"button": 1}' http://127.0.0.1:4444/wd/hub/session/fe9e46282b3d9414a7cdb9b7d41a1cc3/click
{"sessionId":"fe9e46282b3d9414a7cdb9b7d41a1cc3","status":0,"value":null}
However, the issue doesn't reproduce when correct mouse button is used:
$ curl -X POST -d '{"button": 0}' http://127.0.0.1:4444/wd/hub/session/fe9e46282b3d9414a7cdb9b7d41a1cc3/click
{"sessionId":"fe9e46282b3d9414a7cdb9b7d41a1cc3","status":0,"value":null}
With that said, I guess the bindings (Parasol) needs to be changed to use correct mouse button.
I'm going to close this now as it looks be 3rd party problem, but feel free to comment here if I got it wrong and I'll re-open the issue.
|
I'm not sure why it used to work correctly, but I see that you send the following payload: {"button":1}Per JSON wire protocol, it means to click with mouse middle-button. I don't know if I can reproduce the issue by using the following payload:
However, the issue doesn't reproduce when correct mouse button is used:
With that said, I guess the bindings (Parasol) needs to be changed to use correct mouse button. I'm going to close this now as it looks be 3rd party problem, but feel free to comment here if I got it wrong and I'll re-open the issue. |
p0deje
closed this
Oct 1, 2017
pushed a commit
to SeasideSt/Parasol
that referenced
this issue
Oct 2, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rinzwind
Oct 2, 2017
Oops, sorry about that, totally didn't notice that the button number was wrong (though, oddly, the test did still give the expected result when using selenium server v3.4.0). It has been fixed now in Parasol.
Rinzwind
commented
Oct 2, 2017
|
Oops, sorry about that, totally didn't notice that the button number was wrong (though, oddly, the test did still give the expected result when using selenium server v3.4.0). It has been fixed now in Parasol. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Oct 2, 2017
Member
Since 3.5 server started to simply pass through all the requests to end driver without doing any intermediate conversions. I believe that is the reason - maybe at some point server was transforming the button number or doing something like that.
In any event, send left button is the correct way.
|
Since 3.5 server started to simply pass through all the requests to end driver without doing any intermediate conversions. I believe that is the reason - maybe at some point server was transforming the button number or doing something like that. In any event, send left button is the correct way. |
Rinzwind commentedSep 29, 2017
•
edited
Meta
OS: macOS 10.13
Selenium Version: selenium-server-standalone-3.6.0.jar
Browser: Chrome 61.0.3163.100
Description
Performing a click by sending a POST-request on
/session/{id}/clickdoesn't seem to work with selenium-server-standalone-3.6.0.jar although it does work withselenium-server-standalone-3.4.0.jar.
Details
Sample HTML:
With v3.6.0 I'm getting the following output for a simple test that performs a click and checks whether the page text changes to “Clicked!”. Note that, as can be seen on the last line, the text remains “Did not click yet”:
With v3.4.0 I’m getting the following output for the same test. In this case, the text did change (though this is not as obvious from the log):
I’m not quite sure whether this is a bug in selenium-server-standalone-3.6.0.jar, or whether there’s another problem. My apologies for not providing this as a more readily runnable scenario (though it is available as a test for the Beach Parasol framework).