Unreachable page URL is not getting in karate

Viewed 21

I am trying to get the access code from the url, but in my scenario after clicking on submit button, the URL is unreachable(redirected to localhost/).So url is not coming due to unreachable page, i had tried both the following ways to get the url but no luck.

    * waitForUrl('/verified')
    * def actualUrl = driver.url

is there any alternative for this?

1 Answers

Eventually nothing was helping me in this so got the text from body tag and from there i fetched the required code.

  • def item = text("//body[@id='test']/script[1]")

In case this may help some one.

Related