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

FinderAction

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

Static Member Summary

Static Public Members
public static get

click: *

public static get

count: *

public static get

text: *

public static get

value: *

Static Method Summary

Static Public Methods
public static

attribute(attrName: *): string

public static

setChecked(bool: *): string

public static

setSelected(bool: *): string

public static

setText(text: *): string

public static

setValue(val: *): string

Method Summary

Public Methods
public

attribute(attrName: *): Promise

Get a attribute of element which is found first by Finder.

public

Set "checked" property true on all elements which is found by Finder

public

Alias of "click"

public

Click an element which is found first by Finder

public

Get a count of elements which is found by Finder.

public
public

fillIn(val: *): *

Alias of "setValue"

public
public

Set "selected" property true on element which is found by Finder

public

setText(text: *): Promise

Set given text to textContent of all elements which is found by Finder

public

setValue(val: *): Promise

Set given value to value of all elements which is found by Finder

public

text(): *

public

Set "checked" property true on all elements which is found by Finder

public

Get a value of element which is found first by Finder.

Static Public Members

public static get click: * source

public static get count: * source

public static get text: * source

public static get value: * source

Static Public Methods

public static attribute(attrName: *): string source

Params:

NameTypeAttributeDescription
attrName *

Return:

string

public static setChecked(bool: *): string source

Params:

NameTypeAttributeDescription
bool *

Return:

string

public static setSelected(bool: *): string source

Params:

NameTypeAttributeDescription
bool *

Return:

string

public static setText(text: *): string source

Params:

NameTypeAttributeDescription
text *

Return:

string

public static setValue(val: *): string source

Params:

NameTypeAttributeDescription
val *

Return:

string

Public Methods

public attribute(attrName: *): Promise source

Get a attribute of element which is found first by Finder.

Params:

NameTypeAttributeDescription
attrName *

Return:

Promise

Promise resolved with element.attributes[attrName].value

public check(): Promise source

Set "checked" property true on all elements which is found by Finder

Return:

Promise

public chooseRadioButton(): Promise source

Alias of "click"

Return:

Promise

public click(): Promise source

Click an element which is found first by Finder

Return:

Promise

Promise resolved after click event

public count(): Promise source

Get a count of elements which is found by Finder.

Return:

Promise

Promise resolved with matched number

public exist(): Promise source

Return:

Promise

return true if count of elements which is found by Finder is over one.

public fillIn(val: *): * source

Alias of "setValue"

Params:

NameTypeAttributeDescription
val *

Return:

*

public notExist(): Promise source

Return:

Promise

return true if count of elements which is found by Finder is zero.

public select(): Promise source

Set "selected" property true on element which is found by Finder

Return:

Promise

public setText(text: *): Promise source

Set given text to textContent of all elements which is found by Finder

Params:

NameTypeAttributeDescription
text *

Return:

Promise

Promise resolved after setting textContent

public setValue(val: *): Promise source

Set given value to value of all elements which is found by Finder

Params:

NameTypeAttributeDescription
val *

Return:

Promise

Promise resolved after setting value

public text(): * source

Return:

*

public uncheck(): Promise source

Set "checked" property true on all elements which is found by Finder

Return:

Promise

public value(): Promise source

Get a value of element which is found first by Finder.

Return:

Promise

Promise resolved with element.value