Home Reference Source
import FinderFilter from 'pagewalker/lib/page/finder_filter.js'
public class | source

FinderFilter

This class provides filtering methods for Finder. This class is Mixined to "Finder" class

Static Method Summary

Static Public Methods
public static

beChecked(bool: *): string

public static

beDisabled(bool: *): string

public static

beSelected(bool: *): string

public static

closest(selector: *): string

public static

haveAttribute(attrName: *, value: *): string

public static

haveClass(classname: *): string

public static

haveContent(content: *): string

public static

haveStyle(styleName: *, value: *): string

public static

haveText(text: *): string

Alias of haveContent

public static

haveValue(value: *): string

public static

indexOf(i: *): string

public static
public static

notHaveAttribute(attrName: *, value: *): string

public static

notHaveClass(classname: *): string

public static

notHaveContent(content: *): string

public static

notHaveStyle(styleName: *, value: *): string

public static

notHaveText(text: *): string

Alias of notHaveContent

public static

notHaveValue(value: *): string

public static
public static

textIncludes(content: *): string

public static

textMatch(regexp: *): string

public static

valueIncludes(value: *): string

public static

valueMatch(regexp: *): string

Method Summary

Public Methods
public
public
public

closest(selector: *): Finder

public
public

haveAttribute(attrName: *, value: *): Finder

public

haveContent(content: *): Finder

public

haveCssClass(classname: *): Finder

public

haveCssProperty(propName: *, value: *): Finder

public

haveText(text: *): Finder

public

haveValue(val: *): Finder

public

indexOf(i: *): Finder

public
public
public
public

notHaveAttribute(attrName: *, value: *): Finder

public

notHaveContent(content: *): Finder

public

notHaveCssClass(classname: *): Finder

public

notHaveCssProperty(propName: *, value: *): Finder

public

notHaveText(text: *): Finder

public

notHaveValue(val: *): Finder

public
public

textIncludes(content: *): Finder

public

textMatch(regexp: *): Finder

public

valueIncludes(value: *): Finder

public

valueMatch(regexp: *): Finder

Static Public Methods

public static beChecked(bool: *): string source

Params:

NameTypeAttributeDescription
bool *

Return:

string

return function code to select elements which have given value as element.checked attribute.

public static beDisabled(bool: *): string source

Params:

NameTypeAttributeDescription
bool *

Return:

string

return function code to select elements which have given value as element.disabled attribute.

public static beSelected(bool: *): string source

Params:

NameTypeAttributeDescription
bool *

Return:

string

return function code to select elements which have given value as element.selected attribute.

public static closest(selector: *): string source

Params:

NameTypeAttributeDescription
selector *

Return:

string

return function code to map closest node which matches given selector.

public static haveAttribute(attrName: *, value: *): string source

Params:

NameTypeAttributeDescription
attrName *
value *

Return:

string

return function code to select elements which have given value in element.getAttribute(attrName)

public static haveClass(classname: *): string source

Params:

NameTypeAttributeDescription
classname *

Return:

string

return function code to select elements which have given value in element.classList attribute.

public static haveContent(content: *): string source

Params:

NameTypeAttributeDescription
content *

Return:

string

return function code to select elements which have given content as element.textContent

public static haveStyle(styleName: *, value: *): string source

Params:

NameTypeAttributeDescription
styleName *
value *

Return:

string

return function code to select elements which have given value in window.getComputedStyle(element)

public static haveText(text: *): string source

Alias of haveContent

Params:

NameTypeAttributeDescription
text *

Return:

string

return function code to select elements which have given content as element.textContent

public static haveValue(value: *): string source

Params:

NameTypeAttributeDescription
value *

Return:

string

return function code to select elements which have given value as element.value

public static indexOf(i: *): string source

Params:

NameTypeAttributeDescription
i *

Return:

string

return function code to select elements which is in given index in elements

public static isClickable(): string source

Return:

string

return css selector string to select clickable elements like a, button, input[type=button]

public static notHaveAttribute(attrName: *, value: *): string source

Params:

NameTypeAttributeDescription
attrName *
value *

Return:

string

return function code to select elements which do not have given value in element.getAttribute(attrName)

public static notHaveClass(classname: *): string source

Params:

NameTypeAttributeDescription
classname *

Return:

string

return function code to select elements which do not have given value in element.classList attribute.

public static notHaveContent(content: *): string source

Params:

NameTypeAttributeDescription
content *

Return:

string

return function code to select elements which do not have given content as element.textContent

public static notHaveStyle(styleName: *, value: *): string source

Params:

NameTypeAttributeDescription
styleName *
value *

Return:

string

return function code to select elements which do not have given value in window.getComputedStyle(element)

public static notHaveText(text: *): string source

Alias of notHaveContent

Params:

NameTypeAttributeDescription
text *

Return:

string

return function code to select elements which do not have given content as element.textContent

public static notHaveValue(value: *): string source

Params:

NameTypeAttributeDescription
value *

Return:

string

return function code to select elements which do not have given value as element.value

public static parent(): string source

Return:

string

return function code to map parent node.

public static textIncludes(content: *): string source

Params:

NameTypeAttributeDescription
content *

Return:

string

return function code to select elements which includes given content as element.textContent

public static textMatch(regexp: *): string source

Params:

NameTypeAttributeDescription
regexp *

Return:

string

return function code to select elements which match given regexp as element.textContent

public static valueIncludes(value: *): string source

Params:

NameTypeAttributeDescription
value *

Return:

string

return function code to select elements which includes given value as element.value

public static valueMatch(regexp: *): string source

Params:

NameTypeAttributeDescription
regexp *

Return:

string

return function code to select elements which match given regexp as element.value

Public Methods

public beChecked(): Finder source

Return:

Finder

return filtered Finder object which have been checked

public beSelected(): Finder source

Return:

Finder

return filtered Finder object which have been selected

public closest(selector: *): Finder source

Params:

NameTypeAttributeDescription
selector *

Return:

Finder

return Finder object for the closest node.

public first(): Finder source

Return:

Finder

return Finder for the first matched element. this is same to "indexOf(0)"

public haveAttribute(attrName: *, value: *): Finder source

Params:

NameTypeAttributeDescription
attrName *
value *

Return:

Finder

return filtered Finder object which have specified attribute-value

public haveContent(content: *): Finder source

Params:

NameTypeAttributeDescription
content *

Return:

Finder

return filtered Finder object which have the specified text

public haveCssClass(classname: *): Finder source

Params:

NameTypeAttributeDescription
classname *

Return:

Finder

return filtered Finder object which have specified CssClass

public haveCssProperty(propName: *, value: *): Finder source

Params:

NameTypeAttributeDescription
propName *
value *

Return:

Finder

return filtered Finder object which have specified CssProperty

public haveText(text: *): Finder source

Params:

NameTypeAttributeDescription
text *

Return:

Finder

return filtered Finder object which have the specified text

public haveValue(val: *): Finder source

Params:

NameTypeAttributeDescription
val *

Return:

Finder

return filtered Finder object which have the specified value

public indexOf(i: *): Finder source

Params:

NameTypeAttributeDescription
i *

Return:

Finder

return filtered Finder object which is in given index in elements

public isClickable(): Finder source

Return:

Finder

return filtered Finder object which is clickable like a, button, input[type=button]

public notBeChecked(): Finder source

Return:

Finder

return filtered Finder object which do not have been checked

public notBeSelected(): Finder source

Return:

Finder

return filtered Finder object which do not have been selected

public notHaveAttribute(attrName: *, value: *): Finder source

Params:

NameTypeAttributeDescription
attrName *
value *

Return:

Finder

return filtered Finder object which do not have specified attribute-value

public notHaveContent(content: *): Finder source

Params:

NameTypeAttributeDescription
content *

Return:

Finder

return filtered Finder object which does not have the specified text

public notHaveCssClass(classname: *): Finder source

Params:

NameTypeAttributeDescription
classname *

Return:

Finder

return filtered Finder object which do not have specified CssClass

public notHaveCssProperty(propName: *, value: *): Finder source

Params:

NameTypeAttributeDescription
propName *
value *

Return:

Finder

return filtered Finder object which do not have specified CssProperty

public notHaveText(text: *): Finder source

Params:

NameTypeAttributeDescription
text *

Return:

Finder

return filtered Finder object which does not have the specified text

public notHaveValue(val: *): Finder source

Params:

NameTypeAttributeDescription
val *

Return:

Finder

return filtered Finder object which does not have the specified value

public parent(): Finder source

Return:

Finder

return Finder object for the parent element.

public textIncludes(content: *): Finder source

Params:

NameTypeAttributeDescription
content *

Return:

Finder

return filtered Finder object whose textContent includes given content

public textMatch(regexp: *): Finder source

Params:

NameTypeAttributeDescription
regexp *

Return:

Finder

return filtered Finder object whose textContent matches given regexp

public valueIncludes(value: *): Finder source

Params:

NameTypeAttributeDescription
value *

Return:

Finder

return filtered Finder object whose value includes given value

public valueMatch(regexp: *): Finder source

Params:

NameTypeAttributeDescription
regexp *

Return:

Finder

return filtered Finder object whose value matches given regexp