SPONSORS:






User Tag List

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

    Easy loop needed. Plz help.

    I have an extremely easy task (I think) that I need to do. I have no experience w/ Winrunner and our automation guy has recently left the company. I need to find a valid number in our system. There is a text box that I would like to start at #1 and go up till I find the first valid value. So, I have to enter "1" in the text box, click OK, a windows popup appears that says "This is not a valid number." Click OK on that popup and then enter "2" and OK. Again the popup appears w/ "This is not a vaild number." Eventually, "This is a valid number" will appear. How do I do this?

  2. #2
    Moderator
    Join Date
    Mar 2002
    Location
    Tampa Bay
    Posts
    7,673
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Easy loop needed. Plz help.

    I think the simplest way is for you to record a script of - say - 3 tries. Then look at the code and turn it into a loop. If, however, you want us to actually write the code for you, that is more of a tall order (although there may be someone here willing to do that).

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Location
    New York
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Easy loop needed. Plz help.

    Here is an easy loop. Instead of myFunction(), use your function to open the window and enter a value. Use the technique suggested by Peter Ruscoe to determine what your function should do.
    <font class="small">Code:</font><hr /><pre>
    myNumber = 0;
    while ( E_OK != MyFunction( myNumber ) )
    {

    ++myNumber;
    }
    </pre><hr />

  4. #4
    Moderator
    Join Date
    Mar 2002
    Location
    Tampa Bay
    Posts
    7,673
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Easy loop needed. Plz help.

    After almost 2 months, I imagine he's already figured out how to do 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 3.85%
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 05:47 AM.

Copyright BetaSoft Inc.