CookieActions
Static methodsâ
withCookies
â
This will return ICookieActions
which will expose different methods to handle Cookies.
ICookieActions cookiesActions = CookieActions.withCookies ();
Instance methodsâ
cookie (name)
â
This method will get the cookie from the browser based on it's name.
import static io.github.boykaframework.actions.drivers.CookieActions.withCookies;
import org.openqa.selenium.Cookie;
. . .
Cookie c = withCookies ().cookie ("cookie-name");
cookies
â
This method will get all the cookie from the browser and return all the cookie names as list.
import static io.github.boykaframework.actions.drivers.CookieActions.withCookies;
. . .
List<String> cookieNames = withCookies ().cookies ();
deleteAll
â
This method will delete all the cookies from the browser.
import static io.github.boykaframework.actions.drivers.CookieActions.withCookies;
. . .
withCookies ().deleteAll ();
delete (name)
â
This method will delete the cookie from the browser based on it's name.
import static io.github.boykaframework.actions.drivers.CookieActions.withCookies;
. . .
withCookies ().delete ("cookie-name");