You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over the past couple weeks I've been encountering several issues with the 'Select From List' keyword.
The latest issue with this keyword has been that it fails AFTER the keyword succeeds in selecting the value from the list element.
It returns: "StaleElementReferenceException: Message: u'Element is no longer attached to the DOM' "
Adding 'Wait Until Page Contains Element" before the keyword always passes.
Adding 'Wait Until Page Contains Element" also passes after running 'Run Keyword and Continue On Failure' on the 'Select From List' keyword.
I have also executed all of the same test cases ~200 times on several different websites with the original SeleniumLibrary without being able to replicate any of the issues, so I do not believe this is a problem with with the operation of the webpages I am running the tests on.
I have seen this error in other situations and it usually means that the DOM has changed. So in the case you described is it true that selecting an element from the list triggers some JavaScript call that changes the list or loads a new page or something like that?
What I've done as a solution to this problem in a framework I built that wraps s2l is catch the error an I'd it occurs re-execute the command. In my situation this is necessary because selecting an item from the drop down is changing the DOM.
Do you think such a solution will work in your case or do you have something else going on.
Over the past couple weeks I've been encountering several issues with the 'Select From List' keyword.
The latest issue with this keyword has been that it fails AFTER the keyword succeeds in selecting the value from the list element.
It returns: "StaleElementReferenceException: Message: u'Element is no longer attached to the DOM' "
Adding 'Wait Until Page Contains Element" before the keyword always passes.
Adding 'Wait Until Page Contains Element" also passes after running 'Run Keyword and Continue On Failure' on the 'Select From List' keyword.
I have also executed all of the same test cases ~200 times on several different websites with the original SeleniumLibrary without being able to replicate any of the issues, so I do not believe this is a problem with with the operation of the webpages I am running the tests on.
Any ideas?
—
Reply to this email directly or view it on GitHub.
Another option is to use the new implicit_wait functionality within
WebDriver and the Selenium2Library. Implicit_wait should handle minor
discrepancies with timing and AJAX calls. Does your 'Select From List'
keywords fail at the same point on every test run or are these failures
sporadic? Sporadic failures can be fixed by using the implicit_wait. See
There are trade-offs with using implicit_wait in terms of test run
length and some good test designs. Implicit_wait will check initially
if the operation was successful and return if it passes. But ion initial
failure will continue to poll up to either it suceeds or to the implicit
wait time if it fails. This is good in situations like yours where your
might be waiting for a page reload that takes an indeterminate or
variable amount of time (i.e. AJAX calls). But in other places where a
test operation fails and you didn't specifically tell robot framework to
move on if failure it could poll for the full wait time thinking it
might succeed. This could be an indication that there is an unforeseen
failure or an improper check. Just be aware that your test run timings
may change and you should review those changes.
Ed
On 09/10/2012 09:26 PM, Jeremy Johnson wrote:
I have seen this error in other situations and it usually means that
the DOM has changed. So in the case you described is it true that
selecting an element from the list triggers some JavaScript call that
changes the list or loads a new page or something like that?
What I've done as a solution to this problem in a framework I built
that wraps s2l is catch the error an I'd it occurs re-execute the
command. In my situation this is necessary because selecting an item
from the drop down is changing the DOM.
Do you think such a solution will work in your case or do you have
something else going on.
Over the past couple weeks I've been encountering several issues
with the 'Select From List' keyword.
The latest issue with this keyword has been that it fails AFTER the
keyword succeeds in selecting the value from the list element.
It returns: "StaleElementReferenceException: Message: u'Element is
no longer attached to the DOM' "
Adding 'Wait Until Page Contains Element" before the keyword always
passes.
Adding 'Wait Until Page Contains Element" also passes after running
'Run Keyword and Continue On Failure' on the 'Select From List' keyword.
I have also executed all of the same test cases ~200 times on
several different websites with the original SeleniumLibrary without
being able to replicate any of the issues, so I do not believe this is
a problem with with the operation of the webpages I am running the
tests on.
Any ideas?
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub #106 (comment).
Has anyone else found that 'Select From List' is slightly slow in chrome and horrifically slow in IE? It appears entirely dependent on the number of items in the list.
For example if there are 4 items in the list on IE it takes a few seconds which is acceptable... BUT when the list contains ~50 items it literally takes minutes.
Has anyone else encountered this issue or developed any faster work arounds?
yes it is horrible on IE.
have you seen this pull request which uses functionality built-in to Selenium for dealing with Select type elements. I haven't tried it but I think it will speed things up a lot.
This is a know issue. I believe there is a patch existing for it as well. I just. Red to review the patch and merge it in. I'll try to get to that today.
Has anyone else found that 'Select From List' is slightly slow in chrome and horrifically slow in IE? It appears entirely dependent on the number of items in the list.
For example if there are 4 items in the list on IE it takes a few seconds which is acceptable... BUT when the list contains ~50 items it literally takes minutes.
Has anyone else encountered this issue or developed any faster work arounds?
—
Reply to this email directly or view it on GitHub.
@know1nos@ombre42 Have either of you tried cherry picking out the 'Select From List' changes (see #68 - commits and tested within your situations? I'm interested in your results as I don't have any good test which do a lot of select calls, especially those made to a remote test server.
@ombre42: I think these changes are an improvement but I think there is still room for improvement with the select functionality. What I was trying in asking whether or not you had a chance to look was to help in deciding whether or we should cut a release or wait till we have more improvements.
@emanlove have not tried it but will try to get to it within the week, have lots of timing data to compare it to as well once I get around to it. I'll try remember to report back numbers for you if you're interested as well once I get to it. Have too many other projects on my plate right now though so I bumped up the processing power dedicated to the tests instead as a temporary fix.
I tried implicit_wait=5 but it did not do the magic in my case. I get around the problem by using keyword "Focus " to get the new element reference before selecting the option. That works for me.
Activity
j1z0 commentedon Sep 11, 2012
I have seen this error in other situations and it usually means that the DOM has changed. So in the case you described is it true that selecting an element from the list triggers some JavaScript call that changes the list or loads a new page or something like that?
What I've done as a solution to this problem in a framework I built that wraps s2l is catch the error an I'd it occurs re-execute the command. In my situation this is necessary because selecting an item from the drop down is changing the DOM.
Do you think such a solution will work in your case or do you have something else going on.
Cheers,
Jeremy
On Sep 10, 2012, at 23:37, know1nos notifications@github.com wrote:
emanlove commentedon Sep 11, 2012
Another option is to use the new implicit_wait functionality within
WebDriver and the Selenium2Library. Implicit_wait should handle minor
discrepancies with timing and AJAX calls. Does your 'Select From List'
keywords fail at the same point on every test run or are these failures
sporadic? Sporadic failures can be fixed by using the implicit_wait. See
http://rtomac.github.com/robotframework-selenium2library/doc/Selenium2Library.html#importing
http://rtomac.github.com/robotframework-selenium2library/doc/Selenium2Library.html#Set%20Selenium%20Implicit%20Wait
http://seleniumhq.org/docs/04_webdriver_advanced.html#explicit-and-implicit-waits
There are trade-offs with using implicit_wait in terms of test run
length and some good test designs. Implicit_wait will check initially
if the operation was successful and return if it passes. But ion initial
failure will continue to poll up to either it suceeds or to the implicit
wait time if it fails. This is good in situations like yours where your
might be waiting for a page reload that takes an indeterminate or
variable amount of time (i.e. AJAX calls). But in other places where a
test operation fails and you didn't specifically tell robot framework to
move on if failure it could poll for the full wait time thinking it
might succeed. This could be an indication that there is an unforeseen
failure or an improper check. Just be aware that your test run timings
may change and you should review those changes.
Ed
On 09/10/2012 09:26 PM, Jeremy Johnson wrote:
know1nos commentedon Sep 11, 2012
the implicit wait fixed everything, thank you all
know1nos commentedon Sep 12, 2012
Has anyone else found that 'Select From List' is slightly slow in chrome and horrifically slow in IE? It appears entirely dependent on the number of items in the list.
For example if there are 4 items in the list on IE it takes a few seconds which is acceptable... BUT when the list contains ~50 items it literally takes minutes.
Has anyone else encountered this issue or developed any faster work arounds?
ombre42 commentedon Sep 12, 2012
yes it is horrible on IE.
have you seen this pull request which uses functionality built-in to Selenium for dealing with Select type elements. I haven't tried it but I think it will speed things up a lot.
j1z0 commentedon Sep 12, 2012
This is a know issue. I believe there is a patch existing for it as well. I just. Red to review the patch and merge it in. I'll try to get to that today.
Cheers,
Jeremy
On Sep 12, 2012, at 23:08, know1nos notifications@github.com wrote:
emanlove commentedon Oct 1, 2012
@know1nos @ombre42 Have either of you tried cherry picking out the 'Select From List' changes (see #68 - commits and tested within your situations? I'm interested in your results as I don't have any good test which do a lot of select calls, especially those made to a remote test server.
ombre42 commentedon Oct 2, 2012
Sorry, I have not tried it out.
emanlove commentedon Oct 2, 2012
@ombre42: I think these changes are an improvement but I think there is still room for improvement with the select functionality. What I was trying in asking whether or not you had a chance to look was to help in deciding whether or we should cut a release or wait till we have more improvements.
know1nos commentedon Oct 10, 2012
@emanlove have not tried it but will try to get to it within the week, have lots of timing data to compare it to as well once I get around to it. I'll try remember to report back numbers for you if you're interested as well once I get to it. Have too many other projects on my plate right now though so I bumped up the processing power dedicated to the tests instead as a temporary fix.
emanlove commentedon Dec 11, 2012
'Select' keywords were updated under Selenium2Library version 1.1 and reliability should be improved.
juacompe commentedon Sep 27, 2014
I tried implicit_wait=5 but it did not do the magic in my case. I get around the problem by using keyword "Focus " to get the new element reference before selecting the option. That works for me.