ropensci / RSelenium

An R client for Selenium Remote WebDriver
https://docs.ropensci.org/RSelenium
344 stars 81 forks source link

how to set chrome option -- excludeSwitches #207

Open amjiuzi opened 5 years ago

amjiuzi commented 5 years ago

how to trans python scripts downstairs into Rselenium version:

option = ChromeOptions()
option.add_experimental_option('excludeSwitches', ['enable-automation'])

my version not works

eCaps <- list(chromeOptions = list(args = c('--excludeSwitches=enable-automation')))

remDr <- remoteDriver(remoteServerAddr='localhost', port=4444L, extraCapabilities = eCaps, browserName='chrome')

errors reperted:

Error: Summary: SessionNotCreatedException Detail: A new session could not be created. Further Details: run errorDetails method

@johndharrison @juyeongkim

ianmcook commented 5 years ago

This works for me:

eCaps <- list(chromeOptions = list(excludeSwitches = list("enable-automation")))

This disables the message that says

Chrome is being controlled by automated test software

when Chrome starts up.