https://github.com/anazalu/tdl-cucumber-one
https://github.com/anazalu/tdl-cucumber-one
cucumber-java gherkin selenium-webdriver testng xpath
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anazalu/tdl-cucumber-one
- Owner: anazalu
- License: mit
- Created: 2024-04-13T16:30:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-05T08:02:00.000Z (over 1 year ago)
- Last Synced: 2024-12-30T20:31:01.787Z (9 months ago)
- Topics: cucumber-java, gherkin, selenium-webdriver, testng, xpath
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tdl-cucumber-one
A test project to try BDD. Here, on top of the usual Selenium and TestNG, we use Cucumber. Feature files are written in Gherkin, step definitions are in Java.
## Website under test
www.automationexercise.com
## Useful commands
### Running XPath in the Chrome console
```
document.evaluate("//h2[contains(., 'All Products')]", document, null, XPathResult.ANY_TYPE, null).iterateNext()
document.evaluate("//div[@class='productinfo text-center'][p='Blue Top']/a[@class='btn btn-default add-to-cart']", document, null, XPathResult.ANY_TYPE, null).iterateNext()
```