Skip to content
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

Back is returning before elements are accessible on a slowly loading page #1126

Open
JonasTaulien opened this issue Oct 11, 2017 · 0 comments

Comments

@JonasTaulien
Copy link

I must admit, I tried to read through the Navigation section, but could not find the exact reason for my problem. I have an idea but don't know exactly why. At first here is my problem:

I have a testscript in which I execute the following steps:

create a session
set implicitWait to 0
set pageLoadTimeout to 120 seconds
go to 'http://www.page-that-takes-long-to-load.com'
click on a link
wait until the url has changed
navigate back
assert that a specific element is present

The last steps fails, because the element could not be found. If i change the testscript to:

create a session
set implicitWait to 0
set pageLoadTimeout to 120 seconds
go to 'http://www.page-that-takes-long-to-load.com'
click on a link
wait until the url has changed
go to 'http://www.page-that-takes-long-to-load.com'   <-- Only this line has changed
assert that a specific element is present

The browser is able to locate the element.

I think the reason for the difference is, that the Go command waits for the navigation to complete and returns afterwards. But the Back command returns after the pageShow event was fired.
My assumption is, that the pageShow event gets fired before event A (When event A is the event that leads the wait for the navigation to complete-procedure to return).

Am I correct with that assumption?

If yes, would it be possible to add to the specification, that the remote should also wait for the navigation to complete before returning with success when executing a Back- or Forward-command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant