Hello all,
I am using Selenium with Eclipse and attempting to execute a script with TestNG. I am trying to call a method, then add actions to that method. I am not sure exactly how to do this, can someone please provide some insight or tell me how to correct this issue? The method I created is "login();", and I am calling it in another class, but cannot add to it. The method will execute but nothing else after it will execute. Thank you.
package PK1;
import
org.openqa.selenium.By;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class Userlogin extends TestBase {
public class IAC_Search {
@Test
void login() {
driver.get(prop.getProperty("url"));
driver.findElement(By.xpath("//*[@id=\"content\"]/div[3]/div[1]/div/div[2]/form/button")).click();
driver.findElement(By.xpath("/html//input[@id='username']")).sendKeys(prop.getProperty("username"));
driver.findElement(By.xpath("/html//input[@id='password']")).sendKeys(prop.getProperty("password"));
driver.findElement(By.xpath("/html//form[@id='loginData']//input[@value='I AGREE']")).click();
}
}
}