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 isVisible and isDisplayed commands to Element API #4094

Closed
wants to merge 2 commits into from
Closed

Add isVisible and isDisplayed commands to Element API #4094

wants to merge 2 commits into from

Conversation

sarthu210
Copy link

This pull request adds support for the isVisible and isDisplayed commands to the Nightwatch.js Element API. These commands allow users to check whether a web element is visible on the page, providing valuable functionality for verifying element visibility in automated tests.

Changes Made:

Added isVisible.js command file to lib/api/web-element/commands directory.
Implemented isVisible command functionality, leveraging the existing Selenium WebDriver method mappings.
Added isDisplayed.js command file as an alias to isVisible command.
Included error handling to gracefully handle any exceptions during the visibility check.
Updated class names to follow industry best practices and improve code readability.
Testing:

Tested the new commands locally by integrating them into test scripts and verifying their functionality.
Ensured that the commands work as expected in various scenarios, including when elements are visible and when they are not.
Verified that error handling behaves as intended, providing reliable feedback to users.
Purpose:

The purpose of this pull request is to enhance the capabilities of the Nightwatch.js Element API by introducing commands for checking element visibility. These commands contribute to the overall usability and effectiveness of Nightwatch.js for automated testing.

Additional Notes:

Please review the code and provide feedback on any improvements or modifications that may be necessary.
I'm open to discussion and willing to make changes as needed to ensure the quality and compatibility of these commands with the Nightwatch.js codebase.

@CLAassistant
Copy link

CLAassistant commented Mar 6, 2024

CLA assistant check
All committers have signed the CLA.

@sarthu210
Copy link
Author

Add isVisible and isDisplayed commands

@garg3133
Copy link
Member

garg3133 commented Mar 8, 2024

#4039 is already merged for adding isVisible() command. You can check #4105 for adding just the isDisplayed alias for the isVisible command. Please read the issue properly before creating a new PR. Closing this one.

@garg3133 garg3133 closed this Mar 8, 2024
@sarthu210
Copy link
Author

#4039 is already merged for adding isVisible() command. You can check #4105 for adding just the isDisplayed alias for the isVisible command. Please read the issue properly before creating a new PR. Closing this one.

sorry Sir I apologize for that, I am a beginner here but from next time I will read all issue carefully ThankYou!

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.

3 participants