Merge pull request #201 from creative-commoners/pulls/4.3/i-click-the-element

NEW Add iClickOnTheElement
This commit is contained in:
Maxime Rainville 2021-04-15 12:59:01 +12:00 committed by GitHub
commit bcecdabbdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -487,6 +487,18 @@ JS;
$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$/
* @param string $clickType