You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: get user token
#visit authorize url and it will redirect to the login page
Given driver "http://my-auth-server.com/authorizationserver/oauth/authorize?response_type=code&client_id=myClient"
And driver.maximize()
#wait login page load successfully and input user name password
And waitFor("//input[@type='submit']")
And input("//input[@name='username']", "[email protected]")
And input("//input[@name='password']", "pwd")
#click login button and it will redirect to http://localhost:9001/authorizationserver/oauth2_callback?code=r_j1Y2EGEddYmMxxgzAPPAdia_vZwr
And click("//input[@type='submit' and @value='Sign in']")
And delay(3000)
* karate.log("currentUrl1:",script("window.location.href"))
* karate.log("currentUrl2:", driver.url)
The text was updated successfully, but these errors were encountered:
I'm using OAuth2 Authorization Code, when submit the login page, it will redicret to an unreachable URL (eg:http://localhost:9001/authorizationserver/oauth2_callback?code=r_j1Y2EGEddYmMxxgzAPPAdia_vZwr)
I tried driver.url and window.location.href, but no one work. Both of them return "chrome-error://chromewebdata/"
Here are the sample codes
The text was updated successfully, but these errors were encountered: