@Test public void testLoginReloadRetainsFormRedirect() { String redirectUri = "http://expected.com"; webDriver.get(baseUrl + "/oauth/authorize?client_id=test&redirect_uri="+redirectUri); ((JavascriptExecutor)webDriver).executeScript("document.getElementsByName('X-Uaa-Csrf')[0].value=''"); webDriver.manage().deleteCookieNamed("JSESSIONID"); webDriver.findElement(By.xpath("//input[@value='Sign in']")).click(); assertThat(webDriver.getCurrentUrl(), Matchers.containsString("/login")); assertThat(webDriver.findElement(By.name("form_redirect_uri")).getAttribute("value"), Matchers.containsString("redirect_uri="+redirectUri)); }
webDriver.manage().deleteCookieNamed("JSESSIONID"); webDriver.findElement(By.xpath("//input[@value='Sign in']")).click(); webDriver.manage().deleteCookieNamed("JSESSIONID"); webDriver.findElement(By.xpath("//button[text()='Authorize']")).click();
@Override protected Result executeImpl(Context context, String... curArgs) { String name = curArgs[ARG_NAME]; WebDriver driver = context.getWrappedDriver(); Cookie cookie = driver.manage().getCookieNamed(name); if (cookie != null) { driver.manage().deleteCookieNamed(name); return new Success("Cookie \"" + name + "\" is deleted."); } else { return new Success("Cookie \"" + name + "\" is not found."); } } }
@Given("^" + THAT + THE_USER + " delete(?:s)? the cookie \"([^\"]*)\"$") public void that_we_delete_the_cookie(String name) { driver.manage().deleteCookieNamed(name); }
public void deleteCookieNamed(String name) { options.deleteCookieNamed(name); }
public void deleteCookieNamed(String name) { getTester().getDriver().manage().deleteCookieNamed(name); }
/** * Deletes cookie matching <b>name</b>.<br> * <br> * If the cookie is not found, nothing happens<br> * * @param name * The name of the cookie to delete. */ @RobotKeyword @ArgumentNames({ "name" }) public void deleteCookie(String name) { browserManagement.getCurrentWebDriver().manage().deleteCookieNamed(name); }
private void removeCookie(WebDriver webDriver) { webDriver.manage().deleteCookieNamed(name); webCommunicationWrapper.getHttpRequestExecutor().removeCookie(name); }
public ResultType call() throws Exception { getDriver().manage().deleteCookieNamed(name); return ResultType.SUCCESS; }
@Override public void deleteCookieNamed(String s) { options.deleteCookieNamed(s); }
/** * Deletes the JSESSIONID cookie. Not sending this value forces the Session Expired page error (sending a garbage * value displays the XSRF page instead). */ public void deleteSession() { driver.manage().deleteCookieNamed("JSESSIONID"); }
public ResultType call() throws Exception { getDriver().manage().deleteCookieNamed(name); return ResultType.SUCCESS; }
@Override public void deleteCookieNamed(String s) { options.deleteCookieNamed(s); }
@Override public void deleteCookieNamed(String name) { ensureWebDriver(); delegate.manage().deleteCookieNamed(name); }
@Override public DriverAction deleteCookie(String cookieName) { driver.manage().deleteCookieNamed(cookieName); return this; }
/** * Delete user session cookie and refresh the page. */ @When("user session is expired") public void expireUserSession() { browser.base().manage().deleteCookieNamed( Resources.base().userSessionCookieName()); browser.base().navigate().refresh(); }
/** * Delete the named cookie from the current domain.<br/> * This is equivalent to setting the named cookie's expiration date to some time in the past. * * @param cookieName the name of the cookie. May not be null or an empty string. */ @PublicAtsApi public void deleteCookieNamed( String cookieName ) { webDriver.manage().deleteCookieNamed(cookieName); }
/** * Sets the JSESSIONID value to garbage. Doing this will essentially invalidate the cookie, forcing JIRA to create * treat the request as a request that comes in with an expired JSESSIONID. */ public void invalidateSession() { driver.manage().deleteCookieNamed("JSESSIONID"); driver.manage().addCookie(new Cookie("JSESSIONID", "nonsense")); }
private void removeCookie(WebDriver webDriver) { webDriver.manage().deleteCookieNamed(name); webCommunicationWrapper.getHttpRequestExecutor().removeCookie(name); }
@BeforeScenario public void emptyCart() { try { webDriverProvider.get().manage().deleteCookieNamed("uaid"); } catch (WebDriverException e) { e.printStackTrace(); } } }