cheezy/page-object — Issue #39: page_url and relative/short URLs
Author: snscaimito
Created: 2011-12-07 20:51:37+00:00
State: open

I have tried to use relative URLs and short URLs with page_url. It does not work. Looking inside I found that it seems to be a limitation of the goto method in Watir-Webdriver. It checks for "://" in the given URL and if it isn't there, it prepends it with "http://". So "mypage.do" becomes "http://mypage.do".

Is there anything that can be done in page object to overcome this?

The issue came up in the following context. There is a website that is installed on different URLs where functionality changes based on logged in user and site URL. The team wanted to use the same page object for the same page on the different sites.