-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feature/add label element #154
base: main
Are you sure you want to change the base?
Conversation
? ElementSelector.XpathSelector | ||
: ElementSelector.IdSelector; | ||
return ((Page) WebContext.Page).GetPlaywrightPage().Locator(selector); | ||
if (ElementSelector.XpathSelector != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to have selector validation here ? Does it mean that we will need to have it in every wrapper method? Isn't it better to have different class and methods for getting Locators, which will check the selector inside them ? E.G. - GetLocator(ElementSelector selector), GetSubLocator(ElementSelector selector, ElementSelector subSelector), GetParentLocator(ElementSelector selector, ElementSelector parentSelector) ?
return ((Page) WebContext.Page).GetPlaywrightPage().Locator(ElementSelector.XpathSelector); | ||
} | ||
|
||
if (ElementSelector.IdSelector != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess automation id selector has more priority than xpath if provided, no?
The PR adds: