{"action":"created","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/549","repository_url":"https://api.github.com/repos/nightwatchjs/nightwatch","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/549/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/549/events","html_url":"https://github.com/nightwatchjs/nightwatch/issues/549","id":93511664,"number":549,"title":"Expect assertions break using before/after methods","user":{"login":"munkyjunky","id":4445179,"avatar_url":"https://avatars.githubusercontent.com/u/4445179?v=3","gravatar_id":"","url":"https://api.github.com/users/munkyjunky","html_url":"https://github.com/munkyjunky","followers_url":"https://api.github.com/users/munkyjunky/followers","following_url":"https://api.github.com/users/munkyjunky/following{/other_user}","gists_url":"https://api.github.com/users/munkyjunky/gists{/gist_id}","starred_url":"https://api.github.com/users/munkyjunky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munkyjunky/subscriptions","organizations_url":"https://api.github.com/users/munkyjunky/orgs","repos_url":"https://api.github.com/users/munkyjunky/repos","events_url":"https://api.github.com/users/munkyjunky/events{/privacy}","received_events_url":"https://api.github.com/users/munkyjunky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"sknopf","id":1311638,"avatar_url":"https://avatars.githubusercontent.com/u/1311638?v=3","gravatar_id":"","url":"https://api.github.com/users/sknopf","html_url":"https://github.com/sknopf","followers_url":"https://api.github.com/users/sknopf/followers","following_url":"https://api.github.com/users/sknopf/following{/other_user}","gists_url":"https://api.github.com/users/sknopf/gists{/gist_id}","starred_url":"https://api.github.com/users/sknopf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sknopf/subscriptions","organizations_url":"https://api.github.com/users/sknopf/orgs","repos_url":"https://api.github.com/users/sknopf/repos","events_url":"https://api.github.com/users/sknopf/events{/privacy}","received_events_url":"https://api.github.com/users/sknopf/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-07-07T11:43:17Z","updated_at":"2016-05-26T19:25:04Z","closed_at":"2015-07-15T22:59:51Z","body":"Addition of the `after` method to my assertions causes an error to be thrown. \r\n\r\nCode:\r\n```{javascript}\r\nvar homepage = browser.page.homepage();\r\nvar navigation = homepage.section.navigation;\r\n/* *** snip *** */\r\nhomepage.expect.section('@navigation').to.be.visible.after(util.timeout);\r\n```\r\n\r\nError:\r\n```\r\nAn error occurred while running the tests:\r\nTypeError: Cannot read property 'ELEMENT' of null\r\n    at VisibleAssertion.executeCommand (C:\\Workspace\\Project\\node_modules\\nightwatch\\lib\\api\\expect\\visible.js:30:54)\r\n    at VisibleAssertion.BaseAssertion.onPromiseResolved (C:\\Workspace\\Project\\node_modules\\nightwatch\\lib\\api\\expect\\_baseAssertion.js:104:8)\r\n    at VisibleAssertion.retryCommand (C:\\Workspace\\Project\\node_modules\\nightwatch\\lib\\api\\expect\\visible.js:55:8)\r\n    at Timer.listOnTimeout (timers.js:119:15)\r\n```\r\n\r\nRemoving the `after` method prevents this error from occurring, however my test fails (as expected in that case, as the element is not visible). What I'm trying to achieve with my test: \r\n- load page\r\n- click an element\r\n- expect the navigation section to appear within 30s (the above code)\r\n- click an element within the navigation section \r\n\r\nChanging the section declaration for just an element causes the same error. I suspect this error is happening as I'm expecting a section of a page to become visible that at the initial time of assertion is not on the page. Switching to `browser.waitForElementVisible` allows me to complete the test, so I think this is an issue within the `expect` API.\r\n\r\nCan't post the full test due to this being a work project."},"comment":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/comments/221969294","html_url":"https://github.com/nightwatchjs/nightwatch/issues/549#issuecomment-221969294","issue_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/549","id":221969294,"user":{"login":"munkyjunky","id":4445179,"avatar_url":"https://avatars.githubusercontent.com/u/4445179?v=3","gravatar_id":"","url":"https://api.github.com/users/munkyjunky","html_url":"https://github.com/munkyjunky","followers_url":"https://api.github.com/users/munkyjunky/followers","following_url":"https://api.github.com/users/munkyjunky/following{/other_user}","gists_url":"https://api.github.com/users/munkyjunky/gists{/gist_id}","starred_url":"https://api.github.com/users/munkyjunky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munkyjunky/subscriptions","organizations_url":"https://api.github.com/users/munkyjunky/orgs","repos_url":"https://api.github.com/users/munkyjunky/repos","events_url":"https://api.github.com/users/munkyjunky/events{/privacy}","received_events_url":"https://api.github.com/users/munkyjunky/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T19:25:04Z","updated_at":"2016-05-26T19:25:04Z","body":"Opened new issue #997 "}}
{"actor":{"display_login":"munkyjunky"}}