Methods

Table of Contents

blurrable

Blurs element matched by selector.

Parameters

  • selector string CSS selector of the element which will be blurred
  • userOptions (optional, default {})
  • options Object Additional options
    • options.scope string Nests provided scope within parent’s scope
    • options.at number Reduce the set of matched elements to the one at the specified index
    • options.resetScope boolean Ignore parent scope
    • options.testContainer string Context where to search elements in the DOM

Examples

// <input class="name">
// <input class="email">

import { create, blurrable } from 'ember-cli-page-object';

const page = create({
  blur: blurrable('.name')
});

// blurs on element with selector '.name'
await page.blur();
// <div class="scope">
//   <input class="name">
// </div>
// <input class="email">

import { create, blurrable } from 'ember-cli-page-object';

const page = create({
  blur: blurrable('.name', { scope: '.scope' })
});

// blurs on element with selector '.scope .name'
await page.blur();
// <div class="scope">
//   <input class="name">
// </div>
// <input class="email">

import { create, blurrable } from 'ember-cli-page-object';

const page = create({
  scope: '.scope',
  blur: blurrable('.name')
});

// blurs on element with selector '.scope .name'
await page.blur();

Returns Descriptor