https://github.com/rahulrathore44/parallemodularframework
Selenium Modular Framework with Parallel execution support
https://github.com/rahulrathore44/parallemodularframework
modular-design selenium selenium-modular-framework selenium-webdriver webdriver webdriver-3
Last synced: about 1 month ago
JSON representation
Selenium Modular Framework with Parallel execution support
- Host: GitHub
- URL: https://github.com/rahulrathore44/parallemodularframework
- Owner: rahulrathore44
- License: gpl-3.0
- Created: 2016-08-04T15:28:10.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-25T09:45:04.000Z (almost 10 years ago)
- Last Synced: 2025-05-07T19:16:13.405Z (about 1 year ago)
- Topics: modular-design, selenium, selenium-modular-framework, selenium-webdriver, webdriver, webdriver-3
- Language: Java
- Homepage: https://www.youtube.com/user/fluxay44
- Size: 20.6 MB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
###Parallel Modular Framework
Selenium Modular Framework with Parallel execution support using Testng.
It also support the execution in grid enviroment.
User need to setup node and hub manually and specify the details inside the xml file.
Refer to the below example
The framework has following features
1. Modular Design
2. Maven based framework
3. Log4j enabled for logging
4. Report Generation (Excel & Extent reports)
5. Helper class to handle web component such as (Button,Link etc)
6. Centralized Configuration (Using Properties file)
7. POM
8. Support reading the data form Excel and Database.
9. Parallel Execution
10. Grid Support
###Here is the basic code:
Extend your test class with TestCaseBase class, all the object to handle the web component will be available.
```java
try {
button = new ButtonHelper(dDriver);
alert = new AlertHelper(dDriver);
javaScript = new JavaScriptHelper(dDriver);
browser = new BrowserHelper(dDriver);
chkBox = new CheckBoxOrRadioButtonHelper(dDriver);
wait = new WaitHelper(dDriver, rReader);
dropDown = new DropDownHelper(dDriver);
link = new LinkHelper(dDriver);
navigate = new NavigationHelper(dDriver);
txtBox = new TextBoxHelper(dDriver);
} catch (Exception e) {
throw e;
}
```
Use the object directly to interact with web component
```java
package com.modular.parallel;
import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.modular.parallel.helper.TestCaseBase;
/**
* @author rahul.rathore
*
* 07-Aug-2016
*
*/
public class TestDropDown extends TestCaseBase {
@Test
public void linkHelperTest() throws Exception {
getDriver().get("https://www.pluralsight.com/");
wait.elementExistAndVisible(By.partialLinkText("Business"), getConfigReader().getExplicitWait(), 250);
link.clickPartialLink("Business");
Thread.sleep(3000);
Assert.assertEquals(getDriver().getTitle(), "Group Plans | Pluralsight");
}
}
```
### Use the testng.xml file to run the test cases sequentially or parallely
```xml
```
### Use the gridtestng.xml file to run the test cases on grid. User need to setup the node and hub manually and sepcify the details in gridtestng.xml
```xml
```
### To see this whole thing running simply checkout this project and run this command:
`mvn clean generate-sources test`