{"action":"created","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/121","repository_url":"https://api.github.com/repos/nightwatchjs/nightwatch","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/121/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/121/events","html_url":"https://github.com/nightwatchjs/nightwatch/issues/121","id":30840647,"number":121,"title":"Question about conditional test parts","user":{"login":"lxanders","id":4414998,"avatar_url":"https://avatars.githubusercontent.com/u/4414998?v=3","gravatar_id":"","url":"https://api.github.com/users/lxanders","html_url":"https://github.com/lxanders","followers_url":"https://api.github.com/users/lxanders/followers","following_url":"https://api.github.com/users/lxanders/following{/other_user}","gists_url":"https://api.github.com/users/lxanders/gists{/gist_id}","starred_url":"https://api.github.com/users/lxanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxanders/subscriptions","organizations_url":"https://api.github.com/users/lxanders/orgs","repos_url":"https://api.github.com/users/lxanders/repos","events_url":"https://api.github.com/users/lxanders/events{/privacy}","received_events_url":"https://api.github.com/users/lxanders/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":48,"created_at":"2014-04-04T07:57:11Z","updated_at":"2016-07-03T18:54:21Z","closed_at":null,"body":"Assuming I have a workflow like this:\r\n\r\n1. vist page A\r\n2. check if element B is on the page\r\n    2. yes: go to 3\r\n    2. no: go to 4\r\n3. do something and go back to 2.\r\n4. other steps\r\n\r\nTo implement something like this in a clean way, I'd need something like this:\r\n```js\r\nwaitForElementVisible(myElementSelector, waitTime, false, function (visible) {\r\n    if(visible) {\r\n        doSomething();\r\n    }\r\n});\r\n```\r\n\r\nThe main difference is the boolean `visible` for the callback, which enables me to react according to this condition.\r\n\r\nIs this already possible with another method that I missed? Using e.g. `getValue` and this sort of methods has the disadvantage that they don't have the waiting behavior."},"comment":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/comments/230169070","html_url":"https://github.com/nightwatchjs/nightwatch/issues/121#issuecomment-230169070","issue_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/121","id":230169070,"user":{"login":"boetnet","id":7052112,"avatar_url":"https://avatars.githubusercontent.com/u/7052112?v=3","gravatar_id":"","url":"https://api.github.com/users/boetnet","html_url":"https://github.com/boetnet","followers_url":"https://api.github.com/users/boetnet/followers","following_url":"https://api.github.com/users/boetnet/following{/other_user}","gists_url":"https://api.github.com/users/boetnet/gists{/gist_id}","starred_url":"https://api.github.com/users/boetnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boetnet/subscriptions","organizations_url":"https://api.github.com/users/boetnet/orgs","repos_url":"https://api.github.com/users/boetnet/repos","events_url":"https://api.github.com/users/boetnet/events{/privacy}","received_events_url":"https://api.github.com/users/boetnet/received_events","type":"User","site_admin":false},"created_at":"2016-07-03T18:54:21Z","updated_at":"2016-07-03T18:54:21Z","body":"+1 to be able to flag certain actions as optional so that their failure does mark the test as \"failed\".\r\n\r\nGhostInspector.com allows users to flag steps as optional. The reporting flag the test as sucessfull even if that particular step does not success. It is very handy.\r\n![image](https://cloud.githubusercontent.com/assets/7052112/16547061/c52d9c10-415f-11e6-8f54-6740c109be87.png)\r\n"}}
{"actor":{"display_login":"boetnet"}}