-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 additional commands for new Element API #4261
base: main
Are you sure you want to change the base?
Conversation
Status
|
const isActive = await this.driver.executeScript(` | ||
const el = arguments[0]; | ||
return el === document.activeElement; | ||
`, element); |
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.
Shouldn't we use this endpoint to get the active element?
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.
this actually returns the active element, so we won't be able to get the element here to check if the element is that element only.
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.
Can we add just a few basic tests here, similar to done in other commands?
@garg3133 added some tests. |
@dikwickley I just found out that we in fact already have the implementations for the computedrole and computedlabel under the command names of Also, for the |
@dikwickley Any updates here? |
@garg3133 i will add the new aliases and will send in the code for isActive soon. |
This PR adds three new additional commands to the new Element API
Fixes: dikwickley/gsoc24#6
Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.
examples/tests
directory of the project) and running them.ecosia.js
andduckDuckGo.js
are good examples to work with.features/my-new-feature
orissue/123-my-bugfix
);