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 isPresent command to new Element API #4154

Closed

Conversation

Aman-Pal07
Copy link

This pull request adds the missing isPresent command to the new Element API in Nightwatch.js. The isPresent command allows users to check if an element is present on the page.

I've implemented the isPresent command in a new file named isPresent.js in the lib/api/web-element/commands directory. The command uses the isElementPresent method from the Selenium WebDriver protocol to check for the presence of an element.

I've also added a JSDoc comment for the isPresent command to provide usage examples and documentation for users. Additionally, I've included tests for the new command to ensure its correctness and functionality.

This pull request resolves issue #4055.

@dikwickley
Copy link
Contributor

@AMAN-CREATION

This will not work as there is no isElementPresent command in the method-mapping.js file.
Moreover, there seems to be code for other things as well (in find.js & findAll.js) and other things that should not be committed (like package-lock.json & snapshot.html)

Please test your solution. Thanks.

@garg3133 garg3133 closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants