Вы находитесь на странице: 1из 2

GGA Selenium Framework

Overview
GGA Selenium Framework is a Java library developed for test automation using Selenium
WebDriver. It is based on Maven structure and integrates with the TestNG testing framework. The
GGA Selenium Framework provides rapid test automation for Web applications and allows focusing
on substantial test development instead of tiresome testware maintenance.

Framework Features
 Predefined declaration of visual objects
 Native window access support using AutoIt library
 Detailed html report
 Improved tests logging
 Integration with Cucumber tool
 Javascript execution support
 Runs on the most platforms which Java supports
 Demo examples

How to Use
1. Change the pom.xml file of Maven project:
o Add the following dependencies:

o <dependency>
o <groupId>org.seleniumhq.selenium</groupId>
o <artifactId>selenium-java</artifactId>
o <version>2.42.2</version>
o </dependency>
o <dependency>
o <groupId>com.ggasoftware.uitest</groupId>
o <artifactId>gga-selenium-framework-core</artifactId>
o <version>1.0</version>
o </dependency>
o Add the XML suit file and listener to the maven-surefire-plugin configuration:
o <suiteXmlFiles>
o <suiteXmlFile>src/test/resources/${testng_xml}</suiteXmlFile>
o </suiteXmlFiles>
o <property>
o <name>listener</name>
o <value>com.ggasoftware.uitest.utils.InvokedMethodListener,
o org.uncommons.reportng.mod.HTMLReporter</value>
o </property>

2. Create base class that extends the TestBaseWebDriver class with TestNG annotations:
3. @BeforeTest
4. public void setUp() throws MalformedURLException {
5. setBrowserType("firefox");
6. initWebDriver();
7. WebDriverWrapper.open("https://www.google.com");
8. }
9.
10. @AfterTest
11. public void quit() {
12. WebDriverWrapper.quit();
13. }
14. “Firefox” is the default browser for WebDriver. For using different browsers, please, download
appropriate drivers (Download Selenium) and add environment variables.
For project base class it could be like:

System.setProperty("webdriver.chrome.driver", chromeDriverPath);
System.setProperty("webdriver.ie.driver", ieDriverPath);
15. For using AutoIt library, please, download AutoItX3.dll (AutoIt Downloads) and add environment
variable.
For project base class it is:

System.setProperty("AutoItX3.dll.path", autoItDllPath));

Use standard TestNG plugin commands: run or debug for running a specific test. Use Maven
lifecycle command test for running the test suit and creating the HTML report. Use command line for
running a test suit: mvn.bat clean test

Вам также может понравиться