mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #201 from creative-commoners/pulls/4.3/i-click-the-element
NEW Add iClickOnTheElement
This commit is contained in:
commit
bcecdabbdf
@ -487,6 +487,18 @@ JS;
|
|||||||
$this->iDismissTheDialog();
|
$this->iDismissTheDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Given /^I click on the "([^"]+)" element$/
|
||||||
|
* @param string $selector
|
||||||
|
*/
|
||||||
|
public function iClickOnTheElement($selector)
|
||||||
|
{
|
||||||
|
$page = $this->getMainContext()->getSession()->getPage();
|
||||||
|
$element = $page->find('css', $selector);
|
||||||
|
assertNotNull($element, sprintf('Element %s not found', $selector));
|
||||||
|
$element->click();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Given /^I (click|double click) "([^"]*)" in the "([^"]*)" element$/
|
* @Given /^I (click|double click) "([^"]*)" in the "([^"]*)" element$/
|
||||||
* @param string $clickType
|
* @param string $clickType
|
||||||
|
Loading…
Reference in New Issue
Block a user