mercredi 23 janvier 2019

How to pass a headless option for my driver using Java and Selenium?

I am setting up a chrome driver with the help of Selenium and Java. I want this driver to be executed headless but I can't find out the way. Can you explain to me what do I need to do?

My code sample:

            System.setProperty(CHROME_PROPERTY, LINUX_CHROMEDRIVER_PATH);
            driver = new ChromeDriver();
            driver.manage().window().maximize();
            driver.manage().timeouts().implicitlyWait(DEFAULT_IMPLICITY_TIME, TimeUnit.SECONDS);

Aucun commentaire:

Enregistrer un commentaire