Hi, answer to your second question is "Yes". You can pass in a command line argument (example : pass in the url). ARGV[0]=> argument '1' on command line, this is JUST after the test name and before you pass in "-f" for the fast mode or any other watir parameter. If you want to keep it optional, then you will need to incorporate appropriate logic in your code . testSite="http://www.xyz.com" if ARGV[0]=="" ie.goto(testSite) else ie.goto(ARGV[0]) # the command line argument end
Hope this helps Amol --- Gabe <[EMAIL PROTECTED]> wrote: > I have two miscellaneous questions: > > 1) How can I delete cookies from within watir? I > noticed that there is a method for this in > Watir::CookieManager::WatirHelper, but I am really > new to Ruby, and can't figure out the syntax I need > to use :-) > > 2) I would like my watir unit tests to accept an > optional command-line parameter which specifies the > site to run tests against. This way I could easily > use the same script to test my app in different > environments: localhost for development, a staging > server, etc. Is this possible? > > TIA, > Gabe > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=3911&messageID=10749#10749 > _______________________________________________ > Wtr-general mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/wtr-general > No Body Has ever Collided With The Sky...So Sky Is The Limit! __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
