I need to deactivate the browser window that opens when the tests are run. I copy the code I use and it should work but it does not:
from selenium.webdriver.chrome.options import Options
class LoginTest(unittest.TestCase):
def test(self):
options = Options()
options.add_argument("--headless")
options.add_argument("--disable-gpu")
options.add_argument("--no-sandbox")
driver = webdriver.Chrome(chrome_options=options)
I use:
Python 3.5
Chromedriver 2.35
Google Chrome 64.0.3282.167
Selenium 3.9.0
Any help?