Using selenium web driver to run test on multiple browsers

后端 未结 7 990
时光说笑
时光说笑 2021-02-04 19:42

I\'m trying to run a same test across multiple browsers through for loop but it always run only on Firefox.

bros = [\'FIREFOX\',\'CHROME\',\'INTERNET EXPLORER\']         


        
7条回答
  •  旧巷少年郎
    2021-02-04 20:13

    Have you considered using the composite design pattern to create a CompositeWebDriver that actually runs multiple component WebDriver (such as chrome, gecko,...)? To this end, you would extend the WebDriver class with a new one (e.g. CompositeWebDriver) that just delegates his calls to all the actual WebDrivers.

    This could also be done with various instances of RemoteWebDriver as components.

提交回复
热议问题