Skip to content

Commit

Permalink
fix: ChromiumOptions Arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Mar 16, 2023
1 parent 6225803 commit c35856c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/xyz/cssxsh/selenium/SeleniumInit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -587,15 +587,15 @@ internal fun RemoteWebDriverConfig.toConsumer(): DriverOptionsConsumer = { capab
addArguments("--hide-scrollbars")
if (headless) {
if (System.getProperty(CHROME_DRIVER_VERSION, "109").toInt() >= 109) {
addArguments("--headless=new")
addArguments("--headless")
} else {
addArguments("--headless=chrome")
}
}
if (proxy.isNotBlank()) {
addArguments("--proxy-server=${proxy}")
}

addArguments("--remote-allow-origins=*")
addArguments("--user-agent=${userAgent}")
addArguments("--window-size=${width},${height}")
addArguments(arguments)
Expand Down

0 comments on commit c35856c

Please sign in to comment.