/** * Sets the hash portion of the link's URL (the portion following the '#'). * @param hash the new hash portion of the link's URL * @throws Exception if an error occurs * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ public void jsxSet_hash(final String hash) throws Exception { setUrl(UrlUtils.getUrlWithNewRef(getUrl(), hash)); }
/** * Sets the hash portion of the link's URL (the portion following the '#'). * @param hash the new hash portion of the link's URL * @throws Exception if an error occurs * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ public void jsxSet_hash(final String hash) throws Exception { setUrl(UrlUtils.getUrlWithNewRef(getUrl(), hash)); }
/** * Sets the hash portion of the link's URL (the portion following the '#'). * @param hash the new hash portion of the link's URL * @throws Exception if an error occurs * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ public void jsxSet_hash(final String hash) throws Exception { setUrl(UrlUtils.getUrlWithNewRef(getUrl(), hash)); }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * @param href the href * @param page the HtmlPage * @return the calculated target url. * @throws MalformedURLException if an IO error occurs */ public static URL getTargetUrl(final String href, final HtmlPage page) throws MalformedURLException { URL url = page.getFullyQualifiedUrl(href); // fix for empty url if (StringUtils.isEmpty(href)) { final boolean dropFilename = page.getWebClient().getBrowserVersion() .hasFeature(ANCHOR_EMPTY_HREF_NO_FILENAME); if (dropFilename) { String path = url.getPath(); path = path.substring(0, path.lastIndexOf('/') + 1); url = UrlUtils.getUrlWithNewPath(url, path); url = UrlUtils.getUrlWithNewRef(url, null); } else { url = UrlUtils.getUrlWithNewRef(url, null); } } return url; }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * @param href the href * @param page the HtmlPage * @return the calculated target url. * @throws MalformedURLException if an IO error occurs */ public static URL getTargetUrl(final String href, final HtmlPage page) throws MalformedURLException { URL url = page.getFullyQualifiedUrl(href); // fix for empty url if (StringUtils.isEmpty(href)) { final boolean dropFilename = page.getWebClient().getBrowserVersion() .hasFeature(ANCHOR_EMPTY_HREF_NO_FILENAME); if (dropFilename) { String path = url.getPath(); path = path.substring(0, path.lastIndexOf('/') + 1); url = UrlUtils.getUrlWithNewPath(url, path); url = UrlUtils.getUrlWithNewRef(url, null); } else { url = UrlUtils.getUrlWithNewRef(url, null); } } return url; }
/** * Sets the hash portion of the link's URL (the portion following the '#'). * @param hash the new hash portion of the link's URL * @throws Exception if an error occurs * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ @JsxSetter public void setHash(final String hash) throws Exception { setUrl(UrlUtils.getUrlWithNewRef(getUrl(), hash)); }
cleanUrl = UrlUtils.getUrlWithNewRef(cleanUrl, null);
cleanUrl = UrlUtils.getUrlWithNewRef(cleanUrl, null);
cleanUrl = UrlUtils.getUrlWithNewRef(cleanUrl, null);
/** * Sets the hash portion of the link's URL (the portion following the '#'). * @param hash the new hash portion of the link's URL * @throws Exception if an error occurs * @see <a href="http://msdn.microsoft.com/en-us/library/ms533775.aspx">MSDN Documentation</a> */ @JsxSetter public void setHash(final String hash) throws Exception { setUrl(UrlUtils.getUrlWithNewRef(getUrl(), hash)); }
final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash);
final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash);
cleanUrl = UrlUtils.getUrlWithNewRef(cleanUrl, null);
cleanUrl = UrlUtils.getUrlWithNewRef(cleanUrl, null);
path = path.substring(0, path.lastIndexOf('/') + 1); url = UrlUtils.getUrlWithNewPath(url, path); url = UrlUtils.getUrlWithNewRef(url, null); url = UrlUtils.getUrlWithNewRef(url, null);
path = path.substring(0, path.lastIndexOf('/') + 1); url = UrlUtils.getUrlWithNewPath(url, path); url = UrlUtils.getUrlWithNewRef(url, null); url = UrlUtils.getUrlWithNewRef(url, null);
/** * Returns the location URL. * @return the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a> */ public String jsxGet_href() { final Page page = window_.getWebWindow().getEnclosedPage(); if (page == null) { return UNKNOWN; } try { URL url = page.getWebResponse().getRequestSettings().getUrl(); final boolean encodeHash = !getBrowserVersion().isIE(); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash); } return url.toExternalForm(); } catch (final MalformedURLException e) { LOG.error(e.getMessage(), e); return page.getWebResponse().getRequestSettings().getUrl().toExternalForm(); } }
/** * Returns the location URL. * @return the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a> */ public String jsxGet_href() { final Page page = window_.getWebWindow().getEnclosedPage(); if (page == null) { return UNKNOWN; } try { URL url = page.getWebResponse().getRequestSettings().getUrl(); final boolean encodeHash = !getBrowserVersion().isIE(); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash); } return url.toExternalForm(); } catch (final MalformedURLException e) { LOG.error(e.getMessage(), e); return page.getWebResponse().getRequestSettings().getUrl().toExternalForm(); } }
/** * Returns the location URL. * @return the location URL * @see <a href="http://msdn.microsoft.com/en-us/library/ms533867.aspx">MSDN Documentation</a> */ public String jsxGet_href() { final Page page = window_.getWebWindow().getEnclosedPage(); if (page == null) { return UNKNOWN; } try { URL url = page.getWebResponse().getRequestSettings().getUrl(); final boolean encodeHash = !getBrowserVersion().isIE(); final String hash = getHash(encodeHash); if (hash != null) { url = UrlUtils.getUrlWithNewRef(url, hash); } return url.toExternalForm(); } catch (final MalformedURLException e) { LOG.error(e.getMessage(), e); return page.getWebResponse().getRequestSettings().getUrl().toExternalForm(); } }
url = UrlUtils.getUrlWithNewRef(url, null); && WebClient.URL_ABOUT_BLANK != url && StringUtils.isEmpty(actionUrl)) { url = UrlUtils.getUrlWithNewRef(url, null); url = UrlUtils.getUrlWithNewRef(url, anchor);