whether mac os can operate under selenium background



  • Is it possible for mac os selenium python to work in a background mode using chrome? If it?



  • This is an example of how to start chrome in headless mode (i.e. displaying the browser window):

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    

    chrome_options = Options()
    chrome_options.add_argument("--headless")

    with webdriver.Chrome(options=chrome_options) as driver:
    driver.get("http://www.python.org")
    assert "Python" in driver.title
    print(driver.title)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2