I'm using Cuprite to crawl some websites and I'd like to translate the page.
By looking at Ferrum codebase, there's a Ferrum::Browser::Options::Chrome::DEFAULT_OPTIONS object.
So when configuring Capybara, I'm using ignore_default_browser_options, and only re-use this DEFAULT_OPTIONS and exclude the key I don't want
Capybara::Cuprite::Driver.new(
app,
{
ignore_default_browser_options: true,
window_size: [1200, 800],
browser_options: { 'no-sandbox': nil }.merge(Ferrum::Browser::Options::Chrome::DEFAULT_OPTIONS.except(
"disable-features",
"disable-translate",
"headless"
)),
headless: false,
}
)
But it doesn't seem to work. I have 2 questions:
- Is it possible to re-enable this feature?
- Is it possible to interact with the "translate UI" to accept the translation from Chrome?
I'm using Cuprite to crawl some websites and I'd like to translate the page.
By looking at Ferrum codebase, there's a
Ferrum::Browser::Options::Chrome::DEFAULT_OPTIONSobject.So when configuring Capybara, I'm using
ignore_default_browser_options, and only re-use thisDEFAULT_OPTIONSand exclude the key I don't wantBut it doesn't seem to work. I have 2 questions: