irs / behat-popup-extension
Behat context for popup manipulations with Selenium 2.
Installs: 5 910
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 4
Open Issues: 2
Requires
- php: >=5.4.0
- behat/behat: 2.4.*
- behat/mink: 1.4.*
- behat/mink-selenium2-driver: *
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-12-22 21:10:57 UTC
README
The extension adds following step definitions to feature context that allows to test popups:
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 "([^"]*)"$/
Installation
The simplest way to install the extension is to add following code to your composer.json:
{ "require": { "irs/behat-popup-extension": "dev-master" } }
After that do composer install
and add following lines to behat.yml
to enable extension:
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
.