-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overlappingCheckDisabled capability #314
Comments
the workaround, finding and clicking the button with "execute_script" doesnt work either because i get this error: Error while executing command: executeScriptGecko: Server returned error message Unrecognized command: POST /session/40c5c9fe-2ab0-4513-b6ce-5a20110fe735/execute/sync instead of data at /home/david/perl5/perlbrew/perls/perl-5.22.2/lib/site_perl/5.22.2/Selenium/Remote/Driver.pm line 327. |
It looks like that's a capability that you can express when you define your Also, unrelated, that error you got "unrecognized command" means you should either update your geckodriver & firefox to the latest, or downgrade your selenium to the previous version. Blergh, sorry about that, hmmmmm. |
Hey gempesaw, thanks for your feedback. I am using the newest geckodriver 0.16.1 and yes, it's firefox only but im fine with that. I can't seem to set the capability though or maybe i am using the wrong config format because I still get the same error message. my $driver = Selenium::Firefox->new(
marionette_enabled => 0,
binary => "/home/david/dev/EPPlication/geckodriver",
desired_capabilities => { overlappingCheckDisabled => 1 },
); on a sidenote, there seems to be a bug in the error handler with that particular error:
|
Oh boy, that awful patch in geckodriver to emulate chromedriver behaviour but that is hilariously wrong when negative margins are used on the element. What fun! Anyways, we've been disabling behaviour this for some time in our own code, I'll have to look up what we're doing; I'll paste it in here when I find it; but there might be something wrong here, as I do still have to click via javascript as a workaround in several tests. |
The thing I do most often to get around the broken overlap detection is to send the element the 'enter' key, as 99% of the time something that is clickable responds exactly the same to the enter key being sent to the element, and that hasn't yet been kneecapped. You can also try scroll hacks, usually some combination of scrolling the window and doing get_element_location_in_view just to force it to be scrolled where it is 'clickable' will work about 75% of the time to get rid of these problems. Probably the best way to help test authors in this module would be to have a 'method' option you can pass into click. I'd imagine it would accept parameters something like the following: Then folks could just 'give up and use the workaround' when they are pulling their hair out trying to figure out why something plainly visible when watching the test execute in firefox fails to send a click event to an element that is clearly visible on the page (and that if you click it in the same browser, doesn't fail). |
Make it so, @troglodyne |
Still need to add tests, current unit tests all pass though
In new geckodriver this is now the webdriverClick capability. To do this, you need but pass this to constructor:
I should probably add links to the docs as to what is supported by the drivers in that section of the POD to reduce confusion. |
I would like to pass an option "overlappingCheckDisabled" to the selenium driver as described here: SeleniumHQ/selenium#1202 (scroll all the way down)
but "overlappingCheckDisabled" doesnt show up in the available capabilities documented here: https://metacpan.org/pod/Selenium::Remote::Driver#new
The text was updated successfully, but these errors were encountered: