{"action":"closed","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1034","repository_url":"https://api.github.com/repos/nightwatchjs/nightwatch","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1034/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1034/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/1034/events","html_url":"https://github.com/nightwatchjs/nightwatch/issues/1034","id":161380603,"number":1034,"title":"Loading of different URLs w/ PageObjects fails","user":{"login":"davidlinse","id":291518,"avatar_url":"https://avatars.githubusercontent.com/u/291518?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlinse","html_url":"https://github.com/davidlinse","followers_url":"https://api.github.com/users/davidlinse/followers","following_url":"https://api.github.com/users/davidlinse/following{/other_user}","gists_url":"https://api.github.com/users/davidlinse/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlinse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlinse/subscriptions","organizations_url":"https://api.github.com/users/davidlinse/orgs","repos_url":"https://api.github.com/users/davidlinse/repos","events_url":"https://api.github.com/users/davidlinse/events{/privacy}","received_events_url":"https://api.github.com/users/davidlinse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-21T08:49:39Z","updated_at":"2016-07-30T20:41:36Z","closed_at":"2016-07-30T20:41:36Z","body":"I think there might be an unexpected behavior when one attempts to load different URLs with a Page-Object. Please see the following two examples.\r\n\r\n```\r\nmodule.exports = {\r\n  after: function(browser) {\r\n    browser.end();\r\n  },\r\n\r\n  // works as expected\r\n  'Attempt to load multiple pages with browser': '' + function(browser) {\r\n\r\n    browser\r\n      .url('http://nightwatchjs.org')\r\n      .waitForElementPresent('body', 10000)\r\n      .assert.urlContains('nightwatchjs.org')\r\n\r\n      .url('http://golem.de')\r\n      .waitForElementPresent('body', 10000)\r\n      .assert.urlContains('golem.de')\r\n\r\n      .url('http://github.com')\r\n      .waitForElementPresent('body', 10000)\r\n      .assert.urlContains('github.com');\r\n  },\r\n\r\n// fails gracefully\r\n'Attempt to load multiple pages w/ page objects': function(browser) {\r\n\r\n    var page = browser.page.Google();\r\n\r\n    page\r\n      .navigate()  // http://google.com set as url property in page-object\r\n      .waitForElementPresent('body', 10000)\r\n      .assert.urlContains('google.com')\r\n      .api.perform(function() {\r\n        page.url = function() { return 'http://nightwatchjs.org'; };\r\n      });\r\n\r\n    page\r\n      .navigate()\r\n      .waitForElementPresent('body', 10000)\r\n      .assert.urlContains('nightwatchjs.org')\r\n\r\n      .api.perform(function() {\r\n        page.url = 'http://github.com';\r\n      })\r\n      .waitForElementPresent('body', 10000)\r\n      .assert.urlContains('github.com');\r\n  }\r\n};\r\n```\r\n\r\nI could not find a way to update the `url` property of a page-object.\r\n@beatfactor maybe you can shed some light ?\r\n\r\nregards\r\n~david\r\n"}}
{"actor":{"display_login":"beatfactor"}}