SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jul 2001
    Location
    New York, NY
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Descriptive Programming is taking too long

    Why does it take QTP 5 seconds to act on each of this line?
    What can I do to speed it up.

    Thanks.

    Browser("CreationTime:=0").Page("micClass:=Page"). WebEdit("name:=q").Set "Test"
    Browser("CreationTime:=0").Page("micClass:=Page"). WebButton("name:=Google Search").Click

  2. #2
    Member
    Join Date
    Oct 2005
    Posts
    352
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive Programming is taking too long

    Check your Run Settings File>Settings > Run> obj sync ...

  3. #3
    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: Descriptive Programming is taking too long

    Do you have only one browser open? If so, look at this

    http://www.sqaforums.com/showflat.php?Ca...true#Post335836

    Try using a different value to creationtime

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive Programming is taking too long

    Adding to Abrakh & Robbie's suggestions (which I think are the solutions to your issues), you should always disable Smart Identification when using DP code.

    Try:

    Browser("micClass:=Browser").Page("micClass:=Page" ).WebEdit("name:=q").Set "Test"
    Browser("micClass:=Browser").Page("micClass:=Page" ).WebButton("name:=Google Search").Click

    This should reduce the time to execute.

    Mark Smith.

  5. #5
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Descriptive Programming is taking too long

    There is one more effective one.

    Abrakh, in case you there are no popups in your application then you can launch 2 browsers and work on the 1st one only. The other dummy browser will help for faster execution

    <font class="small">Code:</font><hr /><pre>
    SystemUtil.Run "iexplore.exe"
    SystemUtil.Run "iexplore.exe"
    Browser("CreationTime:=0").Sync
    Browser("CreationTime:=1").Sync

    Browser("CreationTime:=0").Navigate "www.google.com"
    Browser("CreationTime:=0").Sync

    Browser("CreationTime:=0").Page("micClass:=Page"). WebEdit("name:=q").Set "Test"
    Browser("CreationTime:=0").Page("micClass:=Page"). WebButton("name:=Google Search").Click
    </pre><hr />

  6. #6
    Junior Member
    Join Date
    Jul 2001
    Location
    New York, NY
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive Programming is taking too long

    [ QUOTE ]
    Adding to Abrakh &amp; Robbie's suggestions (which I think are the solutions to your issues), you should always disable Smart Identification when using DP code.

    Try:

    Browser("micClass:=Browser").Page("micClass:=Page" ).WebEdit("name:=q").Set "Test"
    Browser("micClass:=Browser").Page("micClass:=Page" ).WebButton("name:=Google Search").Click

    This should reduce the time to execute.

    Mark Smith.

    [/ QUOTE ]

    Thanks Mark! It worked like a charm.

  7. #7
    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: Descriptive Programming is taking too long

    please disable "smart identification" before you run your test. seems some objects are not uniqui during runtime. if "smart identification" is enabled the test runs without failure but takes a long time. in the help of QTP is a nice example-function to recognize if an object is unique or not:

    <font color="green">

    '================================================= =========
    Public Function IsObject_unique(f_parent, f_descr)
    '================================================= =========

    Dim oDesc
    On Error Resume Next
    IsObject_unique = False
    Set oDesc = Description.Create()
    arProps = Split(f_descr, ",")
    For i = 0 To UBound(arProps)
    arProp = Split(arProps(i), ":=")
    If UBound(arProp) = 1 Then
    PropName = Trim(arProp(0))
    PropValue = arProp(1)
    oDesc(PropName).Value = PropValue
    End If
    Next

    Set children = f_parent.ChildObjects(oDesc)
    If children.Count = 1 Then
    IsObject_unique = True
    reporter.reportevent micDone, "IsObject_unique", "The object with the physical description """ &amp; f_descr &amp; """ is unique under the given parent object."
    ElseIf children.Count = 0 Then
    IsObject_unique = False
    reporter.reportevent micDone, "IsObject_unique", "The object with the physical description """ &amp; f_descr &amp; """ is not found under the given parent object."
    Else
    IsObject_unique = False
    reporter.reportevent micDone, "IsObject_unique", "The object with the physical description """ &amp; f_descr &amp; """ is not unique under the given parent object."
    End If
    On Error GoTo 0
    End Function
    </font>

    the function returns "True" if object are unique, returns "False", if not unique or not found...
    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

 

 

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.00%
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 04:34 AM.

Copyright BetaSoft Inc.