Skip to content

Commit

Permalink
branch created to check test-casesg
Browse files Browse the repository at this point in the history
Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>
  • Loading branch information
duttarnab committed Mar 24, 2024
1 parent de177db commit a89b0bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Client/src/test/java/org/gluu/oxauth/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -612,14 +612,15 @@ public AuthorizationResponse authorizationRequestAndGrantAccess(
navigateToAuhorizationUrl(driver, authorizationRequestUrl);

String authorizationResponseStr = driver.getCurrentUrl();

System.out.println("authorizationRequestAndGrantAccess: driver.getCurrentUrl():" + driver.getCurrentUrl());
WebElement allowButton = driver.findElement(By.id(authorizeFormAllowButton));

final String previousURL = driver.getCurrentUrl();
System.out.println("authorizationRequestAndGrantAccess: previousURL:" + previousURL);
allowButton.click();

waitForPageSwitch(previousURL);

System.out.println("After wait:");
authorizationResponseStr = driver.getCurrentUrl();
System.out.println("authorizationRequestAndGrantAccess: driver.getPageSource():" + driver.getPageSource());
if (!authorizationResponseStr.startsWith(authorizationRequest.getRedirectUri())) {
Expand Down Expand Up @@ -1035,7 +1036,9 @@ public boolean isTrusted(X509Certificate[] chain, String authType) throws Certif

protected void navigateToAuhorizationUrl(WebDriver driver, String authorizationRequestUrl) {
try {
System.out.println("Inside navigateToAuhorizationUrl: Before navigation");
driver.navigate().to(URLDecoder.decode(authorizationRequestUrl, Util.UTF8_STRING_ENCODING));
System.out.println("Inside navigateToAuhorizationUrl: After navigation");
} catch (UnsupportedEncodingException ex) {
fail("Failed to decode the authorization URL.");
}
Expand Down

0 comments on commit a89b0bb

Please sign in to comment.