-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestNgXml3.java
More file actions
42 lines (37 loc) · 1.16 KB
/
TestNgXml3.java
File metadata and controls
42 lines (37 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package TestNg;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
import io.github.bonigarcia.wdm.WebDriverManager;
public class TestNgXml3 {
WebDriver driver;
@Test(priority=1,groups="ReTesting")
public void launchbrowser()
{
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
driver.get("https://www.javatpoint.com/");
driver.manage().window().maximize();
System.out.println("TestCase Passed");
}
@Test(priority=2,groups="Regression")
public void Verifythetitle()
{
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
driver.get("https://www.javatpoint.com/");
driver.manage().window().maximize();
String atitle = driver.getTitle();
Assert.assertEquals("Tutorials List - Javatpoint", atitle);
System.out.println("TestCase Passed");
}
@Test(priority=2,groups="Regression")
public void clicktheseleniumsection()
{
driver.get("https://www.javatpoint.com/");
driver.findElement(By.xpath("//*[@id=\"link\"]/div/ul/li[13]")).click();
System.out.println("TestCase Passed");
}
}