开发者

Running nose.run() multiples time with different config for Webdriver Python script

I'm wondering how get nose.run() twice using different configuration in a python script

  1. I have a nosetest (un开发者_如何学Pythonit test) where it needs to be run on 2 types of browsers using webdriver .
  2. The print command below will show the browser is assigned to browser 1 and 2 respectively.
  3. However nose.run always run using browser2 variable twice instead of running browser1 and then browser 2.
parser = SafeConfigParser()
parser.read('config.ini')
browser = parser.get('Selenium_Config','browser1')
print browser
nose.run()
browser = parser.get('Selenium_Config','browser2')
print browser
nose.run()
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜