giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
601 stars 270 forks source link

PHPUnit_Extensions_Selenium2TestCase_WebDriverException: sendKeysToActiveElement #420

Closed Alex9179 closed 4 years ago

Alex9179 commented 6 years ago

Hi,

I've been using Selenium2 for a couple of years now and always with $this->keys('some text '); after clicking on an element, which worked fine. Recently however (without changing my use of keys()), this has thrown the exception in the title, is there any reason for this?

I thought it may have been as I was using a fairly dated set up, but now I've updated everything across the board and now run with the following:

I've come to the conclusion that it's no longer any of my versions, as the session is stared correctly and gets as far as clicking on the element I wish to use, but gets no further.

Thanks

VD17593 commented 6 years ago

I've had a similar problem.

Also used Selenium2 for years, in a dated configuration. Updated to:

In previous configurations I used FireFox for testing. But I didn't got the new configuration running with FireFox 57.0.3 (64-bit) and the most recent geckodriver.

However got it running with Crome 63.0 and the chromedriver.

Alex9179 commented 6 years ago

And the keys() method worked? I can get it working with my new setup and written small tests to open pages and pick out elements to make sure the setup works, which is fine, it's just throwing the mentioned Exception when I try and send keys, which is a major issue as it means I cannot even log in to my system to test it!

I've tried using chrome, but just get a "Session not created exception"

VD17593 commented 6 years ago

Everything works fine in the configuration I'm using with Chrome.

I'm still searching how to get it working with FireFox.

Alex9179 commented 6 years ago

Yeah I've got it working for Chrome now, so will carry on with that, hopefully Firefox will be fixed soon!

K-Deep commented 6 years ago

I've had a similar problem.

keys() is working perfectly fine with chrome, IE but not for Firefox. I have tried almost all of the 3.x selenium version but no luck. Is this with php binding or selenium or gecko side. Any workaround ?

K-Deep commented 6 years ago

I have further verified this with below versions and not working for any of these.

Selenium 3.4.0 + Firefox 49 + geckodriverv0.13.0, geckodriverv0.14.0, geckodriverv0.15.0 Selenium 3.4.0 + Firefox 52 + geckodriverv0.13.0, geckodriverv0.14.0, geckodriverv0.15.0 Selenium 3.8.1 + Firefox 52 + geckodriverv0.16.0, geckodriverv0.18.0, geckodriverv0.19.0, geckodriverv0.20.0 Selenium 3.8.1 + Firefox 56 + geckodriverv0.16.0, geckodriverv0.18.0, geckodriverv0.19.0, geckodriverv0.20.0 Selenium 3.8.1 + Firefox 58 + geckodriverv0.16.0, geckodriverv0.18.0, geckodriverv0.19.0, geckodriverv0.20.0

However it is working fine with Selenium 2.53 + Firefox 48. I am using phpunit-selenium version 3.0.3 .

K-Deep commented 6 years ago

@Alex9179 @VD17593 any luck with firefox ?

Alex9179 commented 6 years ago

Gave up on Firefox in the end, turned to Chrome and now use selenium 4 with chromedriver. Still hit the occassional issue with compatability though!

K-Deep commented 6 years ago

@giorgiosironi @sebastianbergmann Can you please provide any thoughts/ideas to work keys function with latest firefox. If this is known issue , are we planning for any fixes ? I am really blocked due to this :(

sebastianbergmann commented 6 years ago

Please do not "ping" me on anything related to this component, thanks.