I'm trying to use the deleteAllCookies() function from WebDriver from a Protractor test spec.
I've tried:
browser.driver.deleteAllCookies(); // undefined error
browser.driver.options.deleteAllCookies(); // undefined error
browser.manage().deleteAllCookies(); // doesn't seem to be deleting cookies
How do I call/use this function correctly?
Selenium WebDriver interface has many abstract methods like get(String url), quit(), close(), getWindowHandle(), getWindowHandles(), getTitle() etc. WebDriver has nested interfaces like Window , Navigation , Timeouts etc. These nested interfaces are used to perform operations like back(), forward() etc.
Protractor is a wrapper around Selenium Webdriver that provides an automation test framework, which simulates user interaction with an Angular web application for a range of browsers and mobile devices. It provides all features of Selenium WebDriver along with Angular specific features for seamless end to end testing.
Protractor Browser Commands - Get current page title in Protractor. Purpose: The getTitle() function in ProtractorBrowser class is used to get the current page title.
Protractor make use of Selenium Grid to initialize, control and run browser instance. Can easily integrate with jasmine, mocha and cucumber framework to write your test.
This works for me with protractor 1.5.0, selenium-webdriver: "2.44.0"
browser.driver.manage().deleteAllCookies();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With