Property
Methods
Table of Contents
property
Parameters
propertyName
string Name of the property to getselector
string CSS selector of the element to checkuserOptions
(optional, default{}
)-
options
Object Additional options
Examples
// <input type="checkbox" checked="checked">
import { create, property } from 'ember-cli-page-object';
const page = create({
isChecked: property('checked', 'input')
});
assert.ok(page.isChecked);
// <div><input></div>
// <div class="scope"><input type="checkbox" checked="checked"></div>
// <div><input></div>
import { create, property } from 'ember-cli-page-object';
const page = create({
isChecked: property('checked', 'input', { scope: '.scope' })
});
assert.ok(page.isChecked);
- Throws any Will throw an error if no element matches selector
- Throws any Will throw an error if multiple elements are matched by selector
Returns Descriptor