{"action":"closed","issue":{"url":"https://api.github.com/repos/admc/wd/issues/347","labels_url":"https://api.github.com/repos/admc/wd/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/admc/wd/issues/347/comments","events_url":"https://api.github.com/repos/admc/wd/issues/347/events","html_url":"https://github.com/admc/wd/issues/347","id":43020898,"number":347,"title":"PhantomJs and FirefoxProfile capabilities","user":{"login":"slyder","id":424803,"avatar_url":"https://avatars.githubusercontent.com/u/424803?v=3","gravatar_id":"","url":"https://api.github.com/users/slyder","html_url":"https://github.com/slyder","followers_url":"https://api.github.com/users/slyder/followers","following_url":"https://api.github.com/users/slyder/following{/other_user}","gists_url":"https://api.github.com/users/slyder/gists{/gist_id}","starred_url":"https://api.github.com/users/slyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slyder/subscriptions","organizations_url":"https://api.github.com/users/slyder/orgs","repos_url":"https://api.github.com/users/slyder/repos","events_url":"https://api.github.com/users/slyder/events{/privacy}","received_events_url":"https://api.github.com/users/slyder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/admc/wd/labels/Triage","name":"Triage","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-09-17T14:52:15Z","updated_at":"2015-04-21T14:00:25Z","closed_at":"2015-04-21T14:00:25Z","body":"Hello, could you please help to understand how i could make next issues:\r\n\r\n- Set FirefoxProfile capabilities. I am using next code below but i have no success.\r\n```\r\n\tvar capabilities = {browserName: argv.d || 'phantomjs'};\r\n\tif (capabilities.browserName === 'firefox') {\r\n\t\tvar FirefoxProfile = require('firefox-profile');\r\n\t\tvar myProfile = new FirefoxProfile();\r\n\t\tmyProfile.setPreference('permissions.default.image', 2); // block all images\r\n\t\tmyProfile.setPreference('plugins.click_to_play', true);\r\n\t\tmyProfile.setPreference('plugins.notifyMissingFlash', false);\r\n\t\tmyProfile.updatePreferences();\t\t\r\n\t\tmyProfile.encoded(function(encodedProfile) {\r\n\t\t\tbrowser\r\n\t\t\t\t.init(capabilities)\r\n\t\t\t\t....\r\n\t\t});\r\n```\r\n\r\n- PhantomJs have a lot of different features. For example onResourceRequested  method:\r\n```\r\npage.onResourceRequested = function(request, net) {\r\n    if (request.url.indexOf('http://example.com/') === 0)\r\n        net.abort();\r\n};\r\n```\r\nis there any way add this event handler via WD?"}}