Skip to content

Commit 3df9be1

Browse files
author
Mohammed Hossen
committed
Initial Commit
0 parents  commit 3df9be1

File tree

17 files changed

+448
-0
lines changed

17 files changed

+448
-0
lines changed

.idea/compiler.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/uiDesigner.xml

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SeleniumFramework.iml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4" />

pom.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>MSH1319</groupId>
8+
<artifactId>org.Test.SeleniumFramework</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<build>
11+
<plugins>
12+
<plugin>
13+
<groupId>org.apache.maven.plugins</groupId>
14+
<artifactId>maven-compiler-plugin</artifactId>
15+
<configuration>
16+
<source>9</source>
17+
<target>9</target>
18+
</configuration>
19+
</plugin>
20+
</plugins>
21+
</build>
22+
<dependencies>
23+
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
24+
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
25+
<dependency>
26+
<groupId>org.seleniumhq.selenium</groupId>
27+
<artifactId>selenium-java</artifactId>
28+
<version>3.12.0</version>
29+
</dependency>
30+
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-support -->
31+
<dependency>
32+
<groupId>org.seleniumhq.selenium</groupId>
33+
<artifactId>selenium-support</artifactId>
34+
<version>3.12.0</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.testng</groupId>
38+
<artifactId>testng</artifactId>
39+
<version>6.14.2</version>
40+
<scope>test</scope>
41+
</dependency>
42+
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
43+
<dependency>
44+
<groupId>org.seleniumhq.selenium</groupId>
45+
<artifactId>selenium-chrome-driver</artifactId>
46+
<version>3.12.0</version>
47+
</dependency>
48+
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-firefox-driver -->
49+
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-firefox-driver -->
50+
<dependency>
51+
<groupId>org.seleniumhq.selenium</groupId>
52+
<artifactId>selenium-firefox-driver</artifactId>
53+
<version>3.12.0</version>
54+
</dependency>
55+
</dependencies>
56+
57+
</project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package Helpers;
2+
3+
import org.openqa.selenium.WebDriver;
4+
5+
public class BrowserHerlper {
6+
public void RefreshCurrentPage(WebDriver driver) {
7+
driver.navigate().refresh();
8+
}
9+
10+
public void GoBack(WebDriver driver) {
11+
driver.navigate().back();
12+
}
13+
14+
public void GoForward(WebDriver driver) {
15+
driver.navigate().forward();
16+
}
17+
18+
public void BrowserMaximize(WebDriver driver) {
19+
driver.manage().window().maximize();
20+
}
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package Helpers;
2+
3+
import org.openqa.selenium.By;
4+
import org.openqa.selenium.WebDriver;
5+
import org.openqa.selenium.WebElement;
6+
import org.openqa.selenium.interactions.Actions;
7+
8+
public class MouseHelper {
9+
Actions action;
10+
WebElement element;
11+
12+
public void MouseHover(WebDriver driver, By locator) {
13+
action = new Actions(driver);
14+
element = driver.findElement(locator);
15+
action.moveToElement(element).build().perform();
16+
}
17+
18+
public void MouseHoverClick(WebDriver driver, By locator) {
19+
action = new Actions(driver);
20+
element = driver.findElement(locator);
21+
action.moveToElement(element).click().build().perform();
22+
}
23+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package Helpers;
2+
3+
import Settings.ObjectRepo;
4+
import org.openqa.selenium.WebDriver;
5+
6+
public class NavigationHelper {
7+
public void NavigateToUrl(WebDriver driver, String url) {
8+
driver.navigate().to(url);
9+
}
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package Settings;
2+
3+
import Helpers.BrowserHerlper;
4+
import Helpers.MouseHelper;
5+
import Helpers.NavigationHelper;
6+
7+
public class ClassRepo {
8+
public BrowserHerlper browser = new BrowserHerlper();
9+
public NavigationHelper navigation = new NavigationHelper();
10+
public MouseHelper mouse = new MouseHelper();
11+
}

0 commit comments

Comments
 (0)