Methods

findElementWithAssert

addon/-private/extend/find-element-with-assert.js:38-44

Parameters

  • pageObjectNode Ceibo Node of the tree
  • targetSelector string Specific CSS selector
  • options Object Additional options
    • options.resetScope boolean Do not use inherited scope
    • options.contains string Filter by using :contains(‘foo’) pseudo-class
    • options.last boolean Filter by using :last pseudo-class
    • options.visible boolean Filter by using :visible pseudo-class
    • options.multiple boolean Specify if built selector can match multiple elements.
    • options.testContainer String Context where to search elements in the DOM
    • options.at number Filter by index using :eq(x) pseudo-class
    • options.pageObjectKey String Used in the error message when the element is not found

Examples

import { findElementWithAssert } from 'ember-cli-page-object/extend';

export default function isDisabled(selector, options = {}) {
  return {
    isDescriptor: true,

    get() {
      return findElementWithAssert(this, selector, options).is(':disabled');
    }
  };
}

Returns Object jQuery object

findElement

addon/-private/extend/find-element.js:36-42

Parameters

  • pageObjectNode Ceibo Node of the tree
  • targetSelector string Specific CSS selector
  • options Object Additional options
    • options.resetScope boolean Do not use inherited scope
    • options.contains string Filter by using :contains(‘foo’) pseudo-class
    • options.at number Filter by index using :eq(x) pseudo-class
    • options.last boolean Filter by using :last pseudo-class
    • options.visible boolean Filter by using :visible pseudo-class
    • options.multiple boolean Specify if built selector can match multiple elements.
    • options.testContainer String Context where to search elements in the DOM

Examples

import { findElement } from 'ember-cli-page-object/extend';

export default function isDisabled(selector, options = {}) {
  return {
    isDescriptor: true,

    get() {
      return findElement(this, selector, options).is(':disabled');
    }
  };
}

Returns Object jQuery object