0
I need to develop a script for automation of a website. I get a list of URLs I pass this list on a for that for each item in the list a new one is created webdriver and it asks to login to the site. I thought to create two script one that makes the access to the site and the other to manipulate the site.
My attempt to use two webdrivers and make the second maximize the window created by the first, will always be created a new webdriver function call. If you know a better suggestion please say.
def teste(browser,link,i):
browser.execute_script("window.open('"+link+"','new window','width=200, height=100')")
browser1 = webdriver.Firefox()
browser1.switch_to_window(browser.window_handles[i])
browser1.maximize_window()
Note: The list is too long, I’m using multithreads to speed up the process.
Only one login required? If yes, you can reuse cookies from one login in the other instances.
– Pedro von Hertwig Batista
I was able to resolve with your idea of using cookies
– Tmilitino