Calling a Selenium Testcase in python
I'm trying to run a selenium testcase in python. I have testcases that I can run direct开发者_JS百科ly from the command line no problem with
python seleniumtest.py
However when I try to run it from within python it is failing.
__import__('seleniumtest')
seleniumtest.py ends with a command
unittest.main()
this command seems to fail when it gets run using the __import__
method. Does know why running this through the import is not working? For my purposes I cannot simply use popen
.
You need to have something like this at the end of your selenium program:
if __name__=="__main__"
精彩评论