{"action":"created","issue":{"url":"https://api.github.com/repos/johntitus/node-horseman/issues/152","repository_url":"https://api.github.com/repos/johntitus/node-horseman","labels_url":"https://api.github.com/repos/johntitus/node-horseman/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/johntitus/node-horseman/issues/152/comments","events_url":"https://api.github.com/repos/johntitus/node-horseman/issues/152/events","html_url":"https://github.com/johntitus/node-horseman/issues/152","id":146018367,"number":152,"title":"Ability to extend Horseman actions","user":{"login":"lukaszblacha","id":2010673,"avatar_url":"https://avatars.githubusercontent.com/u/2010673?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaszblacha","html_url":"https://github.com/lukaszblacha","followers_url":"https://api.github.com/users/lukaszblacha/followers","following_url":"https://api.github.com/users/lukaszblacha/following{/other_user}","gists_url":"https://api.github.com/users/lukaszblacha/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaszblacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaszblacha/subscriptions","organizations_url":"https://api.github.com/users/lukaszblacha/orgs","repos_url":"https://api.github.com/users/lukaszblacha/repos","events_url":"https://api.github.com/users/lukaszblacha/events{/privacy}","received_events_url":"https://api.github.com/users/lukaszblacha/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/johntitus/node-horseman/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-05T15:06:24Z","updated_at":"2016-04-05T15:09:20Z","closed_at":null,"body":"This is an enhancement suggestion. I'd really love the ability to extend Horseman API with user defined actions. It comes in handy when dealing with repetitive tests.\r\n\r\nThe interface could look like this:\r\n```javascript\r\nHorseman.registerAction('injectCssFiles', function(css) {\r\n    return this.evaluate(function(css) {\r\n        // function body\r\n    }, css);\r\n});\r\n```\r\n\r\nThe implementation would add this action to both Horseman and HorsemanPromise prototypes.\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/johntitus/node-horseman/issues/comments/205850272","html_url":"https://github.com/johntitus/node-horseman/issues/152#issuecomment-205850272","issue_url":"https://api.github.com/repos/johntitus/node-horseman/issues/152","id":205850272,"user":{"login":"awlayton","id":4231765,"avatar_url":"https://avatars.githubusercontent.com/u/4231765?v=3","gravatar_id":"","url":"https://api.github.com/users/awlayton","html_url":"https://github.com/awlayton","followers_url":"https://api.github.com/users/awlayton/followers","following_url":"https://api.github.com/users/awlayton/following{/other_user}","gists_url":"https://api.github.com/users/awlayton/gists{/gist_id}","starred_url":"https://api.github.com/users/awlayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awlayton/subscriptions","organizations_url":"https://api.github.com/users/awlayton/orgs","repos_url":"https://api.github.com/users/awlayton/repos","events_url":"https://api.github.com/users/awlayton/events{/privacy}","received_events_url":"https://api.github.com/users/awlayton/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T15:09:20Z","updated_at":"2016-04-05T15:09:20Z","body":"I had considered adding something like that, but I didn't know if anyone would use it. Since I'm not the only one, I will add it to the todo list."}}