diff --git a/oxd-common/src/test/java/org/gluu/oxd/common/SeleniumTestUtils.java b/oxd-common/src/test/java/org/gluu/oxd/common/SeleniumTestUtils.java index 6b0f4240..3a4f2aea 100644 --- a/oxd-common/src/test/java/org/gluu/oxd/common/SeleniumTestUtils.java +++ b/oxd-common/src/test/java/org/gluu/oxd/common/SeleniumTestUtils.java @@ -49,7 +49,6 @@ private static AuthorizationResponse loginGluuServer( //navigate to opHost String authzUrl = getAuthorizationUrl(authenticationDetails, responseTypes, scopes); - System.out.println(authzUrl); driver.navigate().to(authzUrl); //driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); @@ -84,43 +83,6 @@ public WebElement apply(WebDriver d) { } - /*private static AuthorizationResponse acceptAuthorization(WebDriver driver) { - String authorizationResponseStr = driver.getCurrentUrl(); - AuthorizationResponse authorizationResponse = null; - // Check for authorization form if client has no persistent authorization - if (!authorizationResponseStr.contains("#")) { - Wait wait = new FluentWait(driver) - .withTimeout(Duration.ofSeconds(WAIT_OPERATION_TIMEOUT)) - .pollingEvery(Duration.ofMillis(500)) - .ignoring(NoSuchElementException.class); - - WebElement allowButton = wait.until(new Function() { - public WebElement apply(WebDriver d) { - //System.out.println(d.getCurrentUrl()); - //System.out.println(d.getPageSource()); - return d.findElement(By.id("authorizeForm:allowButton")); - } - }); - - // We have to use JavaScript because target is link with onclick - JavascriptExecutor jse = (JavascriptExecutor) driver; - jse.executeScript("scroll(0, 1000)"); - - String previousURL = driver.getCurrentUrl(); - - Actions actions = new Actions(driver); - actions.click(allowButton).perform(); - - authorizationResponseStr = driver.getCurrentUrl(); - authorizationResponse = new AuthorizationResponse(authorizationResponseStr); - - LOG.info("Authorization Response url is: " + driver.getCurrentUrl()); - } else { - fail("The authorization form was expected to be shown."); - } - return authorizationResponse; - }*/ - private static WebDriver initWebDriver(boolean enableJavascript, boolean cleanupCookies) { WebDriver currentDriver = new HtmlUnitDriver(); ((HtmlUnitDriver) currentDriver).setJavascriptEnabled(enableJavascript); diff --git a/oxd-server/src/test/java/org/gluu/oxd/server/Tester.java b/oxd-server/src/test/java/org/gluu/oxd/server/Tester.java index 6672c44b..16131dbd 100644 --- a/oxd-server/src/test/java/org/gluu/oxd/server/Tester.java +++ b/oxd-server/src/test/java/org/gluu/oxd/server/Tester.java @@ -66,11 +66,6 @@ public static String getAuthorization(RegisterSiteResponse site) { params.setOpHost(site.getOpHost()); params.setClientId(site.getClientId()); params.setClientSecret(site.getClientSecret()); - System.out.println("========================================================"+site.getOpHost()); - System.out.println("========================================================"+site.getClientId()); - System.out.println("========================================================"+site.getClientSecret()); - System.out.println("========================================================"+HOST); - System.out.println("========================================================"+params.toString()); GetClientTokenResponse resp = Tester.newClient(HOST).getClientToken(params); assertNotNull(resp); assertTrue(!Strings.isNullOrEmpty(resp.getAccessToken()));