PHP Trait E2E\WebDriverShortcuts

Mostra file Open project: phanan/koel

Protected Properties

Property Type Description
$driver Facebook\WebDriver\Remote\RemoteWebDriver

Public Methods

Method Description
notSee ( $selector ) Wait and validate an element to be invisible.
see ( $selector ) Wait and validate an element to be visible.
seeText ( $text, $selector ) Wait and validate a text to be visible in an element.

Protected Methods

Method Description
back ( ) Navigate back.
click ( $element ) : Facebook\WebDriver\WebDriverElement Click an element.
doubleClick ( $element ) Double-click and element.
el ( $selector ) : Facebook\WebDriver\WebDriverElement
els ( $selector ) : Facebook\WebDriver\Remote\RemoteWebElement[] Get a list of elements by a selector.
enter ( ) Press enter.
forward ( ) Navigate forward.
press ( string $key = WebDriverKeys::ENTER ) Press a key.
refresh ( ) Refresh the page.
rightClick ( $element ) : Facebook\WebDriver\Remote\RemoteMouse Right-click an element.
sleep ( $seconds ) Sleep (implicit wait) for some seconds.
type ( $string ) Type a string.
typeIn ( $element, $string ) Type into an element.
waitUntil ( $func, integer $timeout = 10 ) Wait until a condition is met.

Method Details

back() protected method

Navigate back.
protected back ( )

click() protected method

Click an element.
protected click ( $element ) : Facebook\WebDriver\WebDriverElement
$element
return Facebook\WebDriver\WebDriverElement

doubleClick() protected method

Double-click and element.
protected doubleClick ( $element )
$element

el() protected method

protected el ( $selector ) : Facebook\WebDriver\WebDriverElement
$selector WebDriverElement|string
return Facebook\WebDriver\WebDriverElement

els() protected method

Get a list of elements by a selector.
protected els ( $selector ) : Facebook\WebDriver\Remote\RemoteWebElement[]
$selector
return Facebook\WebDriver\Remote\RemoteWebElement[]

enter() protected method

Press enter.
protected enter ( )

forward() protected method

Navigate forward.
protected forward ( )

notSee() public method

Wait and validate an element to be invisible.
public notSee ( $selector )
$selector string The element's CSS selector.

press() protected method

Press a key.
protected press ( string $key = WebDriverKeys::ENTER )
$key string

refresh() protected method

Refresh the page.
protected refresh ( )

rightClick() protected method

Right-click an element.
protected rightClick ( $element ) : Facebook\WebDriver\Remote\RemoteMouse
$element
return Facebook\WebDriver\Remote\RemoteMouse

see() public method

Wait and validate an element to be visible.
public see ( $selector )
$selector

seeText() public method

Wait and validate a text to be visible in an element.
public seeText ( $text, $selector )
$text
$selector string The element's CSS selector.

sleep() protected method

Sleep (implicit wait) for some seconds.
protected sleep ( $seconds )
$seconds

type() protected method

Type a string.
protected type ( $string )
$string

typeIn() protected method

Type into an element.
protected typeIn ( $element, $string )
$element
$string

waitUntil() protected method

Wait until a condition is met.
protected waitUntil ( $func, integer $timeout = 10 )
$func (closure|WebDriverExpectedCondition)
$timeout integer

Property Details

$driver protected_oe property

protected RemoteWebDriver,Facebook\WebDriver\Remote $driver
return Facebook\WebDriver\Remote\RemoteWebDriver