import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Cookies {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.co.in/");
System.out.println("cookies before delete: "+driver.manage().getCookies());
driver.manage().deleteAllCookies(); //
System.out.println("cookies after delete: "+driver.manage().getCookies());
}
}
import org.openqa.selenium.firefox.FirefoxDriver;
public class Cookies {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.co.in/");
System.out.println("cookies before delete: "+driver.manage().getCookies());
driver.manage().deleteAllCookies(); //
System.out.println("cookies after delete: "+driver.manage().getCookies());
}
}
No comments:
Post a Comment