sridhar249
2 years agoOccasional Contributor
Get current url of the page for a headless test
I am able to launch a headless test using the following method.
function openBrowser()
{
var server = "localhost";
var capabilities = {
"browserName": "chrome",
"screenResolution": "1920x1080"
};
Browsers.RemoteItem(server, capabilities).Run("https://www.google.com/");
}
I would like to fetch the url of the current page some where during the testflow. How do i get that for a headless test?
I was hoping something like shown below, but could n't get it working.
Browsers.RemoteItem(server, capabilities).Page('*').URL
Thank you.