forked from ajay-cs/selenium_code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNewTest.java
More file actions
32 lines (25 loc) · 818 Bytes
/
NewTest.java
File metadata and controls
32 lines (25 loc) · 818 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
32
package testNG_demo;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
public class NewTest {
@Test
public void verifyurl() {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver", "geckodriver.exe");
FirefoxDriver driver = new FirefoxDriver();
driver.get("https://www.edureka.co/");
String x = driver.getCurrentUrl();
System.out.println(x);
Assert.assertEquals(x, "https://www.edureka.co/");
}
@Test
public void verifytitle() {
System.setProperty("webdriver.gecko.driver", "geckodriver.exe");
FirefoxDriver driver = new FirefoxDriver();
driver.get("https://www.edureka.co/");
String x = driver.getTitle();
System.out.println(x);
Assert.assertEquals(x, x);
}
}