Skip to content
Snippets Groups Projects
Commit 4b6ac98d authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3152002: Fix unexpected alert in Automated Functional Acceptance...

Issue #3152002: Fix unexpected alert in Automated Functional Acceptance Testing to Accept Alerts or Dismiss Alerts Before or After going to the next steps
parent a6adc9ae
No related branches found
No related tags found
No related merge requests found
...@@ -1602,4 +1602,60 @@ JS; ...@@ -1602,4 +1602,60 @@ JS;
public function iSelectTheParagraphComponent($value) { public function iSelectTheParagraphComponent($value) {
$this->getSession()->getPage()->find('xpath', '//*[contains(@class, "paragraphs-add-dialog") and contains(@class, "ui-dialog-content")]//*[contains(@name, "'. $value . '")]')->click(); $this->getSession()->getPage()->find('xpath', '//*[contains(@class, "paragraphs-add-dialog") and contains(@class, "ui-dialog-content")]//*[contains(@name, "'. $value . '")]')->click();
} }
/**
* Accept Alerts Before going to the next step.
*
* @BeforeStep @AcceptAlertsBeforStep
*/
public function beforeStepAcceptAlert(BeforeStepScope $scope) {
try {
$this->getSession()->getDriver()->getWebDriverSession()->accept_alert();
}
catch (Exception $e) {
// no-op, alert might not be present.
}
}
/**
* Accept Alerts After going to the next step.
*
* @AftereStep @AcceptAlertsAfterStep
*/
public function afterStepAcceptAlert(AfterStepScope $scope) {
try {
$this->getSession()->getDriver()->getWebDriverSession()->accept_alert();
}
catch (Exception $e) {
// no-op, alert might not be present.
}
}
/**
* Dismiss Alerts Before going to the next step.
*
* @BeforeStep @AcceptAlertsBeforStep
*/
public function beforeStepDismissAlert(BeforeStepScope $scope) {
try {
$this->getSession()->getDriver()->getWebDriverSession()->dismiss_alert();
}
catch (Exception $e) {
// no-op, alert might not be present.
}
}
/**
* Dismiss Alerts After going to the next step.
*
* @AftereStep @DismissAlertsAfterStep
*/
public function afterStepDismissAlert(AfterStepScope $scope) {
try {
$this->getSession()->getDriver()->getWebDriverSession()->dismiss_alert();
}
catch (Exception $e) {
// no-op, alert might not be present.
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment