SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reusing a testcase

    I test several sites that pretty much have the same identifiers and such. I want to cut down my maintenance by reusing a testcase that will work on each site. Currently I have about 10 testcases for each site and 9 of those will work for all sites. I am currently trying to us LIST OF STRING and using LoadPage in a loop but I can't seem to get that to work. Any help would be great

    Yes I am trying to run through URL's
    In a testcase (search) I entered this code.

    LIST OF STRING lsURL = {...}
    "www.chicagotribune.dailyshopper.com"
    "www.ctnow.dailyshopper.com"
    Browser.LoadPage (sURL)

    The error I get is "Variable is not set"

    I tried to find some example on this and I have no idea if I am even on the right track.
    My code is word for word from the Segue guy.




    [This message has been edited by crazyram (edited 11-30-2000).]

  2. #2
    Junior Member
    Join Date
    Sep 2000
    Location
    Beaverton, OR USA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reusing a testcase

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by crazyram:
    I am currently trying to us LIST OF STRING and using LoadPage in a loop but I can't seem to get that to work. Any help would be great<HR></BLOCKQUOTE>

    Can you give us more specifics? How are you implimenting the loop and what is the error? Is your LIST OF STRING a list of URL's that you want to loop through?

    I'm not sure I can provide much help, but I'll try with a little more info to go from. Thanks!

    Andrew

  3. #3
    Junior Member
    Join Date
    Nov 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reusing a testcase

    I have also received a need to use BrowserLocation error when I mess with the code? The manuals do not give to much on that subject.

  4. #4
    Junior Member
    Join Date
    Sep 2000
    Location
    Beaverton, OR USA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reusing a testcase

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by crazyram:
    LIST OF STRING lsURL = {...}
    "www.chicagotribune.dailyshopper.com"
    "www.ctnow.dailyshopper.com"
    Browser.LoadPage (sURL)
    <HR></BLOCKQUOTE>

    Heh...the first thing I see, and this could very well just be a typo in the message, is that you declare the LIST OF STRING variable as "lsURL" and then later refer to it as "sURL." Is that the problem? (worth a shot!)

    For looping purposes, are you using a "for each" type structure? That would probably work.

    Andrew


    [This message has been edited by Erich Zann (edited 11-30-2000).]

  5. #5
    Junior Member
    Join Date
    Nov 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reusing a testcase

    Thanks Erich, that for each statement was it.
    I am now able to reuse my testcases across several sites. Here was the final code for to help anyone with the same problem.

    [-] testcase Search ()
    [ ] //This Line Should Allow This to Run in All Browsers
    [ ] Agent.SetOption(OPT_VERIFY_RESPONDING, FALSE)
    [ ]
    [-] LIST OF STRING lsURLs = {...}
    [ ] "chicagotribune.dailyshopper.com"
    [ ] "ctnow.dailyshopper.com"
    [ ] "dailypress.dailyshopper.com"
    [ ] "newsday.dailyshopper.com"
    [ ] "orlandosentinel.dailyshopper.com"
    [ ] "sunsentinel.dailyshopper.com"
    [ ] "sunspot.dailyshopper.com"
    [ ] STRING sURLs
    [-] for each sURLs in lsURLs
    [ ] Browser.LoadPage (sURLs)
    [ ] BrowserPage.HtmlTextField("Search For:").SetPosition (1, 1)
    [ ] BrowserPage.HtmlTextField("Search For:").SetText ("beef")
    [ ] BrowserPage.TypeKeys ("<Enter>")
    [ ] BrowserPage.HtmlImage("index[1]").Click ()

  6. #6
    Junior Member
    Join Date
    Sep 2000
    Location
    Beaverton, OR USA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reusing a testcase

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by crazyram:
    Thanks Erich, that for each statement was it.<HR></BLOCKQUOTE>

    Glad you got it figured out Crazyram!

    Erich

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 09:26 PM.

Copyright BetaSoft Inc.