SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Selenium - unreliable tool? Waitforpagetoload

    Keep it short:

    a test which always worked, stopped working. Then worked again. Then stopped working. Etc. Then I repeated the same test 400 times -> it failed. Actually only the first time the test was performed it failed, the other 399 times went well.

    The reason for failing was that a number read from a textbox was not yet updated. E.g. i enter 5+4 and then click "calculate". Afterwards i expect 9 in a textbox, but get 0 cause the calculation was not done yet.

    This fails obv. because of waitforpagetoload (in my eyes)

    has had someone a workaround? i'm not the only one experiencing this... see here:
    http://stackoverflow.com/questions/63360...ults-in-timeout




    crosspost from openqa seleniumforum:
    http://clearspace.openqa.org/thread/20656

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Location
    Cambridge, MA, USA
    Posts
    263
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium - unreliable tool? Waitforpagetoload

    I don't think it's fair to say that Selenium is unreliable. If you work with any other browser test automation tool, you will find that timing is frequently an issue. You need to know what to wait for, and you need to know a lot about how the application itself is built, in order to get the right formula.

    If you care to share your code, perhaps we can make some specific suggestions about how to ensure that your test will work correctly every time.

  3. #3
    Senior Member
    Join Date
    Jan 2007
    Posts
    147
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium - unreliable tool? Waitforpagetoload

    Add the waitforpagetoload in a loop if you havent already. Cannot figure out from your post whether you are depending on the default of 30ms.

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Yankee Land
    Posts
    4,055
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium - unreliable tool? Waitforpagetoload

    I don't find it unreliable, and I am using this on pages with Ajax. I see you've posted at the Selenium HQ site as well, did you do a search there to see some of the other comments on this? You may also want to check for element present, or as noted, increase the wait time.
    - M

    Nothing learns better than experience.

    "So as I struggle with this issue I am confronted with the reality that noting is perfect."
    - Unknown

    Now wasting blog space at QAForums Blogs - The Lookout

  5. #5
    Junior Member
    Join Date
    Jul 2009
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium - unreliable tool? Waitforpagetoload

    After 1.5 months of working with selenium i have my first weird error.

    Any ideas where it comes from (e.g. other programs / firefox open in other windows)? Clicking around while testing?


    it cannot be connected to the 30 seconds.

    tailoring the code out of the framework etc it comes down to this:
    <font class="small">Code:</font><hr /><pre>

    public String thisIsSpartaaa(String elementLocator, String locator) {
    seleniumSession.highlight(elementLocator);
    seleniumSession.click(elementLocator);
    seleniumSession.waitForPageToLoad(30000);
    return seleniumSession.getValue(locator);
    }
    </pre><hr />

    btw how would one loop because of waitforpagetoload?




    p.s. i've worked a month with testpartner before pulling the plug on it. My last work there was concentrated on double checking everything (e.g. click, setText etc). Because tp is so incredibly unreliable. Can this happen here as well?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.68%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:53 PM.

Copyright BetaSoft Inc.