w <- app$findWidget(name, iotype = c("auto", "input", "output"))
w$getName() w$getElement() w$getType() w$getIoType() w$isinput() w$isOutput()
w$getValue() w$setValue(value)
w$sendKeys(keys)
w$listTabs()
ShinyDriver
object.Widget
object.sendKeys
method of the Element
class in the
webdriver
package.A Widget
object represents a Shiny input or output widget.
app$findWidget
creates a widget object from a
ShinyDriver
object.
w$getName()
returns the name of the widget.
w$getElement()
returns an HTML element. This is an
Element
object from the webdriver
package.
w$getType()
returns the type of the widget, possible values
are textInput
, selectInput
, etc.
w$getIoType()
returns ‘input’ or ‘output’,
whether the widget is an input or output widget.
w$isInput()
returns TRUE
for input widgets, FALSE
otherwise.
w$isOutput()
returns TRUE
for output widgets, FALSE
otherwise.
w$getValue()
returns the value of the widget. The exact type
returned depends on the type of the widget. TODO: list widgets and their
return types.
w$setValue()
sets the value of the widget, through the web
browser. Different widget types expect different different value
arguments. TODO: list widgets and types.
w$sendKeys
sends the specified keys to the HTML element of the
widget.
w$listTabs
lists the tab names of a tabsetPanel
widget.
It fails for other types of widgets.