We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b97281c commit 1cb0724Copy full SHA for 1cb0724
Testauto/src/main/java/com/sm/config/SeleniumConfig.java
@@ -10,9 +10,13 @@
10
public class SeleniumConfig {
11
12
@Bean
13
- WebDriver webDriver() {
+ WebDriver webDriver() throws IOException {
14
ChromeOptions options = new ChromeOptions();
15
options.addArguments("--headless");
16
+ options.addArguments("--no-sandbox");
17
+ options.addArguments("--disable-dev-shm-usage");
18
+ String tempProfileDir = Files.createTempDirectory("chrome-profile-").toString();
19
+ options.addArguments("--user-data-dir=" + tempProfileDir);
20
return new ChromeDriver();
21
}
22
0 commit comments