package com.seleniumWebdriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/**
* @Blog Name : Selenium Code Example
* @author Deepak Gupta
* @Created Date 4-08-2017
*
*/
public class GetCurrentURL extends SuperTestNG {
@Test
public void handleGetCurrentURLExample() {
try {
driver.get("http://www.google.com");
System.out.println("Current URL: " + driver.getCurrentUrl());
Thread.sleep(2000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/**
* @Blog Name : Selenium Code Example
* @author Deepak Gupta
* @Created Date 4-08-2017
*
*/
public class GetCurrentURL extends SuperTestNG {
@Test
public void handleGetCurrentURLExample() {
try {
driver.get("http://www.google.com");
System.out.println("Current URL: " + driver.getCurrentUrl());
Thread.sleep(2000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
No comments:
Post a Comment