How to pass Chrome options in webdriver-user-agent gem for watir

本秂侑毒 提交于 2019-12-24 11:20:37

问题


I am trying to pass cookies option for Chrome Drive using Watir gem

From Watir documentation i can do Watir::Browser.new :chrome, opts

So for cookies I can do:

    browser = Watir::Browser.new :chrome, options: {args: ['--user-data-dir=/cookies']} 

When using the webdriver-user-agent gem for mobile testing, their documentation tells me to start the browser like this:

driver = Webdriver::UserAgent.driver(browser: :chrome, agent: :iphone)
browser = Watir::Browser.new driver

But now I don't know how I can pass the option for the Chrome

来源:https://stackoverflow.com/questions/57864543/how-to-pass-chrome-options-in-webdriver-user-agent-gem-for-watir

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!