# How can I pass browser arguments using Ruby

**URL:** <https://discuss.appium.io/t/how-can-i-pass-browser-arguments-using-ruby/3663>\
**Category:** Support\
**Created:** [April 1, 2015, 12:54am UTC](https://discuss.appium.io/t/how-can-i-pass-browser-arguments-using-ruby/3663 "2015-04-01T00:54:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmneve](https://discuss.appium.io/user_avatar/discuss.appium.io/pmneve/32/841_2.png) [@pmneve](https://discuss.appium.io/u/pmneve)\
**Post date:** [April 1, 2015, 12:54am UTC](https://discuss.appium.io/t/how-can-i-pass-browser-arguments-using-ruby/3663/1 "2015-04-01T00:54:05Z")

</div>

I would like to send these arguments to the browser in the android emulator: ‘–ignore-certificate-errors’, ‘homepage=about:blank’, ‘test\_type’  
Need to speed things up and avoid certificate error alerts (until I figure out how to actually dismiss them… haven’t hit on the right command yet).

```
    desired_caps = {
        'newCommandTimeout' => 600,
        'androidDeviceReadyTimeout' => 420,
        'avdLaunchTimeout' => 240000,
        'avdReadyTimeout' => 240000,
        'deviceName' => "My_device",
        'platformName' => "Android",
        'avd' => "poc",
        'browserName' => "Browser",
        'avdArgs' => '-http-proxy 151.151.15.250:8080 -dns-server 10.27.206.11,10.27.206.101,10.91.218.197',
        # :chrome => { 'args' => ['--ignore-certificate-errors', 'homepage=about:blank', 'test_type']},
        # 'specialChromedriverSessionArgs' => { 'ignore-certificate-errors'=>true, 'homepage'=>'about:blank', 'test_type'=>true }
    }

```

Right now am using appium 1.2.0 (having trouble updating primarily because of a bunch of older versions of various things getting in the way that I can’t delete but have to do PATH kludges to get around.) chromedriver 2.9 and android sdk 22.6.

---

<div class="post-metadata">

**Author:** ![bootstraponline](https://discuss.appium.io/user_avatar/discuss.appium.io/bootstraponline/32/319_2.png) [@bootstraponline](https://discuss.appium.io/u/bootstraponline)\
**Post date:** [April 2, 2015, 9:30pm UTC](https://discuss.appium.io/t/how-can-i-pass-browser-arguments-using-ruby/3663/2 "2015-04-02T21:30:18Z")

</div>

I think you need to use chrome options args. See the upstream gem:

> <https://github.com/SeleniumHQ/selenium/blob/f39c6d76fd348c3471cfff349c83e5069162c339/rb/spec/unit/selenium/webdriver/chrome/bridge_spec.rb#L31>

---

<div class="post-metadata">

**Author:** ![pmneve](https://discuss.appium.io/user_avatar/discuss.appium.io/pmneve/32/841_2.png) [@pmneve](https://discuss.appium.io/u/pmneve)\
**Post date:** [April 8, 2015, 12:05am UTC](https://discuss.appium.io/t/how-can-i-pass-browser-arguments-using-ruby/3663/3 "2015-04-08T00:05:53Z")

</div>

Super! Will give that a try!

---

<div class="post-metadata">

**Author:** ![pmneve](https://discuss.appium.io/user_avatar/discuss.appium.io/pmneve/32/841_2.png) [@pmneve](https://discuss.appium.io/u/pmneve)\
**Post date:** [April 17, 2015, 5:48pm UTC](https://discuss.appium.io/t/how-can-i-pass-browser-arguments-using-ruby/3663/4 "2015-04-17T17:48:21Z")

</div>

Thanks! That does it!
