I am trying to access site with https and SSO enabled. I have passed userid and password in URL itself but that is not working on chrome browser.
I have observed that there is kind of token in the url which is getting added in between url. THis token is new for eveytime you access the url.
What I think will work here is .. access the url -> which will add a new token in url -> authentication popup will come -> i will then get the current url (with current token) -> driver.get this fetched url
I have tried this manually and its working fine..
Can someone please help me in getting the current url value when authentication popup is still open since for me the control is not moving to next line with below code.
public static void main(String[] args) throws InterruptedException, AWTException {
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("url_without_token");
// here authentication will come and url is updated with token
String currentURL = driver.getCurrentUrl();
System.out.println(currentURL);
driver.get(currentURL);
}