dev-master
9999999-devBehat context for popup manipulations with Selenium 2.
MIT
The Requires
The Development Requires
by Vadim Kusakin
behat confirm alert popup
Wallogit.com
2017 © Pedro Peláez
Behat context for popup manipulations with Selenium 2.
The extension adds following step definitions to feature context that allows to test popups:, (*2)
Given /^(?:|I )press ok on alert$/ Given /^(?:|I )press ok on confirmation$/ Given /^(?:|I )press ok on input popup$/ Given /^(?:|I ) press cancel on confirmation$/ Given /^(?:|I ) press cancel on input popup$/ Given /^(?:|I ) type "([^"]*)" into input popup$/ Given /^the alert message should contain "([^"]*)"$/ Given /^the confirmation message should contain "([^"]*)"$/ Given /^the prompt message should contain "([^"]*)"$/ Given /^the alert message should not contain "([^"]*)"$/ Given /^the confirmation message should not contain "([^"]*)"$/ Given /^the prompt message should not contain "([^"]*)"$/
The simplest way to install the extension is to add following code to your composer.json:, (*3)
{
"require": {
"irs/behat-popup-extension": "dev-master"
}
}
After that do composer install and add following lines to behat.yml to enable extension:, (*4)
default:
extensions:
Irs\BehatPopupExtension\Extension: ~
Now you can use Irs\BehatPopupExtension\PopupContext trait in the feature context. And do not forget that features' context should implement Behat\MinkExtension\Context\MinkAwareInterface., (*5)
Behat context for popup manipulations with Selenium 2.
MIT
behat confirm alert popup