Debugging login
This commit is contained in:
parent
33b524adbe
commit
d0079e81a5
|
@ -71,31 +71,28 @@ public class BasicTest {
|
|||
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/tbody/tr/td/div")).getText();
|
||||
//String scaleInfo = driver.findElement(By.xpath("/table[@class='loginall']/tbody/tr/td/div")).getText();
|
||||
//String scaleInfo = driver.findElement(By.xpath("//table/tbody/tr/td/div")).getText();
|
||||
String scaleInfo = driver.findElement(By.xpath("//table[@class='loginall']/tbody/tr/td/div")).getText();
|
||||
System.out.println("Scale: " + scaleInfo);
|
||||
|
||||
driver.findElement(By.name("login")).sendKeys("system");
|
||||
driver.findElement(By.name("password")).sendKeys("system");
|
||||
driver.findElement(By.xpath("//input[@name='login']")).sendKeys("system");
|
||||
driver.findElement(By.xpath("//input[@name='password']")).sendKeys("system");
|
||||
loginButton.click();
|
||||
|
||||
//driver.findElement(By.xpath("//input[@name='login']")).sendKeys("system");
|
||||
//driver.findElement(By.xpath("//input[@name='password']")).sendKeys("system");
|
||||
//driver.findElement(By.xpath("//input[@name='doLogin']")).submit();
|
||||
//wait.until(ExpectedConditions.ElementIsVisible(By.xpath("//input[@class='menu'][0]"));
|
||||
//wait.until(ExpectedConditions.ElementIsVisible(By.className("menu")));
|
||||
String expectedTitle = "FreDL";
|
||||
wait.until(ExpectedConditions.titleIs(expectedTitle));
|
||||
|
||||
//driver.switchTo().frame("oben");
|
||||
String frameObenName = "oben";
|
||||
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName));
|
||||
|
||||
String versionInfo = driver.findElement(By.xpath("/table/tr/td/b")).getText();
|
||||
String userInfo = driver.findElement(By.xpath("/table/tr/td[3]")).getText();
|
||||
String versionInfo = driver.findElement(By.xpath("//table/tr/td/b")).getText();
|
||||
String userInfo = driver.findElement(By.xpath("//table/tr/td[2]")).getText();
|
||||
System.out.println("Version info found: " + versionInfo);
|
||||
System.out.println("User info found: " + userInfo);
|
||||
|
||||
driver.switchTo().frame("rechts");
|
||||
String welcomeMessage = driver.findElement(By.xpath("/h1")).getText();
|
||||
String welcomeMessage = driver.findElement(By.xpath("//body/h1")).getText();
|
||||
System.out.println("Welcome message is: " + welcomeMessage);
|
||||
Assert.assertEquals(welcomeMessage, "Willkommen bei FreDL");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue