/** * {@inheritDoc} * The default behavior of this method is to return getRequestUrl() on the wrapped connection object. * @deprecated As of 2.6, please use {@link #getRequestSettings()}.getUrl() */ @Deprecated public URL getRequestUrl() { return wrappedWebResponse_.getRequestUrl(); }
/** * {@inheritDoc} * The default behavior of this method is to return getRequestUrl() on the wrapped connection object. * @deprecated As of 2.6, please use {@link #getRequestSettings()}.getUrl() */ @Deprecated public URL getRequestUrl() { return wrappedWebResponse_.getRequestUrl(); }
/** * {@inheritDoc} * The default behavior of this method is to return getRequestUrl() on the wrapped connection object. * @deprecated As of 2.6, please use {@link #getRequestSettings()}.getUrl() */ @Deprecated public URL getRequestUrl() { return wrappedWebResponse_.getRequestUrl(); }
private String getDomainForCookie(Cookie cookie) { URL current = lastPage().getWebResponse().getRequestUrl(); if (current.getPort() == 80) { return current.getHost(); } return String.format("%s:%s", current.getHost(), current.getPort()); } }
private String getHostName() { return lastPage().getWebResponse().getRequestUrl().getHost().toLowerCase(); }
private String getPath() { return lastPage().getWebResponse().getRequestUrl().getPath(); }
public String getCurrentUrl() { return lastPage().getWebResponse().getRequestUrl().toString(); }
@Test(groups = { "contexts" }) @SpecAssertion(section = "6.7.4", id = "m") public void testConversationPropagatedOverRedirect() throws Exception { WebClient webClient = new WebClient(); HtmlPage storm = webClient.getPage(getPath("storm.jsf")); HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton"); storm = beginConversationButton.click(); HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength"); stormStrength.setValueAttribute(REDIRECT_STORM_STRENGTH); String stormCid = getCid(storm); HtmlSubmitInput lighteningButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "lighteningButton"); HtmlPage lightening = lighteningButton.click(); assert lightening.getWebResponse().getRequestUrl().toString().contains("lightening.jsf"); assert stormCid.equals(getCid(lightening)); stormStrength = getFirstMatchingElement(lightening, HtmlTextInput.class, "stormStrength"); assert stormStrength.getValueAttribute().equals(REDIRECT_STORM_STRENGTH); }