Skip to content

Commit

Permalink
Adding custom options in chromium manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Mar 2, 2025
1 parent b56b694 commit e09565e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.github.bonigarcia.wdm.managers;

import static io.github.bonigarcia.wdm.config.DriverManagerType.CHROMIUM;
import static org.openqa.selenium.net.PortProber.findFreePort;

import java.nio.file.Path;
import java.util.Optional;
Expand Down Expand Up @@ -67,6 +68,10 @@ protected Capabilities getCapabilities() {
if (browserPath.isPresent()) {
options.setBinary(browserPath.get().toFile());
}
options.addArguments("--no-sandbox");
options.addArguments("--disable-gpu");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--remote-debugging-port=" + findFreePort());
}
return options;
}
Expand Down

0 comments on commit e09565e

Please sign in to comment.