Answer the question
In order to leave comments, you need to log in
How to force Selenium not to take a screenshot?
Everyone writes how to take a screenshot. And I need to force Selenium not to take screenshots when an Exception happens. After all, whenever Ecxeption occurs, he makes a screen.
Answer the question
In order to leave comments, you need to log in
see where the driver is initialized. The ability to screenshot is configured there.
Well, look in the error handler, there the screenshot itself takes place
. Well, this is so, without seeing the code
there is such an option,
but it does not work ...
in the logs, I look, it still remains enabled
ChromeOptions options = new ChromeOptions();
options.setBinary(<путь до бинарника>);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
//откл скриншоты при Exception
capabilities.setCapability("takesScreenshot", false);
WebDriver driver = new ChromeDriver(capabilities);
// и я еще использую библу от "селенид"
WebDriverRunner.setWebDriver(driver);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question