Python Forum

Full Version: Really confused by Selenium Grid2, please help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I am trying to run a lot (10+) of headless Selenium instances all at once (in parallel). For example, I would like to visit a website and click on a button and then print the cookies from that website for every instance I open. Something like this:

    from selenium import webdriver
    from import Options

    options = Options()
    driver = webdriver.Chrome(chrome_options=options, executable_path=".../chromedriver.exe")

    cookies_list = driver.get_cookies()
    cookies_dict = {}
    for cookie in cookies_list:
        cookies_dict[cookie['name']] = cookie['value']


I've spent about 4-5 hours trying to do this and nothing has worked. Every single tutorial I've visited is either useless, not Windows 10 or both. I've always hit an error along the way despite following their directions exactly, and the errors are often very odd (sorry for being vague).

Can anyone please explain to me how I can run a lot of these all at once using Selenium Grid2 or something else?