How to configure the driver of an open or active page using selenium webdriver

0

We have a project where we must automate a test of a page with Selenium WebDrive , but being active, that is, we are not going to open a window or browser with the URL, it must already be active and make them the necessary tests

Normally we configure the driver and we take the properties of the page

driver.get(prop.getProperty("url"));  // esto abre un nueva ventana y comienza la prueba

How should we configure the driver of an open or active page using Selenium Webdriver ?

Thanks

    
asked by Nicolas R Vivas Lopez 24.07.2018 в 18:48
source

1 answer

0

I do not understand your question very well If you mean to use webelement without graphical interface, what you should do is add

FirefoxOptions lOptions = new FirefoxOptions();
lOptions.setProfile(lFirefoxProfile);
lOptions.addArguments("--headless");
lOptions.addArguments("--disable-gpu");
lOptions.addArguments("--window-size=1920x1080");

and start the driver

WebDriver driver = new FirefoxDriver(lOptions);

Greetings

    
answered by 25.07.2018 в 14:49