Debugging login

This commit is contained in:
Dirk Jahnke 2019-07-25 15:45:05 +02:00
parent 90382a6a6c
commit 9d2065993b
1 changed files with 5 additions and 4 deletions

View File

@ -58,8 +58,6 @@ public class BasicTest {
public void verifyLoginAsSystemUser() { public void verifyLoginAsSystemUser() {
driver.navigate().to(URL); driver.navigate().to(URL);
System.out.println("Navigate to: " + URL); System.out.println("Navigate to: " + URL);
// String body = driver.getPageSource();
// System.out.println("HTML: " + body);
if (elementExistsById("privacy-cookie-statement")) { if (elementExistsById("privacy-cookie-statement")) {
System.out.println("Cookies consent page is shown"); System.out.println("Cookies consent page is shown");
@ -67,8 +65,11 @@ public class BasicTest {
consentButton.click(); consentButton.click();
} }
// WebElement loginButton = wait.until(ExpectedConditions.elementToBeClickable(By.name("doLogin"))); String body = driver.getPageSource();
WebElement loginButton = wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name("doLogin")))); System.out.println("HTML: " + body);
WebElement loginButton = wait.until(ExpectedConditions.elementToBeClickable(By.name("doLogin")));
// WebElement loginButton = wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name("doLogin"))));
String scaleInfo = driver.findElement(By.xpath("/table[@class='loginall']/tr/td[0]/div")).getText(); String scaleInfo = driver.findElement(By.xpath("/table[@class='loginall']/tr/td[0]/div")).getText();
System.out.println("Scale: " + scaleInfo); System.out.println("Scale: " + scaleInfo);