Package io.webfolder.cdp.session
Interface Navigator
- All Known Implementing Classes:
Session
public interface Navigator
-
Method Summary
Modifier and Type Method Description default Session
back()
Returns the window to the previous item in the history.default boolean
clearCache()
Clears browser cache.default boolean
clearCookies()
Clears all browser cookies.default Session
forward()
Moves the window one document forward in the historydefault java.lang.String
getContent()
Gets the full HTML contents of the page, including the doctype.default java.lang.String
getLocation()
Document URL thatDocument
points to.default java.lang.String
getPathname()
RetrievesLocation.pathname
property.default java.util.Map<java.lang.String,java.lang.Object>
getQueryString()
Gets query stringSession
getThis()
default java.lang.String
getTitle()
Gets the title of the document.default boolean
isDomReady()
Gets the state of Documentdefault Session
reload()
This method reloads the resource from the current URL.default Session
setUserAgent(java.lang.String userAgent)
Allows overriding user agent with the given string.default Session
stop()
This method stops window loading.
-
Method Details
-
stop
This method stops window loading.- Returns:
- this
-
back
Returns the window to the previous item in the history.- Returns:
- this
-
forward
Moves the window one document forward in the history- Returns:
- this
-
reload
This method reloads the resource from the current URL.- Returns:
- this
-
setUserAgent
Allows overriding user agent with the given string.- Parameters:
userAgent
- User agent to use- Returns:
- this
-
getLocation
default java.lang.String getLocation()Document URL thatDocument
points to.- Returns:
- document location
-
getPathname
default java.lang.String getPathname()RetrievesLocation.pathname
property.- Returns:
- an initial / followed by the path of the URL
-
getQueryString
default java.util.Map<java.lang.String,java.lang.Object> getQueryString()Gets query string- Returns:
- key value pair
-
getContent
default java.lang.String getContent()Gets the full HTML contents of the page, including the doctype.- Returns:
- string content of the document
-
getTitle
default java.lang.String getTitle()Gets the title of the document.- Returns:
- string containing the document's title
-
isDomReady
default boolean isDomReady()Gets the state of Document- Returns:
true
if Document.readyState property is complete
-
clearCache
default boolean clearCache()Clears browser cache.- Returns:
true
if browser cache cleared.
-
clearCookies
default boolean clearCookies()Clears all browser cookies.- Returns:
true
if browser cookies cleared.
-
getThis
Session getThis()
-