From 96c734e2eb7c9460a01505a4d5793a2f9074a06a Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Thu, 25 Jul 2019 12:00:56 +0200 Subject: [PATCH] Changed find-by-name to xpath --- src/test/java/BasicTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/BasicTest.java b/src/test/java/BasicTest.java index 3192eb1..025261b 100644 --- a/src/test/java/BasicTest.java +++ b/src/test/java/BasicTest.java @@ -31,9 +31,9 @@ public class BasicTest { @Test public void verifyLoginAsSystemUser() { driver.navigate().to(URL); - driver.findElement(By.name("login")).sendKeys("system"); - driver.findElement(By.name("password")).sendKeys("system"); - driver.findElement(By.name("doLogin")).submit(); + 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(); driver.switchTo().frame("oben"); String versionInfo = driver.findElement(By.xpath("/table/tr/td/b")).getText(); String userInfo = driver.findElement(By.xpath("/table/tr/td[3]")).getText();