Skip to content

Commit

Permalink
NEW add iClickOnTheElementConfirmingTheDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Apr 15, 2021
1 parent d732141 commit c754d70
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 c754d70

Please sign in to comment.