Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FindByScriptAttribute #323

Closed
YevgeniyShunevych opened this issue Nov 5, 2019 · 0 comments
Closed

Add FindByScriptAttribute #323

YevgeniyShunevych opened this issue Nov 5, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@YevgeniyShunevych
Copy link
Member

@YevgeniyShunevych YevgeniyShunevych commented Nov 5, 2019

FindByScriptAttribute - specifies that a control should be found by specific script. The script should return an element or collection of elements. The script can also return null for the case when the element is not found. The scope element is passed to the script as an argument and can be used in the script as arguments[0].

Usage

Find in the scope of parent

[FindByScript("return arguments[0].querySelector('span.someclass')")]
public Control<_> SomeControl { get; private set; }

Find in the scope of whole page

[FindByScript("return document.querySelector('input[type=radio][value=OptionA]')")]
public RadioButton<_> OptionA { get; private set; }
@YevgeniyShunevych YevgeniyShunevych added this to the 1.4.0 milestone Nov 5, 2019
@YevgeniyShunevych YevgeniyShunevych self-assigned this Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.