Can someone let me know why it stops execute after the first @test(priority=1)? It ran the @beforeclass, then @test(priority 1) then @aftermethod. So it skipped @test(prority=2) and @test(priority=3)
public class SDSearchTest {
private WebDriver driver;
private String baseUrl= "website";
ExtentReports report;
ExtentTest test;
@BeforeClass
public void beforeClass() {
driver = new FirefoxDriver();
driver.get(baseUrl);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.manage().window().maximize();
}
@Test(priority=1)
public void sdLogin() {
//enter username and password
}
@Test(priority=2)
public void testDocument() throws Exception {
//find the element 1, enter data and drag and drop
}
@Test(priority=3)
public void pheWastesting() {
//find the element 2, enter data and drag and drop
}
@AfterMethod
public void tearDown(ITestResult testResult) throws IOException {
driver.quit();
}
}