M
M
Master Ruby2022-02-13 19:50:29
ruby
Master Ruby, 2022-02-13 19:50:29

How to disable incognito mode in Ferrum?

require "ferrum"

BROWSER_PATH="C:/Program Files/Google/Chrome/Application/chrome.exe"

# run betbot
def akira
  chrome = Ferrum::Browser.new(
    browser_path:BROWSER_PATH,
    headless:false,
    browser_options:{
      'no-sandbox':nil,
      'incognito':false,
      'user-data-dir':'E:/ruby/akira/session',
    }
  )
  chrome.go_to("https://google.com")
  chrome.screenshot(path: "google.png")
  chrome.quit
end

akira


The page starts in incognito mode, I don't know how to turn it off.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question