Is there a way to get the current URL in the browser's address bar? Is there any replacement for the following code which does not work, perhaps as mentioned here:
And def url = function() {return window.location.href}
Then print url()
Is there a way to get the current URL in the browser's address bar? Is there any replacement for the following code which does not work, perhaps as mentioned here:
And def url = function() {return window.location.href}
Then print url()
Yes driver.url is what you are looking for: https://github.com/intuit/karate/tree/master/karate-core#driverurl
* match driver.url == 'https://some/url'
Note that to avoid flaky tests, this may be better:
* waitForUrl('https://some/url')