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

Selenium failing to realize when page loads at "And I click 'btnG' button and wait" #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alanjds
Copy link

@alanjds alanjds commented Feb 23, 2011

To start with pyccuracy I made the examples on manual, but they are not working because Selenium is failing to realize when a page was loaded after a "And I click 'btnG' button and wait" on the following example:

As a Google User
I want to search Google
So that I can test Pyccuracy

Scenario 1 - Searching for Hello World
Given
    I go to "http://www.google.com"
When
    I fill "q" textbox with "Hello World"
    And I click "btnG" button and wait   <-- FAILED - The action wait for page to load timed out after waiting for 30000 ms.
Then
    I see "Hello World - Pesquisa Google" title

I am using selenium-server.jar from pyccuracy/lib folder, and Firefox version 3.6.13 (Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13) from package firefox-mozilla-build of Ubuntu 10.10

I tested against Pyccuracy github:c98c1976ebfa99bad61e and patched it with a dirty workarround, so fell free to change it, but I'll be glad if you can confirm this bug and then point me what is wrong or a working version.

Thanks, Alan.
(and thanks more for bringing Cucumber to the snakes)

- I'm considering 5 seconds enough because more than it cold lead to users closing the page anyway...
- Is not a pretty workarround, but is the one I can think now. It is selenium's fault at all.
@heynemann
Copy link
Owner

Your solution to it is odd. It shouldn't make any difference waiting for 5 or 30 seconds... Did you try this again?

@alanjds
Copy link
Author

alanjds commented Mar 11, 2011

I know how strange it is :/ . The point is that, if Selenium realize that a page load occurred, it stops the counter and goes on. But if Selenium did not realize it, than I will need to wait 30 seconds for nothing at all of "and wait" on my test.

So, 5 seconds is (for me) a reasonable time because if some user needs to wait more than it the user will quit from my page almost for sure.

When you really need to wait more time, there can be an (not implemented yet) option to say: "And I click 'btnG' button and wait FOR 30 SECONDS"

The Right Thing(tm) should be fixing the bug at Selenium side, but I really have no idea on how to do that.

By the way, can you confirm this bug? If so, maybe we can file a bug at Selenium tracker.

@wladston
Copy link

I can confirm this problem. The sample test isn't working for me for the same reason.

@wladston
Copy link

You guys should change the sample On the main page. Check this out :

http://stackoverflow.com/questions/3652235/selenium-rc-waitforpagetoload-hangs

Poderia ser assim :

When
    I fill "q" textbox with "Hello World"
    And I click "btnG" button
    I wait for 2 seconds

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

Successfully merging this pull request may close these issues.

3 participants