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')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.