Login procedure completed
This commit is contained in:
parent
daf5831c4b
commit
07e7c4fd32
|
@ -81,15 +81,15 @@ public class BasicTest {
|
|||
String expectedTitle = "FreDL";
|
||||
wait.until(ExpectedConditions.titleIs(expectedTitle));
|
||||
|
||||
body = driver.getPageSource();
|
||||
System.out.println("HTML: " + body);
|
||||
//body = driver.getPageSource();
|
||||
//System.out.println("HTML: " + body);
|
||||
|
||||
//driver.switchTo().frame("oben");
|
||||
String frameObenName = "oben";
|
||||
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(frameObenName));
|
||||
|
||||
body = driver.getPageSource();
|
||||
System.out.println("HTML: " + body);
|
||||
//body = driver.getPageSource();
|
||||
//System.out.println("HTML: " + body);
|
||||
|
||||
String versionInfo = driver.findElement(By.xpath("//table[1]/tbody/tr/td[1]/b")).getText();
|
||||
String userInfo = driver.findElement(By.xpath("//table[1]/tbody/tr/td[3]")).getText();
|
||||
|
@ -99,14 +99,14 @@ public class BasicTest {
|
|||
Assert.assertEquals(userInfo, expectedUserInfo);
|
||||
|
||||
driver.switchTo().parentFrame();
|
||||
//driver.switchTo().frame(1); // nested frameset
|
||||
String frameRechtsName = "rechts";
|
||||
driver.switchTo().frame(frameRechtsName);
|
||||
body = driver.getPageSource();
|
||||
System.out.println("HTML: " + body);
|
||||
//body = driver.getPageSource();
|
||||
//System.out.println("HTML: " + body);
|
||||
|
||||
String welcomeMessage = driver.findElement(By.xpath("//body/h1")).getText();
|
||||
String expectedWelcomeMessage = "Willkommen bei FreDL";
|
||||
System.out.println("Welcome message is: " + welcomeMessage);
|
||||
Assert.assertEquals(welcomeMessage, "Willkommen bei FreDL");
|
||||
Assert.assertEquals(welcomeMessage, expectedWelcomeMessage);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue