SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Oct 2002
    Location
    Calgary, Alberta, Canada
    Posts
    101
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser.WaitForRead() not working properly

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by david.zeng:
    Thank you Donald! I'll give it a try now.

    David
    <HR></BLOCKQUOTE>

    No problem. Hope it works for you. The idea for a custom page load function was posted by someone else on this forum; and I am indebted to them because I couldn't get by without it.

    Actually, my name is Jonathan. Donald Knuth is just quoted in my signature. With a handle like signal 11 I can see it being confusing though. I only wish I had a tenth of Donald Knuth's knowledge and intelligence.


    ------------------
    Beware of bugs in the above code; I have only proved it correct, not tried it."
    --Donald Knuth
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    --Donald Knuth

  2. #2
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser.WaitForRead() not working properly

    Hehe, it works just fine. Thanks for your help.

    I've made some tweak to it. Should I include your name in the code credit?

    David

  3. #3
    Senior Member
    Join Date
    Oct 2002
    Location
    Calgary, Alberta, Canada
    Posts
    101
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser.WaitForRead() not working properly

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by david.zeng:
    Hehe, it works just fine. Thanks for your help.

    I've made some tweak to it. Should I include your name in the code credit?

    David
    <HR></BLOCKQUOTE>
    Glad it works for you.

    You don't have to include my name in there, I got the idea from the forum anyway.



    ------------------
    Beware of bugs in the above code; I have only proved it correct, not tried it."
    --Donald Knuth
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    --Donald Knuth

  4. #4
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser.WaitForRead() not working properly

    I think there is a bug in with segue about the browser.waitforready have a default wait time of 0 now instead of the Agent.GetOption(OPT_WINDOW_TIMEOUT) value.

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

  5. #5
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser.WaitForRead() not working properly

    Hi All,

    I am testing a web application that includes several pages that take 3-5 seconds to load. I am using ST 6.0.1.0 build 1163.

    I need to use the Browser.WaitForReady() function to ensure that the pages finish loading before I proceed with other operations. However, the WaitForReady() doesn't seem to work. I logged the actual wait time (function return value) and I keep getting 0.01 or 0.02 seconds waited before ST considers the page has finished loading.

    I've also tried to set the agent option OPT_VERIFY_APPREADY to TRUE or FALSE but still the wait time is under 1 second.

    Has anyone else encountered similar problems? The html source code generated by those pages contain mostly Javascript functions which handle the actual HTML creation on the client side (don't ask me why it's done this way). Would ST consider the page has finished loading after it sees the Javascript code finished loading but before JS has finished writing the HTML source?

    Thanks for any help.

    David

  6. #6
    Senior Member
    Join Date
    Oct 2002
    Location
    Calgary, Alberta, Canada
    Posts
    101
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser.WaitForRead() not working properly

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by david.zeng:
    Hi All,

    I am testing a web application that includes several pages that take 3-5 seconds to load. I am using ST 6.0.1.0 build 1163.

    I need to use the Browser.WaitForReady() function to ensure that the pages finish loading before I proceed with other operations. However, the WaitForReady() doesn't seem to work. I logged the actual wait time (function return value) and I keep getting 0.01 or 0.02 seconds waited before ST considers the page has finished loading.

    I've also tried to set the agent option OPT_VERIFY_APPREADY to TRUE or FALSE but still the wait time is under 1 second.

    Has anyone else encountered similar problems? The html source code generated by those pages contain mostly Javascript functions which handle the actual HTML creation on the client side (don't ask me why it's done this way). Would ST consider the page has finished loading after it sees the Javascript code finished loading but before JS has finished writing the HTML source?

    Thanks for any help.

    David
    <HR></BLOCKQUOTE>

    I have. I don't use WaitForReady(). I wrote a function to handle it myself that looks like this:
    [-] public int PageLoad(window wPageName)
    [ ] const MAX_PAGE_LOAD_TIME = 50
    [-] while (!wPageName.Exists() && iWait &lt; MAX_PAGE_LOAD_TIME)
    [ ] Sleep (1)
    [ ] iWait += 1
    [ ]
    [-] if (wPageName.Exists() == FALSE)
    [ ] // log error
    [-] do
    [ ] raise 1, "***Error: Timed out waiting for {wPageName}. Timeout: {iWait} seconds."
    [-] except
    [ ] Print(" ")
    [ ] ExceptLog()

    [ ] return iWait

    I've seen other posts about Browser.WaitForReady() acting up on this forum, so do a search and see what you turn up.

    I test in an environment that sounds really similar to yours. I have lots of frames and popups to manage, so the PageLoad() function I have above is extremely useful.


    ------------------
    Beware of bugs in the above code; I have only proved it correct, not tried it."
    --Donald Knuth


    [This message has been edited by signal_11 (edited 04-15-2003).]
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    --Donald Knuth

  7. #7
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser.WaitForRead() not working properly

    Thank you Donald! I'll give it a try now.

    David

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 11:07 AM.

Copyright BetaSoft Inc.