Yeah, I figured that. I got it to work thanks, but I still don't
understand how exactly. Coming from Perl I am used to a more procedural
type of programming. BTW - Selenium is a great tool for web testing, and
the way it will translate your web clickstream into your choice of
languages rocks.
good catch, my mistake
args[1] == 'yankees'
True
On Wed, Jul 15, 2009 at 12:25 AM, Christian Witts wrote:
> vince spicer wrote:
>
>> First off, selenium is a great tool and the python driver is very powerful
>>
>> there are numerous ways to access cli variables,
>>
>> the quickest
>>
>> import
vince spicer wrote:
First off, selenium is a great tool and the python driver is very powerful
there are numerous ways to access cli variables,
the quickest
import sys
print sys.srgv
sys.argv will it output a array of all command line args
./selenium-google-test.py yankees
will out put:
['s
Sorry I do remember that issue in the past, the unittest.main takes over the
cli variables in order to select modules to run
python selenium-google-test.py --help
so unittest is assuming yankees is a test module, you can override this
functionality however with:
unittest.main(argv=['mytestapp'])
Ok,
So I added the following:
from selenium import selenium
import unittest, time, re
import sys # added this
q = sys.argv[1] # added this
print q # added this just to see
class NewTest(unittest.TestCase):
def setUp(self):
self.verificationErrors = []
self.selenium = selen
"J Cook" wrote
Now I am confused on how to pass a command line parameter here. Any
suggestions? I would like to be able to run something like:
$ python selenium-google-test.py "yankees"
Try the Talking to the User topic in my tutorial, it includes a section
on accessing command line args
First off, selenium is a great tool and the python driver is very powerful
there are numerous ways to access cli variables,
the quickest
import sys
print sys.srgv
sys.argv will it output a array of all command line args
./selenium-google-test.py yankees
will out put:
['selenium-google-test.py
Hello,
I have some autogenerated code from Selenium which I cannot figure out
how to pass some command line variables to. For example I could export
the same in Perl and it would be for example:
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_