SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    When one WebObject is display in the page?

    Hi All
    I have the following situation:
    I have one button and after I click it the system must show me Result in WebTable object. I try to measure the time between click the button and displaying the result in the page. I try with Object.Exist but I see that the Object.Exist become True before the WebTable is displaying in the Page.

    My Idea is to work with MercuryTimers("Timer1").Start and MercuryTimers("Timer1").Stop. But I can not undersand when Web Table is display in the page and then to stop the Timer?

    Please help me! Is there any way to understand when one WebObject is display in the page?

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    the MercuryTimer is absolutly undependend from displaying any object in your page.
    MercuryTimer is for calculating time between some steps.
    try to use Browser().Sync and/or Browser().Page().Sync

    depends from your application, what you exactly need
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Junior Member
    Join Date
    Nov 2007
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    Hi rscholz660,
    The idea is the same to measure the time between 2 steps first is click the button the second is WebTable display in the page and I check her values...?
    I try with Page.Sync but the result is the same:

    Browser("B1").Page("P1").Frame("dataHolder").Image ("Finish").Click
    MercuryTimers("Timer1").Start
    Browser("B1").Page("P1").Sync
    Reporter.ReportEvent micDone, "The time is mesaured", "The time is:" & MercuryTimers("Timer1").Stop() & "ms"
    msgbox("I see the web table")

    When I run this code and see the message" I see the web table" the web table(Browser("B1").Page("P1").Frame("dataHolder_2 ").WebTable("WT1") is not displayed in the frame yet!!!
    Please help...

  4. #4
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    try to search for a static cell content within your webtable and take this result for sync
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  5. #5
    Junior Member
    Join Date
    Nov 2007
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    I read in QTPHelp and there I see that have Sync only for Browsers and Pages. Haw I can use Sync for WebTable cell?

  6. #6
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    example from QTP included help:

    Sub GetCellData_Example()

    'The following example uses the GetCellData method to display the

    'contents of the cell located in cell 1, column 1 in a message box.



    Set Text = Browser("Mercury Tours").Page("Search Results").WebTable("OutboundFlight").GetCellData(1 , 1)

    MsgBox "text contains" & Text



    End Sub
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  7. #7
    Junior Member
    Join Date
    Nov 2007
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    Hi rscholz660
    I know how to get the celldata, but how i can use the code you post me to measure the time between button click and the time when this sell is display in the screen?

  8. #8
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    While Len(Browser().Page().WebTable().GetCellData(a,b)) = 0
    ' its a loop until selected cell will contain any value
    ' dont forget to insert a breakpoint after a specified time
    Wend
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  9. #9
    Senior Member
    Join Date
    Jun 2007
    Location
    Brussels, Belgium
    Posts
    118
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: When one WebObject is display in the page?

    Why can't start and stop transactions be used here?
    -----------
    Regards,
    Feroz

    Its automation not automagic

 

 

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 08:01 AM.

Copyright BetaSoft Inc.