{"action":"created","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1156","repository_url":"https://api.github.com/repos/nightwatchjs/nightwatch","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1156/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1156/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1156/events","html_url":"https://github.com/nightwatchjs/nightwatch/pull/1156","id":172159545,"number":1156,"title":"[MERGE AFTER #1155] Add support for page object-formatted object-based selectors","user":{"login":"senocular","id":3536716,"avatar_url":"https://avatars.githubusercontent.com/u/3536716?v=3","gravatar_id":"","url":"https://api.github.com/users/senocular","html_url":"https://github.com/senocular","followers_url":"https://api.github.com/users/senocular/followers","following_url":"https://api.github.com/users/senocular/following{/other_user}","gists_url":"https://api.github.com/users/senocular/gists{/gist_id}","starred_url":"https://api.github.com/users/senocular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senocular/subscriptions","organizations_url":"https://api.github.com/users/senocular/orgs","repos_url":"https://api.github.com/users/senocular/repos","events_url":"https://api.github.com/users/senocular/events{/privacy}","received_events_url":"https://api.github.com/users/senocular/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-19T15:37:24Z","updated_at":"2016-09-16T20:28:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/pulls/1156","html_url":"https://github.com/nightwatchjs/nightwatch/pull/1156","diff_url":"https://github.com/nightwatchjs/nightwatch/pull/1156.diff","patch_url":"https://github.com/nightwatchjs/nightwatch/pull/1156.patch"},"body":"Partial of #1116 (3 of 4) - dependent on first merging #1155\r\n\r\nAdds support for optional, object-based selector values in commands using the format used by page elements.  ex:\r\n\r\n```js\r\n// before:\r\nbrowser.getText('#foo', function(result){});\r\n\r\n// now (optionally):\r\nbrowser.getText({selector:'#foo', locateStrategy:'css selector'}, function(result){});\r\n```\r\n\r\n- This new implementation reduces complexity around page command wrapping.  We no longer need to track and restore the locate strategy because its encoded directly within the selector; the callbacks are no longer wrapped.  This should presumably fix (could use verification from submitters): #1142, #1107, #1100, #895\r\n- It opens the selector format up to being more dynamic, such as having additional properties that could potentially further mutate the resulting selector - not unlike with what other PRs/issues (e.g. #821) are doing/suggesting, trying to encode additional data in the selector string.  This is not doing it now, but it wouldn't be hard to add in.\r\n- People can avoid complications with toggling between useCss() or useXpath() if they use locateStrategy directly in selectors as needed.\r\n\r\nPR 4 of 4 includes index support and that can wait until these are in (it modifies a bunch of what's being done here making it even harder to have as a dependent PR like this)"},"comment":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/comments/247701347","html_url":"https://github.com/nightwatchjs/nightwatch/pull/1156#issuecomment-247701347","issue_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1156","id":247701347,"user":{"login":"beatfactor","id":419506,"avatar_url":"https://avatars.githubusercontent.com/u/419506?v=3","gravatar_id":"","url":"https://api.github.com/users/beatfactor","html_url":"https://github.com/beatfactor","followers_url":"https://api.github.com/users/beatfactor/followers","following_url":"https://api.github.com/users/beatfactor/following{/other_user}","gists_url":"https://api.github.com/users/beatfactor/gists{/gist_id}","starred_url":"https://api.github.com/users/beatfactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beatfactor/subscriptions","organizations_url":"https://api.github.com/users/beatfactor/orgs","repos_url":"https://api.github.com/users/beatfactor/repos","events_url":"https://api.github.com/users/beatfactor/events{/privacy}","received_events_url":"https://api.github.com/users/beatfactor/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T20:28:09Z","updated_at":"2016-09-16T20:28:09Z","body":"Ah yes. Would it be possible to merge the other PR into this one?"}}
{"actor":{"display_login":"beatfactor"}}