PHP Class Sanpi\Behatch\Context\BrowserContext

Inheritance: extends BaseContext
Show file Open project: behatch/contexts

Public Methods

Method Description
__construct ( $timeout = 1 )
closeBrowser ( )
iAmOnUrlComposedBy ( Behat\Gherkin\Node\TableNode $tableNode ) Open url with various parameters
iClickOnTheNthElement ( $index, $element ) Clicks on the nth CSS element
iFillInWithTheCurrentDate ( $field ) Fills in form field with current date
iFillInWithTheCurrentDateAndModifier ( $field, $modifier ) Fills in form field with current date and strtotime modifier
iFollowTheNthLink ( $index, $link ) Click on the nth specified link
iHoverIShouldSeeIn ( $element ) Mouse over a CSS element
iSaveTheValueOfInTheParameter ( $field, $parameter ) Save value of the field in parameters array
iSetBasicAuthenticationWithAnd ( $user, $password ) Set login / password for next HTTP authentication
iShouldSeeLessThanNElementInTheNthParent ( $count, $element, $index, $parent )
iShouldSeeMoreThanNElementInTheNthParent ( $count, $element, $index, $parent )
iShouldSeeNElementInTheNthParent ( $count, $element, $index, $parent )
iWaitForElement ( $element ) Checks, that the page should contains specified element after timeout
iWaitSeconds ( $count )
iWaitSecondsForElement ( $count, $element ) Wait for a element
iWaitSecondsUntilISee ( $count, $text ) Checks, that the page should contains specified text after given timeout
iWaitSecondsUntilISeeInTheElement ( $count, $text, $element ) Checks, that the element contains specified text after timeout
iWaitUntilISee ( $text ) Checks, that the page should contains specified text after timeout
iWaitUntilISeeInTheElement ( $text, $element ) Checks, that the element contains specified text after timeout
pressTheNthButton ( $index, $button ) Presses the nth specified button
switchToIFrame ( $name ) Select a frame by its name or ID.
switchToMainFrame ( ) Go back to main document frame.
theElementShouldBeDisabled ( $element ) Checks, that element with given CSS is disabled
theElementShouldBeEnabled ( $element ) Checks, that element with given CSS is enabled
theElementShouldBeVisible ( $element ) Checks, that the specified CSS element is visible
theElementShouldNotBeVisible ( $element ) Checks, that the specified CSS element is not visible
theSelectBoxShouldContain ( $select, $option ) Checks, that given select box contains the specified option
theSelectBoxShouldNotContain ( $select, $option ) Checks, that given select box does not contain the specified option

Method Details

__construct() public method

public __construct ( $timeout = 1 )

closeBrowser() public method

public closeBrowser ( )

iAmOnUrlComposedBy() public method

Open url with various parameters
public iAmOnUrlComposedBy ( Behat\Gherkin\Node\TableNode $tableNode )
$tableNode Behat\Gherkin\Node\TableNode

iClickOnTheNthElement() public method

Clicks on the nth CSS element
public iClickOnTheNthElement ( $index, $element )

iFillInWithTheCurrentDate() public method

Fills in form field with current date
public iFillInWithTheCurrentDate ( $field )

iFillInWithTheCurrentDateAndModifier() public method

Fills in form field with current date and strtotime modifier
public iFillInWithTheCurrentDateAndModifier ( $field, $modifier )

iHoverIShouldSeeIn() public method

Mouse over a CSS element
public iHoverIShouldSeeIn ( $element )

iSaveTheValueOfInTheParameter() public method

Save value of the field in parameters array
public iSaveTheValueOfInTheParameter ( $field, $parameter )

iSetBasicAuthenticationWithAnd() public method

Set login / password for next HTTP authentication
public iSetBasicAuthenticationWithAnd ( $user, $password )

iShouldSeeLessThanNElementInTheNthParent() public method

public iShouldSeeLessThanNElementInTheNthParent ( $count, $element, $index, $parent )

iShouldSeeMoreThanNElementInTheNthParent() public method

public iShouldSeeMoreThanNElementInTheNthParent ( $count, $element, $index, $parent )

iShouldSeeNElementInTheNthParent() public method

public iShouldSeeNElementInTheNthParent ( $count, $element, $index, $parent )

iWaitForElement() public method

Checks, that the page should contains specified element after timeout
public iWaitForElement ( $element )

iWaitSeconds() public method

public iWaitSeconds ( $count )

iWaitSecondsForElement() public method

Wait for a element
public iWaitSecondsForElement ( $count, $element )

iWaitSecondsUntilISee() public method

Checks, that the page should contains specified text after given timeout
public iWaitSecondsUntilISee ( $count, $text )

iWaitSecondsUntilISeeInTheElement() public method

Checks, that the element contains specified text after timeout
public iWaitSecondsUntilISeeInTheElement ( $count, $text, $element )

iWaitUntilISee() public method

Checks, that the page should contains specified text after timeout
public iWaitUntilISee ( $text )

iWaitUntilISeeInTheElement() public method

Checks, that the element contains specified text after timeout
public iWaitUntilISeeInTheElement ( $text, $element )

pressTheNthButton() public method

Presses the nth specified button
public pressTheNthButton ( $index, $button )

switchToIFrame() public method

Select a frame by its name or ID.
public switchToIFrame ( $name )

switchToMainFrame() public method

Go back to main document frame.
public switchToMainFrame ( )

theElementShouldBeDisabled() public method

Checks, that element with given CSS is disabled
public theElementShouldBeDisabled ( $element )

theElementShouldBeEnabled() public method

Checks, that element with given CSS is enabled
public theElementShouldBeEnabled ( $element )

theElementShouldBeVisible() public method

Checks, that the specified CSS element is visible
public theElementShouldBeVisible ( $element )

theElementShouldNotBeVisible() public method

Checks, that the specified CSS element is not visible
public theElementShouldNotBeVisible ( $element )

theSelectBoxShouldContain() public method

Checks, that given select box contains the specified option
public theSelectBoxShouldContain ( $select, $option )

theSelectBoxShouldNotContain() public method

Checks, that given select box does not contain the specified option
public theSelectBoxShouldNotContain ( $select, $option )