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 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 |
setWindow(EmulatedWindowState window)
Set the widget's window.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invokeWidgetCommand, invokeWidgetCommand, setWidgetAttribute
protected GuiWebEmulatedWindow window
protected int widgetId
protected final GuiWebSocket websock
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 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>