SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Oct 2006
    Location
    mumbai, India
    Posts
    166
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    JavaScript Synchronisation Problem with QTP

    HI
    I am testing with QTP on my web server with internet connection on
    For every link I click it takes abt 2-3 mins to load the page as there is heavy db processing ,
    Now after page loads , all controls in page are visible to QTP
    and it clicks on a "Select all" Check box link but javascripts are probably not yet loaded on page at that time hence all check boxes do not get checked
    so a link ( which gets enabled after all check boxes get checked )is disabled and QTP says object Disabled
    note I am using Page Synchronization here but it is not helping
    I could have used child objects Property to see all check boxes are checked or not before clicking on select all link
    but some check boxes are disabled so I cannot use child objects property here

    I could not find any relevant post regarding javascript synchronizations hence posted as new Topic (Excuse me if my search was not good enough)

  2. #2
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: JavaScript Synchronisation Problem with QTP

    For my current UAT I've done a number of things.

    1) I've re-written the Sync method so that it waits until the "Busy" DOM property is false

    2) I've written methods called "EnabledSet/Select/etc." which perform Set/Select/etc. but first waits until the object enabled.

    These two combined appears to get aroudn my JavaScript sync problems but I would guess that it won't be a one size fits all solution.

  3. #3
    Senior Member
    Join Date
    Oct 2006
    Location
    mumbai, India
    Posts
    166
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: JavaScript Synchronisation Problem with QTP


    I was wondering is there a simple mechanism in QTP
    that will determine all the contents in page have Loaded
    as Page Synchronization fails in such cases ,also If my web page is using AJAX for loading pages..
    Anyway I am trying a workaround for this .

  4. #4
    Member
    Join Date
    Aug 2007
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: JavaScript Synchronisation Problem with QTP

    worst scenario is to use wait function to manually wait for couple of seconds after your page is loaded.

  5. #5
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: JavaScript Synchronisation Problem with QTP

    [ QUOTE ]

    I was wondering is there a simple mechanism in QTP
    that will determine all the contents in page have Loaded
    as Page Synchronization fails in such cases...

    [/ QUOTE ]

    Beyond .sync, no. And BTW, some of us feel brower.sync is the more generic sync, rather than browser.page.sync.

    This is why Robbie points out all the extra fiddling with custom functions to work around the situation where browser.sync indicates the page is done loading, when it is really not yet done due to client side active scripting--which OCCASIONALLY CAN issue a 2nd or 3rd server side request AFTER the first response has achieved browser "ready" status. A search of the forum on ".sync" should yield some addition discussions on this issue (these ugly race-like conditions seems to have become more of issue with .NET implementations).

    Also you wrote:
    [ QUOTE ]

    For every link I click it takes abt 2-3 mins to load the page as there is heavy db processing...


    [/ QUOTE ]
    While this might not be a functional test issue to question, it certainly is a performance problem. Users rarely tolerate more than an 8 to 30 second page load wait (many factors that determine what the max number is for your type of app, their connection speed, etc.), but I would be very, very surprised if a page load time of more than 30 seconds will be tolerated by any user community (internal or external) for any type of web application in this point in history. So you might be scaling a wall that eventually must be torn down before the AUT is considered "business worthy". I would question this with project management and marketing before writing custom bullet proofing code to deal with this characteristic.

    -Terry Horwath

 

 

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 10.71%
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 02:15 AM.

Copyright BetaSoft Inc.