SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Feb 2004
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    web_sync recommendation

    Running into an intermittent issue with the web_sync() function (WR 7.01 w/web test & IE 5x on Win2k).

    I have web_sync(60) statements after I click anything that will take me to a new page. For the most part, it works as designed. However, occasionally (enough to be irritating), the web_sync releases control back to the script while the next page is still loading as if the page is fully loaded. The problem is, the page isn't loaded enough for the next part of my script to find the objects I'm looking for and the script fails in one way or another. I should also note that this occurs well before the 60 second time-out I have in the web_sync statement.

    After looking through the forums, I found three main ideas:

    1) Change the timeout that controls the interval web_sync uses to compare snapshots of the new page to determine if it is loaded.

    2) Monitor the status bar.

    3) Check for a common object on the page that would always be the last thing loaded/rendered.

    Does anyone have experience with this type of web_sync behavior and recommendations for the fix/work-around that best helped you and was most stable?

    Thanks in advance to all replies.

    Chris

  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_sync recommendation

    Chris - go with option 3 using the appropriate *_get_info(); function.

  3. #3
    Member
    Join Date
    Feb 2004
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_sync recommendation

    I'll give that a shot.

    Thanks

  4. #4
    Member
    Join Date
    Aug 2003
    Location
    Ohio
    Posts
    126
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_sync recommendation

    You could also try using the following:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">public function WebWait();
    {
    #Set the browser active
    set_window(LogicalBrowserName);

    #Give the object a second to appear
    wait(1);

    #While progress bar exists...wait
    while(obj_highlight(&quot;{class: object, MSW_class: msctls_progress32}&quot == E_OK)
    {
    wait(1);
    }

    #Set focus back to the main frame
    set_window(LogicalFrameName);
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">I have found this to be a pretty universal solution that doesn't require altering for different objects on different pages and also doesn't require you to rely on the order in which the objects are loaded to not change.

    Couple of notes:
    </font><ul type="square">[*]<font size="2" face="Verdana, Arial, Helvetica">My app uses frames and we have different gui map entries for the frame and browser itself. Thus the set_window statements. If your app does not then these can be removed.</font>[*]<font size="2" face="Verdana, Arial, Helvetica">The obj_highlight function is used because there is currently a bug in WR with using obj_exists with this specific object.</font>[*]<font size="2" face="Verdana, Arial, Helvetica">The one istance it does not cover is if the page is loaded in a new browser window. It will only work if the resulting page is displayed within the same browser.</font>[/list]<font size="2" face="Verdana, Arial, Helvetica">
    Hope it helps.

    Todd

 

 

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 11.54%
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 08:05 AM.

Copyright BetaSoft Inc.