This is an example project, which extends Selenium Page Factory pattern, to work with AngularJS applications. Approach is to NOT to use @FindBy provided by Selenium. This is purely because @FindBy is very helpful for static elements (not for elements that are dynamically loaded). In AngularJS applications, elements are not loaded instantly and Selenium needs to wait for the element to load or do a regular check for it's existence (using Expected conditions). In that cases, @FindBy would not work and you have to use By selectors.
This project uses
- Use Webdriver
- Page Factory Pattern
- Specs
- Install Gauge
- Install Java 1.7
- [Install Gauge-Java plugin] by running
gauge install java
Using the "APP_ENDPOINT" /env/default/default.properties
- The SUT should be available at http://newtours.demoaut.com
This project requires maven to install dependencies. To install dependencies re-import maven dependencies using IntelliJ IDEA.
mvn gauge:execute -DspecsDir=specs
This will also compile all the supporting code implementations.