Constant
, Dom
, JavaScript
, Keyboard
, Mouse
, Navigator
, Selector
, Sizzle
, AutoCloseable
public class Session extends Object implements AutoCloseable, Selector, Keyboard, Mouse, Navigator, JavaScript, Sizzle, Dom
BACKSPACE, DOM_PROPERTIES, DOWN_ARROW, EMPTY_ARGS, EMPTY_NODE_ID, ENTER, ESC, LEFT_ARROW, RIGHT_ARROW, SPECIAL_KEYS, TAB, UP_ARROW, WAIT_PERIOD, WAIT_TIMEOUT
Modifier and Type | Method | Description |
---|---|---|
void |
activate() |
Activate this browser window
|
void |
addEventListener(EventListener<?> eventListener) |
Use
Session#getListenerManager() |
byte[] |
captureScreenshot() |
|
void |
close() |
Close the this browser window
|
Session |
enableConsoleLog() |
Redirects javascript console logs to slf4j
|
Session |
enableDetailLog() |
Redirects runtime logs (network, security, storage etc..) to slf4j
|
Session |
enableNetworkLog() |
Redirects network logs to slf4j
|
boolean |
equals(Object obj) |
|
Command |
getCommand() |
|
String |
getFrameId() |
|
String |
getId() |
|
Session |
getThis() |
|
int |
hashCode() |
|
boolean |
isConnected() |
|
Session |
navigate(String url) |
|
void |
onTerminate(TerminateListener terminateListener) |
|
void |
removeEventEventListener(EventListener<?> eventListener) |
Use
Session#getListenerManager() |
String |
toString() |
|
Session |
wait(int timeout) |
Causes the current thread to wait until waiting time elapses.
|
Session |
wait(int timeout,
boolean log) |
Causes the current thread to wait until waiting time elapses.
|
Session |
waitDocumentReady() |
waits until document is ready
|
Session |
waitDocumentReady(int timeout) |
waits until document is ready
|
boolean |
waitUntil(Predicate<Session> predicate) |
|
boolean |
waitUntil(Predicate<Session> predicate,
int timeout) |
|
boolean |
waitUntil(Predicate<Session> predicate,
int timeout,
int period) |
|
boolean |
waitUntil(Predicate<Session> predicate,
int timeout,
int period,
boolean log) |
clearOptions, clearOptions, focus, focus, focus, getAttribute, getAttribute, getAttribute, getAttributes, getAttributes, getAttributes, getBoxModel, getBoxModel, getOptions, getOptions, getOuterHtml, getOuterHtml, getSelectedIndex, getSelectedIndex, getText, getText, getValue, getValue, isChecked, isChecked, isDisabled, isDisabled, selectInputText, selectInputText, setAttribute, setAttribute, setAttribute, setChecked, setChecked, setDisabled, setDisabled, setFiles, setFiles, setSelectedIndex, setSelectedIndex, setSelectedOptions, setSelectedOptions, setValue, setValue
callFunction, callFunction, callFunction, evaluate, getVariable, setVariable
sendBackspace, sendDownArrow, sendEnter, sendEsc, sendKeyCode, sendKeys, sendLeftArrow, sendRightArrow, sendTab, sendUpArrow
back, clearCache, clearCookies, forward, getContent, getLocation, getPathname, getQueryString, getTitle, isDomReady, reload, setUserAgent, stop
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNodeId, getNodeId, getObjectId, getObjectId, getObjectId, getObjectIds, getObjectIds, getObjectIdWithContext, getProperty, getProperty, getPropertyByObjectId, getPropertyDescriptor, matches, matches, matches, releaseObject, setProperty, setProperty
installSizzle, removeSizzle, useSizzle
public String getId()
public void close()
close
in interface AutoCloseable
public boolean isConnected()
public void activate()
public void addEventListener(EventListener<?> eventListener)
Session#getListenerManager()
public void removeEventEventListener(EventListener<?> eventListener)
Session#getListenerManager()
public Session waitDocumentReady()
public Session waitDocumentReady(int timeout)
timeout
- the maximum time to wait in millisecondspublic boolean waitUntil(Predicate<Session> predicate, int timeout, int period, boolean log)
public Session enableConsoleLog()
public Session enableDetailLog()
public Session enableNetworkLog()
public Session getThis()
getThis
in interface Dom
getThis
in interface JavaScript
getThis
in interface Keyboard
getThis
in interface Mouse
getThis
in interface Navigator
getThis
in interface Selector
getThis
in interface Sizzle
public String getFrameId()
public byte[] captureScreenshot()
public Session wait(int timeout)
timeout
- the maximum time to wait in millisecondsCdpException
- if the session held by another thread at the time of invocation.public Session wait(int timeout, boolean log)
timeout
- the maximum time to wait in millisecondsCdpException
- if the session held by another thread at the time of invocation.public void onTerminate(TerminateListener terminateListener)
public Command getCommand()
Copyright © 2017–2018 WebFolder OÜ. All rights reserved.