I want to know how can copy the "?ned=us&topic=t" part in "http://news.google.com/?ned=us&topic=t". Basically, I want to copy the path of the url, or the portion after the ".com". How do I do this?
public class Example {
public static String url = "http://news.google.com/?ned=us&topic=t";
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get(url);
WebElement reportCln=driver.findElement(By.id("id_submit_button"));
String path=driver.getCurrentUrl();
System.out.println(path);
}
}