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 upWebElement.click does not work properly with goog.ui.Select #1856
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
titusfortner
Mar 22, 2016
Member
Firefox clicking has been updated since 2.48, try with the latest version of Selenium - 2.53.
|
Firefox clicking has been updated since 2.48, try with the latest version of Selenium - 2.53. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 22, 2016
@titusfortner I've tried lot's of times with different versions
the last one which I used was 2.53.1
Problem was firstly introduced in 2.48 and it presents in all versions which were released after it.
drobota
commented
Mar 22, 2016
|
@titusfortner I've tried lot's of times with different versions |
drobota
changed the title from
Webelemet.click does not work properly with goog.ui.Select
to
WebElement.click does not work properly with goog.ui.Select
Mar 22, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 22, 2016
Member
I'm pretty sure it is some timing issue (e.g. JS not yet initialized), because I can reproduce the problem using you test case locally, but if I add import time; time.sleep(1) before locating best_movie_select it starts to pass. I'm not sure how changes of Firefox click behavior that were introduced in 2.48 relate to this though.
Closing this as not a Selenium issue.
|
I'm pretty sure it is some timing issue (e.g. JS not yet initialized), because I can reproduce the problem using you test case locally, but if I add Closing this as not a Selenium issue. |
p0deje
closed this
Mar 22, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 22, 2016
@p0deje That is definitely selenium issue because it works well in other browsers with different versions of selenium even selenium 2.47 works well with firefox. The problem appears only in selenium 2.48+ and only for Firefox
drobota
commented
Mar 22, 2016
|
@p0deje That is definitely selenium issue because it works well in other browsers with different versions of selenium even selenium 2.47 works well with firefox. The problem appears only in selenium 2.48+ and only for Firefox |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 22, 2016
Member
Different browsers have different implementations, some drivers/browsers might be faster that others, so it can lead to potential race condition (not saying that's exactly this case). Significant changes in Selenium 2.48 may also do.
PS. I have this problem only during test execution when I try to repro this from python cli it always works
This also mans that you're hitting race condition.
|
Different browsers have different implementations, some drivers/browsers might be faster that others, so it can lead to potential race condition (not saying that's exactly this case). Significant changes in Selenium 2.48 may also do.
This also mans that you're hitting race condition. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 22, 2016
Using sleep not the best solution whenever in my cases it won't work 100% in all cases. I have tried out lots of different workaround and no one worked for me well. That is real pain in the ass as we heavily use this component.
drobota
commented
Mar 22, 2016
|
Using sleep not the best solution whenever in my cases it won't work 100% in all cases. I have tried out lots of different workaround and no one worked for me well. That is real pain in the ass as we heavily use this component. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 22, 2016
Member
I'm not suggesting to use sleep, I was just demonstrating that you are facing race condition, which has probably always been there but until 2.48 it was not a problem.
I understand that it's painful, but it has to be handled in client code, not Selenium. If you just want to make the code more reliable without going deeper and trying to understand what causes the issue, you can just click in the loop until select is opened.
|
I'm not suggesting to use sleep, I was just demonstrating that you are facing race condition, which has probably always been there but until 2.48 it was not a problem. I understand that it's painful, but it has to be handled in client code, not Selenium. If you just want to make the code more reliable without going deeper and trying to understand what causes the issue, you can just click in the loop until select is opened. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 22, 2016
Select always opens and menu-item is being clicked the problem that these actions do not have any affect. I would still insist that it is selenium issue because there is a clear repro case which proves that problem comes from selenium. Because when use firefox 41 and selenium 2.47.3 - test passes. However when update version to 2.48 test fails nevertheless with chrome, safari or ie test passes despite on selenium version.
drobota
commented
Mar 22, 2016
|
Select always opens and menu-item is being clicked the problem that these actions do not have any affect. I would still insist that it is selenium issue because there is a clear repro case which proves that problem comes from selenium. Because when use firefox 41 and selenium 2.47.3 - test passes. However when update version to 2.48 test fails nevertheless with chrome, safari or ie test passes despite on selenium version. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 22, 2016
Member
My bad, I now see that sometimes goog.ui doesn't see action event triggered or FirefoxDriver doesn't trigger it somehow, so I'm reopening this issue and will investigate more.
Sorry for misunderstanding!
|
My bad, I now see that sometimes Sorry for misunderstanding! |
p0deje
reopened this
Mar 22, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pumano
Mar 24, 2016
#1867 if you mean html select element problem checkout my workaround, maybe it helps you.
pumano
commented
Mar 24, 2016
|
#1867 if you mean html select element problem checkout my workaround, maybe it helps you. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
commented
Mar 24, 2016
|
@punamo That was first what I tried to do but this approach do not work for me |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 25, 2016
Member
For the record, I'm trying to nail down this issue and it looked like a bug in atoms, but the test I have created passes and works fine. Will keep debugging.
|
For the record, I'm trying to nail down this issue and it looked like a bug in atoms, but the test I have created passes and works fine. Will keep debugging. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 29, 2016
Member
This is some really weird behavior which only happens when browser window is focused. Unfortunately, I still don't have that to tell you, but can you confirm the bug doesn't reproduce when different window is focused?
Also, Selenium is going to get rid of its own FirefoxDriver implementation in favor of Marionette. Can you try to use it instead (assuming you're already in Firefox 45)?
I will continue investigating the issue, but pretty sure it won't be resolved quick enough.
|
This is some really weird behavior which only happens when browser window is focused. Unfortunately, I still don't have that to tell you, but can you confirm the bug doesn't reproduce when different window is focused? Also, Selenium is going to get rid of its own FirefoxDriver implementation in favor of Marionette. Can you try to use it instead (assuming you're already in Firefox 45)? I will continue investigating the issue, but pretty sure it won't be resolved quick enough. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 29, 2016
@p0deje
Thanks for your replay
I did try to run tests in Mozilla Firefox 45.0 + selenium-2.53.1(python) and problem is still present
However I did not use 'marionette' capabilities, I will try it.
drobota
commented
Mar 29, 2016
|
@p0deje |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 29, 2016
Member
Were you running it using Marionette? It can be run both with and without it.
|
Were you running it using Marionette? It can be run both with and without it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 29, 2016
No I did not however I did run my example and it works! Hope it will work further. Thanks
drobota
commented
Mar 29, 2016
|
No I did not however I did run my example and it works! Hope it will work further. Thanks |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 30, 2016
Member
What do you mean "it works"? What have you done to make it work?
On Ср, 30 марта 2016 г. at 0:25, Dmitriy Robota notifications@github.com
wrote:
No I did not however I did run my example and it works! Hope it will work
further. Thanks—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1856 (comment)Alex
|
What do you mean "it works"? What have you done to make it work?
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
commented
Mar 30, 2016
|
I mean that test which I provided works If I use marrionete |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 30, 2016
Member
Cool. Would switching to Marionette in your test suite be a solution for you?
|
Cool. Would switching to Marionette in your test suite be a solution for you? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 30, 2016
I hope that it would work for me but it does not as marionette does not support all features and it does not work stable for instance simple set_window_size does not work properly(mozilla/geckodriver#56)
drobota
commented
Mar 30, 2016
|
I hope that it would work for me but it does not as marionette does not support all features and it does not work stable for instance simple set_window_size does not work properly(mozilla/geckodriver#56) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Mar 30, 2016
Member
Ok, I'll continue investigating the original issue.
Can you confirm that everything works fine when browser window is not
focused?
On Ср, 30 марта 2016 г. at 10:16, Dmitriy Robota notifications@github.com
wrote:
I hope that it would work for me but it does not as marionette does not
support all feature and it does not work stable for instance simple
set_window_size does not work properly(mozilla/geckodriver#56
mozilla/geckodriver#56)—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1856 (comment)Alex
|
Ok, I'll continue investigating the original issue. Can you confirm that everything works fine when browser window is not
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
drobota
Mar 30, 2016
Thanks for you effort.
Yeah. I can confirm this I think that is the reason why it does work when I test my code in cli.
drobota
commented
Mar 30, 2016
|
Thanks for you effort. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
gabecase
Apr 8, 2016
We are experiencing the same issue issue on the ruby web driver version 2.48+ with goog.ui.Select elements remaining un-selected after a click. We also are able to get our tests to work only when running them locally and clicking outside of our browser to remove focus, this is a huge blocking issue for us as we cant upgrade web driver until we resolve this. Marionette lacking some of the features we need could be an issue as well.
gabecase
commented
Apr 8, 2016
|
We are experiencing the same issue issue on the ruby web driver version 2.48+ with goog.ui.Select elements remaining un-selected after a click. We also are able to get our tests to work only when running them locally and clicking outside of our browser to remove focus, this is a huge blocking issue for us as we cant upgrade web driver until we resolve this. Marionette lacking some of the features we need could be an issue as well. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@AutomatedTester Do you have any clue about what can be wrong with it? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
gabecase
Apr 8, 2016
Here is the issue reproduced:
I added a sleep and a hover before we click to show the element is supposed to be selected but after it is clicked you notice the value does not change
(omitted gif but let me know if you want to see the test case get reproduced)
In web driver versions prior to 2.48 this would work with zero problems, no combination of additional waits and changing of selectors in the page object has worked, the only thing that has worked is clicking on a window outside of the browser to lose focus. I cant seem to find anything in the release notes for 2.48 that indicates any of the click behavior has changed.
gabecase
commented
Apr 8, 2016
•
|
Here is the issue reproduced: In web driver versions prior to 2.48 this would work with zero problems, no combination of additional waits and changing of selectors in the page object has worked, the only thing that has worked is clicking on a window outside of the browser to lose focus. I cant seem to find anything in the release notes for 2.48 that indicates any of the click behavior has changed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
p0deje
Apr 11, 2016
Member
Click behavior has been significantly changed in 2.48 and now is mostly happening using Firefox internal APIs. So far I've debugged the issue and it looks like a problem in Firefox itself (or APIs that Selenium use), not the Selenium. I'm not that familiar and after chatting with @barancev we thought that the best you guys could do about this issue is switch to Marionette because current FirefoxDriver won't be supported once Firefox 44esr support is eneded. After that, we're probably going to remove FirefoxDriver from Selenium code and everyone should be prepared to use Marionette by that time.
I'm still willing to fix the issue, but I've hit the wall trying to debug it.
|
Click behavior has been significantly changed in 2.48 and now is mostly happening using Firefox internal APIs. So far I've debugged the issue and it looks like a problem in Firefox itself (or APIs that Selenium use), not the Selenium. I'm not that familiar and after chatting with @barancev we thought that the best you guys could do about this issue is switch to Marionette because current FirefoxDriver won't be supported once Firefox 44esr support is eneded. After that, we're probably going to remove FirefoxDriver from Selenium code and everyone should be prepared to use Marionette by that time. I'm still willing to fix the issue, but I've hit the wall trying to debug it. |
drobota commentedMar 21, 2016
Meta
OS: Any
Selenium Version: 2.48 + (python)
Browser: Only firefox
Browser Version: 43,44,45
Expected Behavior
Menu item should be clicked
Actual Behavior
Click passes however nothing element remains unselected
Run my script and it will fail in combination of any firefox and selenium 2.48+
However it works in chrome, ie11
Moreover if use selenium 2.47.3 or lower and firefox it will work
PS. I have this problem only during test execution when I try to repro this from python cli it always works