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 support xpath in playground button #31241

Closed
wants to merge 2 commits into from

Conversation

pouryet
Copy link

@pouryet pouryet commented Mar 10, 2025

Using this code, we can see the xpath address for each element in the playground button. This can prevent possible bugs in finding the css element. Also, for this, we need to install the xpath plugin.
"cypress-xpath" plugin: "^2.0.1" added. To find xpath using playground, I remind you that after this change, you must find the elements with the get.xpath command.

According to my experiences using application testers, I found that finding elements using xpath is the best way to write tests. Also, if you don't use this feature like other testers, you will be left behind in the market. CSS is always changing and is not a good option for selecting elements. On the other hand, adding the xpath plugin alone is not enough to make testing easier because we have to manually find the xpaths and add them to the code. The best solution is to use the playground button.

pouryet added 2 commits March 10, 2025 11:23
Using this code, we can see the xpath address for each element in the playground button. This can prevent possible bugs in finding the css element. Also, for this, we need to install the xpath plugin.
"cypress-xpath" plugin: "^2.0.1" added. To find xpath using playground, I remind you that after this change, you must find the elements with the get.xpath command.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cypress-app-bot
Copy link
Collaborator

@pouryet pouryet closed this by deleting the head repository Mar 10, 2025
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