public abstract class WebDriverWidget<T extends BaseConfig,C extends java.lang.Enum> extends java.lang.Object implements DriverWidget<C>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
visible
Cached visibility state
|
protected GuiWebSocket |
websock
The web socket.
|
protected int |
widgetId
The widget's ID.
|
protected GuiWebEmulatedWindow |
window
The widget's window.
|
| Modifier | Constructor and Description |
|---|---|
protected |
WebDriverWidget(int widgetId,
GuiWebSocket websock)
Initialize the web component.
|
| Modifier and Type | Method and Description |
|---|---|
T |
config()
Returns widget config.
|
void |
destroy()
Destroy the driver-specific widget.
|
EmulatedWindowState |
getWindow()
Get the widget's window.
|
void |
placeWidget(NativeRectangle bounds)
Place the driver-specific widget at the specified bounds, using the currently selected
window.
|
void |
setEnabled(boolean enabled)
Change the sensitivity of a driver-implemented widget.
|
void |
setVisible(boolean visible)
Change the visibility of a driver-implemented widget.
|
void |
setWidgetBounds(NativeRectangle bounds)
Updates the driver widget's bounds on the window screen.
|
void |
setWindow(EmulatedWindowState window)
Set the widget's window.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokeWidgetCommand, invokeWidgetCommand, setWidgetAttributeprotected GuiWebEmulatedWindow window
protected int widgetId
protected final GuiWebSocket websock
protected boolean visible
protected WebDriverWidget(int widgetId,
GuiWebSocket websock)
widgetId - The widget's ID.websock - The web socket.public T config()
public void destroy()
destroy in interface DriverWidget<C extends java.lang.Enum>public void setVisible(boolean visible)
setVisible in interface DriverWidget<C extends java.lang.Enum>visible - The visibility state.public void setEnabled(boolean enabled)
setEnabled in interface DriverWidget<C extends java.lang.Enum>enabled - The enabled state.public void placeWidget(NativeRectangle bounds)
placeWidget in interface DriverWidget<C extends java.lang.Enum>bounds - Widget bounds.public void setWidgetBounds(NativeRectangle bounds)
DriverWidgetThe window screen bounds is the visible portion of the widget in respect to the state of the widget tree. This allows the driver widget to be only partially visible when scrolled out of the visible screen for example.
setWidgetBounds in interface DriverWidget<C extends java.lang.Enum>bounds - The new screen bounds.public void setWindow(EmulatedWindowState window)
setWindow in interface DriverWidget<C extends java.lang.Enum>window - The window where to attach. May be null (it will remain detached).public EmulatedWindowState getWindow()
getWindow in interface DriverWidget<C extends java.lang.Enum>