Protractor error message “unsupported command-line flag” in Chrome?

后端 未结 9 1421
予麋鹿
予麋鹿 2020-12-23 20:35

I\'m a new user to Protractor, and I encountered this error running my tests using Chrome (error displays beneath the address bar in the launched browser):

9条回答
  •  时光说笑
    2020-12-23 21:16

    Code that worked for both local webdriver and remote driver scenarios for Ruby Bindings. This suppressed the warning message on chrome35 (Remember that you have to get 2.10 chromedriver.exe from http://chromedriver.storage.googleapis.com/index.html)

    Localwebdriver:

    caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => ["test-type" ]})
    
    @browser = Selenium::WebDriver.for :chrome,desired_capabilities: caps
    

    RemoteWebDriver (using GRID): Note that comma-separated-ips in the below code are the ips from which the grid hub is allowed to receive selenese commands. This security layer has been implemented from chrome35 and chromedriver 2.10 onwards

    caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => ["test-type","whitelisted-ips=comma-separated-ips"]})
    
    @browser =  Selenium::WebDriver.for :remote, :url => GRID_HUB_URL,:desired_capabilities => caps
    

提交回复
热议问题