Can someone please help me on how to open multiple instances of firefox using selenium in python.
I wrote the following code and it does open multiple instances but I would want to keep all the references to the browser so I can access each browser to do specific tasks and should be able to Quit all the browsers once the test is done.
class LoadTestCase(unittest.TestCase):
def setUp(self):
i = 0
while (i < 2):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://example.com/"
self.verificationErrors = []
self.accept_next_alert = True
driver = self.driver
url = "http://example.com/"
driver.get(self.base_url + "/")
i = i + 1