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`][default_options] object. So when configuring Capybara, I'm using [`ignore_default_browser_options`][ignore_default_options], and only re-use this `DEFAULT_OPTIONS` and exclude the key I don't want ```ruby 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: 1. Is it possible to re-enable this feature? 2. Is it possible to interact with the "translate UI" to accept the translation from Chrome? [default_options]: https://github.com/rubycdp/ferrum/blob/main/lib/ferrum/browser/options/chrome.rb [ignore_default_options]: https://github.com/rubycdp/ferrum/blob/6a6017c191e33d4938772a5706acf266f9d937ba/lib/ferrum/browser/command.rb#L50
Activity
route commentedon Aug 22, 2022