{"action":"created","issue":{"url":"https://api.github.com/repos/sclevine/agouti/issues/59","labels_url":"https://api.github.com/repos/sclevine/agouti/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/sclevine/agouti/issues/59/comments","events_url":"https://api.github.com/repos/sclevine/agouti/issues/59/events","html_url":"https://github.com/sclevine/agouti/issues/59","id":107606825,"number":59,"title":"Loading Chrome extensions","user":{"login":"mattetti","id":113,"avatar_url":"https://avatars.githubusercontent.com/u/113?v=3","gravatar_id":"","url":"https://api.github.com/users/mattetti","html_url":"https://github.com/mattetti","followers_url":"https://api.github.com/users/mattetti/followers","following_url":"https://api.github.com/users/mattetti/following{/other_user}","gists_url":"https://api.github.com/users/mattetti/gists{/gist_id}","starred_url":"https://api.github.com/users/mattetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattetti/subscriptions","organizations_url":"https://api.github.com/users/mattetti/orgs","repos_url":"https://api.github.com/users/mattetti/repos","events_url":"https://api.github.com/users/mattetti/events{/privacy}","received_events_url":"https://api.github.com/users/mattetti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-21T21:55:46Z","updated_at":"2015-09-22T00:11:39Z","closed_at":null,"body":"Hey Steven, I'm trying to find a way to load chrome extensions into the chromedriver so I can run tests with an ad-blocker extension but unfortunately I can't figure out how to.\r\n\r\nAccording to this SO entry: http://stackoverflow.com/questions/16800689/running-webdriver-with-extensions-crx-files I should be able to do something like:\r\n\r\n```\r\nchop = webdriver.ChromeOptions()\r\nchop.add_extension('Adblock-Plus_v1.4.1.crx')\r\ndriver = webdriver.Chrome(chrome_options = chop)\r\n```\r\n\r\nIt looks like I might have to use `api.NewWebDriver` and pass the command by hand, but I'm not quite sure."},"comment":{"url":"https://api.github.com/repos/sclevine/agouti/issues/comments/142143533","html_url":"https://github.com/sclevine/agouti/issues/59#issuecomment-142143533","issue_url":"https://api.github.com/repos/sclevine/agouti/issues/59","id":142143533,"user":{"login":"sclevine","id":1848837,"avatar_url":"https://avatars.githubusercontent.com/u/1848837?v=3","gravatar_id":"","url":"https://api.github.com/users/sclevine","html_url":"https://github.com/sclevine","followers_url":"https://api.github.com/users/sclevine/followers","following_url":"https://api.github.com/users/sclevine/following{/other_user}","gists_url":"https://api.github.com/users/sclevine/gists{/gist_id}","starred_url":"https://api.github.com/users/sclevine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sclevine/subscriptions","organizations_url":"https://api.github.com/users/sclevine/orgs","repos_url":"https://api.github.com/users/sclevine/repos","events_url":"https://api.github.com/users/sclevine/events{/privacy}","received_events_url":"https://api.github.com/users/sclevine/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T00:11:39Z","updated_at":"2015-09-22T00:11:39Z","body":"Hey Matt,\r\n\r\nI haven't tried this before, but you should be able to do this with the `agouti.Desired` `Option`.\r\nTry this:\r\n```go\r\nwebDriver := agouti.ChromeDriver(agouti.Desired(agouti.Capabilities{\r\n    // NOTE: relying on json.Marshal to convert []byte to base64\r\n    \"chromeOptions\": map[string][][]byte{ \r\n        \"extensions\": {getCRXBytesFromFile()},\r\n    }\r\n}))\r\n...\r\n```\r\nSee: https://sites.google.com/a/chromium.org/chromedriver/capabilities\r\n\r\nLet me know if this helps! "}}