开发者

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__"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜