MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

Problem with method setValue in google places.

Open JordiGiros opened this issue 6 years ago • 5 comments

Some pages that use google places in their inputs delete their values when losing focus from the element. When the setValue method is called, his behaviour makes the input lose the focus and the place can't be selected because the value typed is lost. That makes some test to crash.

The problem seems to be related to the "Prevent firing the "change" event twice" problem. Some time ago, the method used a TAB added after the value that was making the problem happen too. It was solved https://github.com/minkphp/MinkSelenium2Driver/pull/244 deleting the TAB but then the problem returned with https://github.com/minkphp/MinkSelenium2Driver/pull/286.

After reading lots of problems related with this two behaviours of setValue method (causing problems in each type of solutions), why can a parameter be passed to the method in order to use it with or without losing focus?

Is there any alternative to set the value without losing the focus from input? Thank you.

JordiGiros avatar Oct 17 '18 08:10 JordiGiros

If we only type in the field without moving the focus away, there is no change event in the browser. That's why setValue moves the focus away.

stof avatar Oct 17 '18 08:10 stof

https://www.hoppa.com/ie -> Drop off location has a clear example of what I'm telling. I can find this problem in some other Ryanair.com or Suntransfers booking process inputs. So there is no way (or I didn't find it) to set this input.

JordiGiros avatar Oct 17 '18 08:10 JordiGiros

www.suntransfers.com -> Booking process step 3 Drop-off point have the same problem.

JordiGiros avatar Oct 17 '18 08:10 JordiGiros

https://www.airbnb.com/ -> Search "To" also closes the dropdown from google places but does not delete the value from the input. You have to "refocus" the search input field.

JordiGiros avatar Oct 17 '18 09:10 JordiGiros

This issue seems to be duplicated with 292

JordiGiros avatar Oct 17 '18 12:10 JordiGiros