SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    May 2006
    Location
    Israel
    Posts
    338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Wierd results using Execute method

    Hey all.

    I'm using the Excecute method and getting strange results. Never mind the entire code, the relevant section goes something like this:

    sCondition = "vbwindow(""vbname:=Form1"").exist"

    Excecute "If " & sCondition & " Then: bResult = True: Else: bResult = False: End If"

    (I know you're wondering why the hell should i use the execute overkill for something like that, but it's a downgrade of the actual code)

    The code works well when the window does indeed exist, however, if the window doesn't exist, the qtp gets stuck. If i press pause & then play again, it manages to continue and run through the code as expected.

    I wonder if you know why this might be happenning.

    10x, Yaron.
    www.AdvancedQTP.com
    'coz we're programmers - not users

  2. #2
    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: Wierd results using Execute method

    try using this

    sCondition = "vbwindow(""vbname:=Form1"").exist(0)"

 

 

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 12.50%
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 11:45 AM.

Copyright BetaSoft Inc.