Fixed syntax error and added xpath to login button

This commit is contained in:
Dirk Jahnke 2019-07-25 11:47:33 +02:00
parent f603c5dc21
commit 833d86e27d
1 changed files with 1 additions and 2 deletions

View File

@ -31,10 +31,9 @@ public class BasicTest {
@Test @Test
public void verifyLoginAsSystemUser() { public void verifyLoginAsSystemUser() {
driver.navigate().to(URL); driver.navigate().to(URL);
WebElement element =
driver.findElement(By.name("name")).sendKeys("system"); driver.findElement(By.name("name")).sendKeys("system");
driver.findElement(By.name("password")).sendKeys("system"); driver.findElement(By.name("password")).sendKeys("system");
driver.submit(); driver.findElement(By.name("doLogin")).submit();
driver.switchTo().frame("oben"); driver.switchTo().frame("oben");
String versionInfo = driver.findElement(By.xpath("/table/tr/td/b")).getText(); String versionInfo = driver.findElement(By.xpath("/table/tr/td/b")).getText();
String userInfo = driver.findElement(By.xpath("/table/tr/td[3]")).getText(); String userInfo = driver.findElement(By.xpath("/table/tr/td[3]")).getText();