Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preferences support #47

Open
deepanshu88 opened this issue Jun 8, 2021 · 1 comment
Open

Preferences support #47

deepanshu88 opened this issue Jun 8, 2021 · 1 comment
Labels
feature a feature request or enhancement

Comments

@deepanshu88
Copy link

Does chromote support prefs like RSelenium? See example of prefs. Here it translates web page to English.

library(RSelenium)
shell('docker run -d -p 4445:4444 selenium/standalone-chrome')

eCaps <- list(chromeOptions = list(args = c('--disable-gpu','--window-size=1920,1080', '--lang=en'),
                                   prefs = list(translate_whitelists=list('ru' = 'en'),
                                                translate=list('enabled'='true'))))
                                                
remDr <- RSelenium::remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = "chrome", extraCapabilities = eCaps)

remDr$open(silent = TRUE)
remDr$navigate("http://premier.gov.ru/events/")

I found args in Chrome$new( ) but could not find prefs.

a <- chromote::Chromote$new(
  browser = chromote::Chrome$new(
    path = chromote::find_chrome(),
    args = c('--start-maximized')
  )
)

b <- a$new_session()
b$Page$navigate("https://www.google.com/")
b$view()

@hadley
Copy link
Member

hadley commented Jan 30, 2024

@deepanshu88 I think you're mostly likely to get help if you could figure out what exactly the preferences do in RSelenium and what features of chromium they correspond to

@hadley hadley added the feature a feature request or enhancement label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants