-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestNgFramework7.java
More file actions
31 lines (29 loc) · 846 Bytes
/
TestNgFramework7.java
File metadata and controls
31 lines (29 loc) · 846 Bytes
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
package TestNg;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.asserts.SoftAssert;
import org.testng.Assert;
import org.testng.annotations.Test;
import io.github.bonigarcia.wdm.WebDriverManager;
public class TestNgFramework7 {
WebDriver driver;
@Test
public void launchbrowser() throws InterruptedException {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
driver.manage().window().maximize();
}
@Test
public void verifythetitle() {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
driver.get("https://www.google.com/");
Assert.assertEquals("Google", driver.getTitle());
}
@Test
public void closethebrowser() {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
driver.close();
}
}