Is there a way to fire off the use of the chrome and gecko webdriver at the same time without duplicating code?
Right now I'm swapping between the two.
from selenium import webdriver
from selenium.common.exceptions import
def setUp(self):
# self.browser = webdriver.Firefox()
self.browser = webdriver.Chrome()
Yes, you can do it. However there must be some place where you specify the browser to be opened.
Browser name to be opened can be passed as an argument to setup method
Browser name to be opened can be read from some configuration/properties file.