https://github.com/dimsav/behat-reference
https://github.com/dimsav/behat-reference
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dimsav/behat-reference
- Owner: dimsav
- Created: 2014-04-30T07:18:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-04-30T11:47:12.000Z (about 12 years ago)
- Last Synced: 2025-01-29T20:26:12.305Z (over 1 year ago)
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Behat Reference
===============
## Mink
### Radio button
Select a radio button
```php
$this->selectOption('my_name', 'my_value');
```
Assert is selected
```php
$option = $this->getSession()->getPage()->find('css', '[name="my_name"][value="my_value"]');
assertEquals('checked', $option->getAttribute('checked'));
```
### Check box
Check a checkbox
```php
$this->checkOption('my_name');
```
Uncheck a checkbox
```php
$this->uncheckOption('my_name');
```