Attribute
Hierarchy
- Question<Promise<string>>
- Attribute
Implements
- MetaQuestion<PageElement, Question<Promise<string>>>
Index
Methods
staticcalled
Instantiates a Question that uses the actor’s ability to BrowseTheWeb to retrieve the value of the specified HTML attribute of a given PageElement.
Parameters
name: Answerable<string>
The name of the attribute to retrieve
Returns Attribute
as
Maps this question to one of a different type.
Question.about('number returned as string', actor => '42') // returns: QuestionAdapter<string>
.as(Number) // returns: QuestionAdapter<number>Type parameters
- O
Parameters
mapping: (answer: string) => O | Promise<O>
Returns QuestionAdapter<O>
of
Parameters
pageElement: PageElement<any> | QuestionAdapter<PageElement<any>>
Returns MetaQuestionAdapter<PageElement<any>, string>
answeredBy
Parameters
actor: AnswersQuestions & UsesAbilities
Returns Promise<string>
describedAs
Parameters
subject: string
Returns Attribute
toString
Returns string
Uses the actor’s ability to BrowseTheWeb to retrieve the value of the specified HTML attribute of a given PageElement.
Example widget
Retrieve an HTML attribute of a given PageElement
Using
Attribute
as QuestionAdapterUsing as filter in Page Element Query Language
Learn more