Skip to content

Commit

Permalink
Merge pull request #202 from creative-commoners/pulls/4.3/click-eleme…
Browse files Browse the repository at this point in the history
…nt-confirm-dialog

NEW add iClickOnTheElementConfirmingTheDialog
  • Loading branch information
Maxime Rainville authored Apr 15, 2021
2 parents d732141 + c754d70 commit 91be987
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Context/BasicContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,18 @@ public function iClickOnTheElement($selector)
$element->click();
}

/**
* Needs to be in single command to avoid "unexpected alert open" errors in Selenium.
*
* @When /^I click on the "([^"]+)" element, confirming the dialog$/
* @param $selector
*/
public function iClickOnTheElementConfirmingTheDialog($selector)
{
$this->iClickOnTheElement($selector);
$this->iConfirmTheDialog();
}

/**
* @Given /^I (click|double click) "([^"]*)" in the "([^"]*)" element$/
* @param string $clickType
Expand Down

0 comments on commit 91be987

Please sign in to comment.