开发者

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

开发者 https://www.devze.com 2023-04-04 12:48 出处:网络
I\'m wondering how get nose.run() twice using different configuration in a python script I have a nosetest (un开发者_如何学Pythonit test) where it needs to be run on 2 types

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

精彩评论

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

关注公众号