-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bfe197b
Showing
20 changed files
with
520 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>talisma</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/test/java=UTF-8 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.crm</groupId> | ||
<artifactId>talisma</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>talisma</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.19.1</version> | ||
<configuration> | ||
<suiteXmlFiles> | ||
<suiteXmlFile>testng1.xml</suiteXmlFile> | ||
<suiteXmlFile>testng2.xml</suiteXmlFile> | ||
</suiteXmlFiles> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.maven.surefire</groupId> | ||
<artifactId>common-java5</artifactId> | ||
<version>2.16</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.seleniumhq.selenium</groupId> | ||
<artifactId>selenium-java</artifactId> | ||
<version>2.53.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.testng</groupId> | ||
<artifactId>testng</artifactId> | ||
<version>6.10</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi</artifactId> | ||
<version>3.15</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.17</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.aventstack</groupId> | ||
<artifactId>extentreports</artifactId> | ||
<version>3.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.hybrid.utility; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.chrome.ChromeDriver; | ||
import org.openqa.selenium.firefox.FirefoxDriver; | ||
import org.openqa.selenium.ie.InternetExplorerDriver; | ||
import org.openqa.selenium.support.ui.ExpectedConditions; | ||
import org.openqa.selenium.support.ui.Select; | ||
import org.openqa.selenium.support.ui.WebDriverWait; | ||
import org.testng.Assert; | ||
import org.testng.Reporter; | ||
|
||
public class utility { | ||
public static WebDriver driver; | ||
|
||
/** | ||
* This method initialize browser object | ||
* @param browser | ||
* @return browser driver | ||
*/ | ||
public static WebDriver selectBrowser(String browser){ | ||
if (browser.equals("firefox") || browser.equals("FIREFOX")) { | ||
driver = new FirefoxDriver(); | ||
driver.manage().window().maximize(); | ||
return driver; | ||
} else if (browser.equals("chrome") || browser.equals("CHROME")) { | ||
System.out.println("chrome browser"); | ||
System.setProperty("webdriver.chrome.driver",System.getProperty("user.dir")+ "\\src\\com\\actiTime\\BrowserDrivers\\chromedriver.exe"); | ||
driver = new ChromeDriver(); | ||
driver.manage().window().maximize(); | ||
return driver; | ||
} else if (browser.equals("ie") || browser.equals("IE")) { | ||
driver = new InternetExplorerDriver(); | ||
driver.manage().window().maximize(); | ||
return driver; | ||
} | ||
return null; | ||
} | ||
/** | ||
* | ||
* @param timeInsec | ||
*/ | ||
public void impliciteWait(int timeInsec){ | ||
Reporter.log("waiting for page to load..."); | ||
try{ | ||
driver.manage().timeouts().implicitlyWait(timeInsec, TimeUnit.SECONDS); | ||
Reporter.log("Page is loaded"); | ||
} | ||
catch(Throwable error){ | ||
Reporter.log("Timeout for Page Load Request to complete after "+ timeInsec + " seconds"); | ||
Assert.assertTrue(false, "Timeout for page load request after "+timeInsec+" second"); | ||
} | ||
} | ||
/** | ||
* | ||
* @param element | ||
* @param dropDownValue | ||
*/ | ||
public void seleteDropDownValue(WebElement element, String dropDownValue){ | ||
Select select = new Select(element); | ||
Reporter.log("selecting "+dropDownValue+" value in dropdown"); | ||
select.selectByVisibleText(dropDownValue); | ||
} | ||
|
||
public void driverwait(int timeToWaitInSec) throws InterruptedException{ | ||
Reporter.log("waiting for "+timeToWaitInSec+" seconds..."); | ||
Thread.sleep(timeToWaitInSec*1000); | ||
} | ||
|
||
public static void expliciteWait(WebElement element, int timeToWaitInSec) { | ||
WebDriverWait wait = new WebDriverWait(driver, timeToWaitInSec); | ||
wait.until(ExpectedConditions.visibilityOf(element)); | ||
} | ||
|
||
} |
2 changes: 2 additions & 0 deletions
2
src/main/java/com/hybridframework/config/Repositories.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test=test1 | ||
testname=login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
url=http://localhost/login.do | ||
userName = admin | ||
password = manager | ||
browser = firefox |
Binary file not shown.
Empty file.
3 changes: 3 additions & 0 deletions
3
src/main/java/com/hybridframework/properties/homepage.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
username=xpath: //*[@id='username'] | ||
password=id:usename | ||
submitbutton=class:username |
Oops, something went wrong.