├── SeleniumJavaFramework ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── drivers │ ├── chromedriver │ │ └── chromedriver.exe │ ├── geckodriver │ │ └── geckodriver.exe │ └── iedriver │ │ └── IEDriverServer.exe ├── excel │ ├── data.xls │ └── data.xlsx ├── extent.html ├── extentReports.html ├── logs │ ├── MyLogs.log │ └── MyLogs1.log ├── pom.xml ├── src │ ├── main │ │ ├── java │ │ │ └── demo │ │ │ │ ├── ExceptionHandlingDemo.java │ │ │ │ └── Log4jDemo.java │ │ └── resources │ │ │ ├── log4j2.properties │ │ │ └── log4j2.xml │ └── test │ │ └── java │ │ ├── BrowserTest.java │ │ ├── DesiredCapabilities_Demo.java │ │ ├── config │ │ ├── PropertiesFile.java │ │ └── config.properties │ │ ├── demo │ │ ├── ApplitoolsDemo.java │ │ ├── AutoITDemo.java │ │ ├── BrowserStackDemo.java │ │ ├── FluentWaitDemo.java │ │ ├── GitHubDemo.java │ │ ├── HeadlessChromeDemo.java │ │ ├── SauceLabsDemo.java │ │ ├── SeleniumWaitDemo.java │ │ ├── Test1.java │ │ ├── TestNGDependencyDemo.java │ │ ├── TestNGGroupsDemo.java │ │ ├── TestNGIgnoreDemo.java │ │ ├── TestNGMultiBrowserDemo.java │ │ ├── TestNGParallelTestingDemo.java │ │ ├── TestNGParametersDemo.java │ │ ├── TestNGPriorityDemo.java │ │ └── TestNGRetryFailedDemo.java │ │ ├── listeners │ │ ├── RetryAnalyzer.java │ │ ├── TestNGListenerDemo.java │ │ ├── TestNGListenerDemo2.java │ │ └── TestNGListeners.java │ │ ├── pages │ │ ├── GoogleSearchPage.java │ │ └── GoogleSearchPageObjects.java │ │ ├── test │ │ ├── DesiredCapabilitiesDemo.java │ │ ├── ExtendReportsBasicDemo.java │ │ ├── ExtentReportsDemoWithTestNG.java │ │ ├── GoogleSeachTest.java │ │ ├── GoogleSearchPageTest.java │ │ ├── Test1_GoogleSearch.java │ │ ├── TestNG_Demo.java │ │ └── TestNG_Demo2.java │ │ └── utils │ │ ├── ExcelDataProvider.java │ │ ├── ExcelUtils.java │ │ └── ExcelUtilsDemo.java ├── target │ ├── .gitignore │ └── maven-status │ │ └── maven-compiler-plugin │ │ ├── compile │ │ └── default-compile │ │ │ └── inputFiles.lst │ │ └── testCompile │ │ └── default-testCompile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst ├── test-output │ ├── Default suite │ │ ├── Default test.html │ │ ├── Default test.xml │ │ └── testng-failed.xml │ ├── Failed suite [Default suite] │ │ ├── Default test(failed).html │ │ ├── Default test(failed).xml │ │ └── testng-failed.xml │ ├── Failed suite [Suite1] │ │ ├── Test1(failed).html │ │ └── Test1(failed).xml │ ├── Suite │ │ ├── Chrome Test.html │ │ ├── Chrome Test.xml │ │ ├── Firefox Test.html │ │ ├── Firefox Test.xml │ │ ├── IE Test.html │ │ ├── IE Test.xml │ │ ├── Test.html │ │ ├── Test.xml │ │ └── testng-failed.xml │ ├── Suite1 │ │ ├── Test1.html │ │ ├── Test1.xml │ │ ├── TestOnChrome.html │ │ ├── TestOnChrome.xml │ │ ├── TestOnFirefox.html │ │ ├── TestOnFirefox.xml │ │ ├── TestOnIE.html │ │ ├── TestOnIE.xml │ │ └── testng-failed.xml │ ├── bullet_point.png │ ├── collapseall.gif │ ├── emailable-report.html │ ├── failed.png │ ├── index.html │ ├── jquery-1.7.1.min.js │ ├── junitreports │ │ ├── TEST-demo.Demo1.xml │ │ ├── TEST-demo.FluentWaitDemo.xml │ │ ├── TEST-demo.Test1.xml │ │ ├── TEST-demo.TestNGDependencyDemo.xml │ │ ├── TEST-demo.TestNGGroupingDemo.xml │ │ ├── TEST-demo.TestNGGroupsDemo.xml │ │ ├── TEST-demo.TestNGIgnoreDemo.xml │ │ ├── TEST-demo.TestNGIgnoreTestDemo.xml │ │ ├── TEST-demo.TestNGMultiBrowserDemo.xml │ │ ├── TEST-demo.TestNGMultiBrowserTestingDemo.xml │ │ ├── TEST-demo.TestNGParallelTestingDemo.xml │ │ ├── TEST-demo.TestNGParametersDemo.xml │ │ ├── TEST-demo.TestNGPriorityDemo.xml │ │ ├── TEST-demo.TestNGRerunFailedDemo.xml │ │ ├── TEST-demo.TestNGRetryFailedDemo.xml │ │ ├── TEST-demo1.TestNGPriorityDemo.xml │ │ ├── TEST-listeners.TestNGListenerDemo.xml │ │ ├── TEST-listeners.TestNGListenerDemo2.xml │ │ ├── TEST-listeners.TestNGListenerDemo3.xml │ │ ├── TEST-test.DesiredCapabilitiesDemo.xml │ │ ├── TEST-test.ExtentReportsDemoWithTestNG.xml │ │ ├── TEST-test.ExtentReportsWithTestNG_Demo.xml │ │ ├── TEST-test.PropFileDemo.xml │ │ ├── TEST-test.TestNG_Demo.xml │ │ ├── TEST-test.TestNG_Demo2.xml │ │ ├── TEST-utils.ExcelDataProvider.xml │ │ └── TEST-utils.ExcelDataProvider2.xml │ ├── navigator-bullet.png │ ├── old │ │ ├── Default suite │ │ │ ├── Default test.properties │ │ │ ├── classes.html │ │ │ ├── groups.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── methods-alphabetical.html │ │ │ ├── methods-not-run.html │ │ │ ├── methods.html │ │ │ ├── reporter-output.html │ │ │ ├── testng.xml.html │ │ │ └── toc.html │ │ ├── Failed suite [Default suite] │ │ │ ├── Default test(failed).properties │ │ │ ├── classes.html │ │ │ ├── groups.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── methods-alphabetical.html │ │ │ ├── methods-not-run.html │ │ │ ├── methods.html │ │ │ ├── reporter-output.html │ │ │ ├── testng.xml.html │ │ │ └── toc.html │ │ ├── Failed suite [Suite1] │ │ │ ├── Test1(failed).properties │ │ │ ├── classes.html │ │ │ ├── groups.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── methods-alphabetical.html │ │ │ ├── methods-not-run.html │ │ │ ├── methods.html │ │ │ ├── reporter-output.html │ │ │ ├── testng.xml.html │ │ │ └── toc.html │ │ ├── Suite │ │ │ ├── Chrome Test.properties │ │ │ ├── Firefox Test.properties │ │ │ ├── IE Test.properties │ │ │ ├── Test.properties │ │ │ ├── classes.html │ │ │ ├── groups.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── methods-alphabetical.html │ │ │ ├── methods-not-run.html │ │ │ ├── methods.html │ │ │ ├── reporter-output.html │ │ │ ├── testng.xml.html │ │ │ └── toc.html │ │ ├── Suite1 │ │ │ ├── Test1.properties │ │ │ ├── TestOnChrome.properties │ │ │ ├── TestOnFirefox.properties │ │ │ ├── TestOnIE.properties │ │ │ ├── classes.html │ │ │ ├── groups.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── methods-alphabetical.html │ │ │ ├── methods-not-run.html │ │ │ ├── methods.html │ │ │ ├── reporter-output.html │ │ │ ├── testng.xml.html │ │ │ └── toc.html │ │ └── index.html │ ├── passed.png │ ├── skipped.png │ ├── testng-failed.xml │ ├── testng-reports.css │ ├── testng-reports.js │ ├── testng-results.xml │ └── testng.css ├── testng1.xml ├── testng2.xml ├── testng3.xml ├── testng4.xml ├── testng5.xml └── testng6.xml └── _config.yml /SeleniumJavaFramework/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SeleniumJavaFramework 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 3 | org.eclipse.jdt.core.compiler.compliance=1.5 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.release=disabled 6 | org.eclipse.jdt.core.compiler.source=1.5 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/drivers/chromedriver/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/drivers/chromedriver/chromedriver.exe -------------------------------------------------------------------------------- /SeleniumJavaFramework/drivers/geckodriver/geckodriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/drivers/geckodriver/geckodriver.exe -------------------------------------------------------------------------------- /SeleniumJavaFramework/drivers/iedriver/IEDriverServer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/drivers/iedriver/IEDriverServer.exe -------------------------------------------------------------------------------- /SeleniumJavaFramework/excel/data.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/excel/data.xls -------------------------------------------------------------------------------- /SeleniumJavaFramework/excel/data.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/excel/data.xlsx -------------------------------------------------------------------------------- /SeleniumJavaFramework/logs/MyLogs.log: -------------------------------------------------------------------------------- 1 | [TRACE] 2018-08-06 15:36:06.796 [main] Log4jDemo - This is trace messages 2 | [INFO ] 2018-08-06 15:36:06.801 [main] Log4jDemo - This is information message 3 | [ERROR] 2018-08-06 15:36:06.802 [main] Log4jDemo - This is an error message 4 | [WARN ] 2018-08-06 15:36:06.805 [main] Log4jDemo - This is a warning message 5 | [FATAL] 2018-08-06 15:36:06.806 [main] Log4jDemo - This is a fatal message 6 | [TRACE] 2018-08-06 15:48:43.419 [main] Log4jDemo - This is trace messages 7 | [INFO ] 2018-08-06 15:48:43.425 [main] Log4jDemo - This is information message 8 | [ERROR] 2018-08-06 15:48:43.425 [main] Log4jDemo - This is an error message 9 | [WARN ] 2018-08-06 15:48:43.425 [main] Log4jDemo - This is a warning message 10 | [FATAL] 2018-08-06 15:48:43.425 [main] Log4jDemo - This is a fatal message 11 | [INFO ] 2018-08-07 06:27:04.467 [main] Log4jDemo - Browser started 12 | [INFO ] 2018-08-07 06:27:05.046 [main] Log4jDemo - Navigated to google.com 13 | [TRACE] 2018-08-07 15:06:16.679 [main] Log4jDemo - This is trace messages 14 | [INFO ] 2018-08-07 15:06:16.685 [main] Log4jDemo - This is information message 15 | [ERROR] 2018-08-07 15:06:16.686 [main] Log4jDemo - This is an error message 16 | [WARN ] 2018-08-07 15:06:16.686 [main] Log4jDemo - This is a warning message 17 | [FATAL] 2018-08-07 15:06:16.686 [main] Log4jDemo - This is a fatal message 18 | [INFO ] 2018-08-07 15:49:50.500 [main] Log4jDemo - Browser started 19 | [INFO ] 2018-08-07 15:49:50.875 [main] Log4jDemo - Navigated to google.com 20 | [INFO ] 2018-08-07 15:50:14.851 [main] Log4jDemo - Browser started 21 | [INFO ] 2018-08-07 15:50:15.421 [main] Log4jDemo - Navigated to google.com 22 | [INFO ] 2018-08-07 15:50:35.574 [main] Log4jDemo - Browser started 23 | [INFO ] 2018-08-07 15:50:36.125 [main] Log4jDemo - Navigated to google.com 24 | [INFO ] 2018-08-07 15:52:13.619 [main] Log4jDemo - Browser started 25 | [INFO ] 2018-08-07 15:52:14.187 [main] Log4jDemo - Navigated to google.com 26 | [INFO ] 2018-08-07 15:53:17.181 [main] Log4jDemo - Browser started 27 | [INFO ] 2018-08-07 15:53:17.697 [main] Log4jDemo - Navigated to google.com 28 | [INFO ] 2018-08-07 15:53:47.890 [main] Log4jDemo - Browser started 29 | [INFO ] 2018-08-07 15:53:48.461 [main] Log4jDemo - Navigated to google.com 30 | [INFO ] 2018-08-07 15:54:49.793 [main] Log4jDemo - Browser started 31 | [INFO ] 2018-08-07 15:54:50.389 [main] Log4jDemo - Navigated to google.com 32 | [INFO ] 2018-08-07 15:55:19.663 [main] Log4jDemo - Browser started 33 | [INFO ] 2018-08-07 15:55:20.242 [main] Log4jDemo - Navigated to google.com 34 | [INFO ] 2018-08-07 16:24:07.103 [main] Log4jDemo - Browser started 35 | [INFO ] 2018-08-07 16:24:07.445 [main] Log4jDemo - Navigated to google.com 36 | [INFO ] 2018-08-07 16:24:32.841 [main] Log4jDemo - Browser started 37 | [INFO ] 2018-08-07 16:24:33.406 [main] Log4jDemo - Navigated to google.com 38 | [INFO ] 2018-08-07 16:25:21.280 [main] Log4jDemo - Browser started 39 | [INFO ] 2018-08-07 16:25:21.829 [main] Log4jDemo - Navigated to google.com 40 | [INFO ] 2018-08-07 16:26:22.786 [main] Log4jDemo - Browser started 41 | [INFO ] 2018-08-07 16:26:23.427 [main] Log4jDemo - Navigated to google.com 42 | [INFO ] 2018-08-11 12:28:26.622 [main] Log4jDemo - Browser started 43 | [INFO ] 2018-08-11 12:28:27.312 [main] Log4jDemo - Navigated to google.com 44 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/logs/MyLogs1.log: -------------------------------------------------------------------------------- 1 | [TRACE] 2018-08-06 15:55:33.289 [main] Log4jDemo - This is trace messages 2 | [INFO ] 2018-08-06 15:55:33.300 [main] Log4jDemo - This is information message 3 | [ERROR] 2018-08-06 15:55:33.300 [main] Log4jDemo - This is an error message 4 | [WARN ] 2018-08-06 15:55:33.300 [main] Log4jDemo - This is a warning message 5 | [FATAL] 2018-08-06 15:55:33.300 [main] Log4jDemo - This is a fatal message 6 | [TRACE] 2018-08-06 15:55:37.552 [main] Log4jDemo - This is trace messages 7 | [INFO ] 2018-08-06 15:55:37.558 [main] Log4jDemo - This is information message 8 | [ERROR] 2018-08-06 15:55:37.558 [main] Log4jDemo - This is an error message 9 | [WARN ] 2018-08-06 15:55:37.558 [main] Log4jDemo - This is a warning message 10 | [FATAL] 2018-08-06 15:55:37.558 [main] Log4jDemo - This is a fatal message 11 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | SeleniumJavaFramework 6 | SeleniumJavaFramework 7 | 0.0.1-SNAPSHOT 8 | 9 | 10 | 11 | org.seleniumhq.selenium 12 | selenium-java 13 | 3.4.0 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | org.testng 22 | testng 23 | 6.14.3 24 | test 25 | 26 | 27 | 28 | com.aventstack 29 | extentreports 30 | 3.1.5 31 | 32 | 33 | 34 | org.apache.logging.log4j 35 | log4j-api 36 | 2.11.1 37 | 38 | 39 | org.apache.logging.log4j 40 | log4j-core 41 | 2.11.1 42 | 43 | 44 | 45 | 46 | org.apache.poi 47 | poi-ooxml 48 | 3.17 49 | 50 | 51 | 52 | com.applitools 53 | eyes-selenium-java3 54 | RELEASE 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/main/java/demo/ExceptionHandlingDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import java.io.IOException; 4 | 5 | public class ExceptionHandlingDemo { 6 | 7 | public static void main(String[] args) { 8 | try { 9 | demo(); 10 | } catch (Exception e) { 11 | e.printStackTrace(); 12 | } 13 | 14 | } 15 | 16 | public static void demo() throws Exception { 17 | System.out.println("Hello World...!"); 18 | throw new ArithmeticException("not valid operation"); 19 | //int i = 1/0; 20 | //System.out.println("Completed"); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/main/java/demo/Log4jDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.apache.logging.log4j.message.LoggerNameAwareMessage; 6 | 7 | public class Log4jDemo { 8 | 9 | private static Logger logger = LogManager.getLogger(Log4jDemo.class); 10 | 11 | public static void main(String[] args) { 12 | 13 | System.out.println("\n Hello World...! \n"); 14 | 15 | logger.trace("This is trace messages"); 16 | logger.info("This is information message"); 17 | logger.error("This is an error message"); 18 | logger.warn("This is a warning message"); 19 | logger.fatal("This is a fatal message"); 20 | 21 | System.out.println("\n Completed"); 22 | 23 | 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/main/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | name=PropertiesConfig 2 | property.filename = logs 3 | appenders = console, file 4 | 5 | appender.console.type = Console 6 | appender.console.name = STDOUT 7 | appender.console.layout.type = PatternLayout 8 | appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n 9 | 10 | appender.file.type = File 11 | appender.file.name = LOGFILE 12 | appender.file.fileName=${filename}/MyLogs.log 13 | appender.file.layout.type=PatternLayout 14 | appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n 15 | appender.file.append=true 16 | 17 | loggers=file 18 | logger.file.name=demo 19 | logger.file.level = trace 20 | logger.file.appenderRefs = file 21 | logger.file.appenderRef.file.ref = LOGFILE 22 | 23 | rootLogger.level = trace 24 | rootLogger.appenderRefs = stdout 25 | rootLogger.appenderRef.stdout.ref = STDOUT 26 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | logs 5 | 6 | 7 | 8 | 9 | 10 | [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/BrowserTest.java: -------------------------------------------------------------------------------- 1 | import java.util.List; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.openqa.selenium.firefox.FirefoxDriver; 8 | import org.openqa.selenium.ie.InternetExplorerDriver; 9 | 10 | public class BrowserTest { 11 | 12 | /** 13 | * @param args 14 | * @throws InterruptedException 15 | */ 16 | public static void main(String[] args) throws InterruptedException { 17 | 18 | String projectPath = System.getProperty("user.dir"); 19 | System.out.println(projectPath); 20 | 21 | System.setProperty("webdriver.gecko.driver", projectPath+"/drivers/geckodriver/geckodriver.exe"); 22 | WebDriver driver = new FirefoxDriver(); 23 | 24 | //System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 25 | //WebDriver driver = new ChromeDriver(); 26 | 27 | //System.setProperty("webdriver.ie.driver", projectPath+"/drivers/iedriver/IEDriverServer.exe"); 28 | //WebDriver driver = new InternetExplorerDriver(); 29 | 30 | driver.get("http://google.com/"); 31 | 32 | driver.findElement(By.xpath("//input[@name='q']")).sendKeys("abcd"); 33 | 34 | List listOfInputElements = driver.findElements(By.xpath("//input")); 35 | 36 | int count = listOfInputElements.size(); 37 | 38 | System.out.println("Count of Input elemtns : "+count); 39 | 40 | 41 | //WebElement textBox = driver.findElement(By.id("lst-ib")); 42 | 43 | //textBox.sendKeys("Automation Step by Step"); 44 | 45 | Thread.sleep(3000); 46 | 47 | driver.close(); 48 | //driver.quit(); 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/DesiredCapabilities_Demo.java: -------------------------------------------------------------------------------- 1 | import org.openqa.selenium.By; 2 | import org.openqa.selenium.Keys; 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.ie.InternetExplorerDriver; 5 | import org.openqa.selenium.remote.DesiredCapabilities; 6 | 7 | public class DesiredCapabilities_Demo { 8 | 9 | public static void main(String[] args) { 10 | 11 | String projectPath = System.getProperty("user.dir"); 12 | 13 | DesiredCapabilities caps = new DesiredCapabilities(); 14 | caps.setCapability("ignoreProtectedModeSettings", true); 15 | 16 | System.setProperty("webdriver.ie.driver", projectPath+"/drivers/iedriver/IEDriverServer.exe"); 17 | 18 | WebDriver driver = new InternetExplorerDriver(caps); 19 | 20 | driver.get("https://google.com"); 21 | driver.findElement(By.name("q")).sendKeys("ABCD"); 22 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 23 | 24 | driver.close(); 25 | driver.quit(); 26 | 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/config/PropertiesFile.java: -------------------------------------------------------------------------------- 1 | package config; 2 | 3 | import java.io.FileInputStream; 4 | import java.io.FileOutputStream; 5 | import java.io.InputStream; 6 | import java.io.OutputStream; 7 | import java.util.Properties; 8 | 9 | import test.TestNG_Demo; 10 | 11 | public class PropertiesFile { 12 | 13 | static Properties prop = new Properties(); 14 | static String projectPath = System.getProperty("user.dir"); 15 | 16 | public static void main(String[] args) { 17 | getProperties(); 18 | setProperties(); 19 | getProperties(); 20 | } 21 | 22 | public static void getProperties() { 23 | try { 24 | InputStream input = new FileInputStream(projectPath+"/src/test/java/config/config.properties"); 25 | prop.load(input); 26 | String browser = prop.getProperty("browser"); 27 | System.out.println(browser); 28 | TestNG_Demo.browserName=browser; 29 | 30 | }catch(Exception exp) { 31 | System.out.println(exp.getMessage()); 32 | System.out.println(exp.getCause()); 33 | exp.printStackTrace(); 34 | } 35 | } 36 | 37 | public static void setProperties() { 38 | try { 39 | OutputStream output = new FileOutputStream(projectPath+"/src/test/java/config/config.properties"); 40 | prop.setProperty("result", "pass"); 41 | prop.store(output, null); 42 | 43 | }catch(Exception exp) { 44 | System.out.println(exp.getMessage()); 45 | System.out.println(exp.getCause()); 46 | exp.printStackTrace(); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/config/config.properties: -------------------------------------------------------------------------------- 1 | #Sat Aug 11 12:28:28 IST 2018 2 | result=pass 3 | browser=firefox 4 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/ApplitoolsDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.chrome.ChromeDriver; 6 | 7 | import com.applitools.eyes.RectangleSize; 8 | import com.applitools.eyes.selenium.Eyes; 9 | 10 | public class ApplitoolsDemo { 11 | 12 | public static void main(String[] args) { 13 | 14 | // Open a Chrome browser. 15 | System.setProperty("webdriver.chrome.driver", "C:\\Users\\Administrator\\git\\SeleniumJavaFramework1\\SeleniumJavaFramework\\drivers\\chromedriver\\chromedriver.exe"); 16 | WebDriver driver = new ChromeDriver(); 17 | 18 | // Initialize the eyes SDK and set your private API key. 19 | Eyes eyes = new Eyes(); 20 | eyes.setApiKey("x98ITG6Y8EjdSjxIhxVfo4cCuwJYgt6YgUNh0ghCsl1g110"); 21 | 22 | try{ 23 | 24 | // Start the test and set the browser's viewport size to 800x600. 25 | eyes.open(driver, "Hello World!", "My first Selenium Java test!", 26 | new RectangleSize(800, 600)); 27 | 28 | // Navigate the browser to the "hello world!" web-site. 29 | driver.get("https://applitools.com/helloworld?diff2"); 30 | 31 | // Visual checkpoint #1. 32 | eyes.checkWindow("Hello!"); 33 | 34 | // Click the "Click me!" button. 35 | driver.findElement(By.tagName("button")).click(); 36 | 37 | // Visual checkpoint #2. 38 | eyes.checkWindow("Click!"); 39 | 40 | // End the test. 41 | eyes.close(); 42 | 43 | } finally { 44 | 45 | // Close the browser. 46 | driver.quit(); 47 | 48 | // If the test was aborted before eyes.close was called, ends the test as aborted. 49 | eyes.abortIfNotClosed(); 50 | } 51 | 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/AutoITDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebDriver; 7 | import org.openqa.selenium.chrome.ChromeDriver; 8 | 9 | public class AutoITDemo { 10 | 11 | public static void main(String[] args) throws Exception { 12 | test(); 13 | } 14 | public static void test() throws Exception { 15 | 16 | System.setProperty("webdriver.chrome.driver", "D:\\Desktop\\Projects\\Selenium\\SeleniumJavaFramework\\drivers\\chromedriver\\chromedriver.exe"); 17 | WebDriver driver = new ChromeDriver(); 18 | 19 | driver.get("http://www.tinyupload.com/"); 20 | driver.findElement(By.name("uploaded_file")).click(); 21 | 22 | Runtime.getRuntime().exec("D:\\FileUploadScript.exe"); 23 | 24 | Thread.sleep(3000); 25 | //driver.close(); 26 | 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/BrowserStackDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | import org.openqa.selenium.remote.DesiredCapabilities; 7 | import org.openqa.selenium.remote.RemoteWebDriver; 8 | 9 | public class BrowserStackDemo { 10 | 11 | public static final String USERNAME = "raghavpal2"; 12 | public static final String AUTOMATE_KEY = "QqEJyE8fXqyzJwYR1vxc"; 13 | public static final String URL = "https://" + USERNAME + ":" + AUTOMATE_KEY + "@hub-cloud.browserstack.com/wd/hub"; 14 | 15 | public static void main(String[] args) throws Exception { 16 | 17 | DesiredCapabilities caps = new DesiredCapabilities(); 18 | caps.setCapability("os", "Windows"); 19 | caps.setCapability("os_version", "10"); 20 | caps.setCapability("browser", "Chrome"); 21 | caps.setCapability("browser_version", "62.0"); 22 | caps.setCapability("project", "Test"); 23 | caps.setCapability("build", "Build1"); 24 | caps.setCapability("name", "Test1"); 25 | caps.setCapability("browserstack.local", "false"); 26 | caps.setCapability("browserstack.networkLogs", "true"); 27 | caps.setCapability("browserstack.selenium_version", "3.5.2"); 28 | WebDriver driver = new RemoteWebDriver(new java.net.URL(URL), caps); 29 | driver.get("http://www.google.com"); 30 | WebElement element = driver.findElement(By.name("q")); 31 | 32 | element.sendKeys("BrowserStack"); 33 | element.submit(); 34 | 35 | System.out.println(driver.getTitle()); 36 | driver.quit(); 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/FluentWaitDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.Keys; 7 | import org.openqa.selenium.NoSuchElementException; 8 | import org.openqa.selenium.WebDriver; 9 | import org.openqa.selenium.WebElement; 10 | import org.openqa.selenium.chrome.ChromeDriver; 11 | import org.openqa.selenium.support.ui.FluentWait; 12 | import org.openqa.selenium.support.ui.Wait; 13 | 14 | import com.google.common.base.Function; 15 | 16 | public class FluentWaitDemo { 17 | 18 | public static void main(String[] args) throws Exception { 19 | test(); 20 | } 21 | 22 | public static void test() throws Exception { 23 | 24 | System.setProperty("webdriver.chrome.driver", "D:\\Desktop\\Projects\\Selenium\\SeleniumJavaFramework\\drivers\\chromedriver\\chromedriver.exe"); 25 | WebDriver driver = new ChromeDriver(); 26 | 27 | driver.get("https://google.com"); 28 | driver.findElement(By.name("q")).sendKeys("Abcd"); 29 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 30 | 31 | //driver.findElement(By.linkText("ABCD - NIMH Data Archive - NIH")).click(); 32 | 33 | 34 | 35 | // Waiting 30 seconds for an element to be present on the page, checking 36 | // for its presence once every 5 seconds. 37 | Wait wait = new FluentWait(driver) 38 | .withTimeout(30, TimeUnit.SECONDS) 39 | .pollingEvery(2, TimeUnit.SECONDS) 40 | .ignoring(NoSuchElementException.class); 41 | 42 | WebElement element = wait.until(new Function() { 43 | public WebElement apply(WebDriver driver) { 44 | WebElement linkElement= driver.findElement(By.linkText("ABCD - NIMH Data Archive - NIH")); 45 | 46 | if(linkElement.isEnabled()) { 47 | System.out.println("Element Found"); 48 | 49 | } 50 | return linkElement; 51 | } 52 | }); 53 | 54 | 55 | element.click(); 56 | 57 | 58 | Thread.sleep(3000); 59 | driver.close(); 60 | driver.quit(); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/GitHubDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | public class GitHubDemo { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/HeadlessChromeDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.openqa.selenium.chrome.ChromeOptions; 8 | 9 | public class HeadlessChromeDemo { 10 | 11 | public static void main(String[] args) { 12 | test(); 13 | } 14 | 15 | public static void test() { 16 | 17 | System.setProperty("webdriver.chrome.driver", "D:\\Desktop\\Projects\\Selenium\\SeleniumJavaFramework\\drivers\\chromedriver\\chromedriver.exe"); 18 | 19 | ChromeOptions options = new ChromeOptions(); 20 | options.addArguments("--headless"); 21 | options.addArguments("window-size=1280,800"); 22 | 23 | WebDriver driver = new ChromeDriver(options); 24 | 25 | 26 | 27 | driver.get("https:google.com"); 28 | System.out.println(driver.getTitle()); 29 | driver.findElement(By.name("q")).sendKeys("Automation"); 30 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 31 | 32 | driver.close(); 33 | driver.quit(); 34 | System.out.println("Completed"); 35 | 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/SauceLabsDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.openqa.selenium.remote.DesiredCapabilities; 8 | import org.openqa.selenium.remote.RemoteWebDriver; 9 | 10 | public class SauceLabsDemo { 11 | 12 | public static final String USERNAME = "Raghav-Pal"; 13 | public static final String ACCESS_KEY = "ba7b3b44-e6de-4f06-8d0c-5642dccb84e2"; 14 | public static final String URL = "https://" + USERNAME + ":" + ACCESS_KEY + "@ondemand.saucelabs.com:443/wd/hub"; 15 | 16 | public static void main(String[] args) throws Exception { 17 | 18 | DesiredCapabilities caps = DesiredCapabilities.chrome(); 19 | caps.setCapability("platform", "Linux"); 20 | caps.setCapability("version", "latest"); 21 | caps.setCapability("name", "GoogleTest1"); 22 | caps.setCapability("extendedDebugging", "true"); 23 | caps.setCapability("buildNumber", "3.0"); 24 | 25 | WebDriver driver = new RemoteWebDriver(new java.net.URL(URL), caps); 26 | 27 | // String projectPath = System.getProperty("user.dir"); 28 | // System.setProperty("webdriver.chrome.driver", projectPath+"\\drivers\\chromedriver\\chromedriver.exe"); 29 | // WebDriver driver = new ChromeDriver(); 30 | 31 | driver.get("https://google.com"); 32 | System.out.println(driver.getTitle()); 33 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 34 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 35 | System.out.println(driver.getTitle()); 36 | 37 | driver.quit(); 38 | System.out.println("Test Completed"); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/SeleniumWaitDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.Keys; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.chrome.ChromeDriver; 10 | import org.openqa.selenium.support.ui.ExpectedConditions; 11 | import org.openqa.selenium.support.ui.WebDriverWait; 12 | 13 | public class SeleniumWaitDemo { 14 | 15 | public static void main(String[] args) { 16 | seleniumWaits(); 17 | } 18 | 19 | public static void seleniumWaits() { 20 | 21 | String projectPath = System.getProperty("user.dir"); 22 | System.setProperty("webdriver.chrome.driver", projectPath+"\\drivers\\chromedriver\\chromedriver.exe"); 23 | WebDriver driver = new ChromeDriver(); 24 | 25 | //driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 26 | //250 ms 27 | 28 | driver.get("https://google.com"); 29 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 30 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 31 | 32 | WebDriverWait wait = new WebDriverWait(driver, 20); 33 | 34 | WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.name("abcdef"))); 35 | 36 | driver.findElement(By.name("abcd")).click(); 37 | 38 | driver.close(); 39 | driver.quit(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/Test1.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import java.util.regex.Pattern; 4 | import java.util.concurrent.TimeUnit; 5 | import org.testng.annotations.*; 6 | import static org.testng.Assert.*; 7 | import org.openqa.selenium.*; 8 | import org.openqa.selenium.chrome.ChromeDriver; 9 | import org.openqa.selenium.firefox.FirefoxDriver; 10 | import org.openqa.selenium.support.ui.Select; 11 | 12 | public class Test1 { 13 | private WebDriver driver; 14 | private String baseUrl; 15 | private boolean acceptNextAlert = true; 16 | private StringBuffer verificationErrors = new StringBuffer(); 17 | 18 | @BeforeClass(alwaysRun = true) 19 | public void setUp() throws Exception { 20 | 21 | String projectPath = System.getProperty("user.dir"); 22 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 23 | driver = new ChromeDriver(); 24 | baseUrl = "https://www.katalon.com/"; 25 | driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); 26 | } 27 | 28 | @Test 29 | public void test1() throws Exception { 30 | driver.get("https://opensource-demo.orangehrmlive.com/"); 31 | driver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='LOGIN Panel'])[1]/following::span[1]")).click(); 32 | driver.findElement(By.id("txtUsername")).clear(); 33 | driver.findElement(By.id("txtUsername")).sendKeys("Admin"); 34 | driver.findElement(By.id("txtPassword")).click(); 35 | driver.findElement(By.id("txtPassword")).clear(); 36 | driver.findElement(By.id("txtPassword")).sendKeys("admin123"); 37 | driver.findElement(By.id("btnLogin")).click(); 38 | driver.findElement(By.id("welcome")).click(); 39 | driver.findElement(By.linkText("Logout")).click(); 40 | } 41 | 42 | @AfterClass(alwaysRun = true) 43 | public void tearDown() throws Exception { 44 | driver.quit(); 45 | String verificationErrorString = verificationErrors.toString(); 46 | if (!"".equals(verificationErrorString)) { 47 | fail(verificationErrorString); 48 | } 49 | } 50 | 51 | private boolean isElementPresent(By by) { 52 | try { 53 | driver.findElement(by); 54 | return true; 55 | } catch (NoSuchElementException e) { 56 | return false; 57 | } 58 | } 59 | 60 | private boolean isAlertPresent() { 61 | try { 62 | driver.switchTo().alert(); 63 | return true; 64 | } catch (NoAlertPresentException e) { 65 | return false; 66 | } 67 | } 68 | 69 | private String closeAlertAndGetItsText() { 70 | try { 71 | Alert alert = driver.switchTo().alert(); 72 | String alertText = alert.getText(); 73 | if (acceptNextAlert) { 74 | alert.accept(); 75 | } else { 76 | alert.dismiss(); 77 | } 78 | return alertText; 79 | } finally { 80 | acceptNextAlert = true; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGDependencyDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.junit.Ignore; 4 | import org.testng.annotations.Test; 5 | 6 | public class TestNGDependencyDemo { 7 | 8 | @Test(dependsOnMethods= {"test2"}) 9 | public void test1() { 10 | System.out.println("I am inside Test 1"); 11 | } 12 | 13 | @Ignore 14 | @Test(groups= {"sanity1"}) 15 | public void test2() { 16 | System.out.println("I am inside Test 2"); 17 | } 18 | 19 | @Test(groups= {"sanity2"}) 20 | public void test3() { 21 | System.out.println("I am inside Test 3"); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGGroupsDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.testng.annotations.Test; 4 | 5 | @Test(groups = {"AllClassTests"}) 6 | public class TestNGGroupsDemo { 7 | 8 | @Test(groups= {"sanity"}) 9 | public void test1() { 10 | System.out.println(" This is Test 1 "); 11 | } 12 | 13 | @Test(groups= {"windows.regression"}) 14 | public void test2() { 15 | System.out.println(" This is Test 2 "); 16 | } 17 | 18 | @Test(groups= {"linux.regression"}) 19 | public void test3() { 20 | System.out.println(" This is Test 3 "); 21 | } 22 | 23 | @Test 24 | public void test4() { 25 | System.out.println(" This is Test 4 "); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGIgnoreDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.testng.annotations.Ignore; 4 | import org.testng.annotations.Test; 5 | 6 | public class TestNGIgnoreDemo { 7 | 8 | 9 | @Test 10 | public void test1() { 11 | System.out.println(" I am inside Test 1"); 12 | } 13 | 14 | @Test 15 | public void test2() { 16 | System.out.println(" I am inside Test 2"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGMultiBrowserDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.chrome.ChromeDriver; 5 | import org.openqa.selenium.firefox.FirefoxDriver; 6 | import org.openqa.selenium.ie.InternetExplorerDriver; 7 | import org.testng.annotations.AfterTest; 8 | import org.testng.annotations.BeforeTest; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | public class TestNGMultiBrowserDemo { 13 | 14 | WebDriver driver = null; 15 | String projectPath = System.getProperty("user.dir"); 16 | 17 | @Parameters("browserName") 18 | @BeforeTest 19 | public void setup(String browserName) { 20 | System.out.println("Browser name is : "+browserName); 21 | System.out.println("Thread id : "+Thread.currentThread().getId()); 22 | 23 | if(browserName.equalsIgnoreCase("chrome")) { 24 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 25 | driver = new ChromeDriver(); 26 | } 27 | else if(browserName.equalsIgnoreCase("firefox")) { 28 | System.setProperty("webdriver.gecko.driver", projectPath+"/drivers/geckodriver/geckodriver.exe"); 29 | driver = new FirefoxDriver(); 30 | } 31 | else if(browserName.equalsIgnoreCase("ie")) { 32 | System.setProperty("webdriver.ie.driver", projectPath+"/drivers/iedriver/IEDriverServer.exe"); 33 | driver = new InternetExplorerDriver(); 34 | } 35 | 36 | } 37 | 38 | @Test 39 | public void test1() throws Exception { 40 | driver.get("https://google.com"); 41 | Thread.sleep(4000); 42 | } 43 | 44 | @AfterTest 45 | public void teardown() { 46 | driver.close(); 47 | System.out.println("Test Completed Successfully"); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGParallelTestingDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.chrome.ChromeDriver; 5 | import org.testng.annotations.Test; 6 | 7 | public class TestNGParallelTestingDemo { 8 | 9 | WebDriver driver=null; 10 | 11 | @Test(threadPoolSize=3, invocationCount=3, timeOut=1000) 12 | public void test1() throws Exception { 13 | System.out.println("I am inside Test 1 | "+Thread.currentThread().getId()); 14 | } 15 | 16 | @Test 17 | public void test2() throws Exception { 18 | System.out.println("I am inside Test 2 | "+Thread.currentThread().getId()); 19 | } 20 | 21 | @Test 22 | public void test3() throws Exception { 23 | System.out.println("I am inside Test 3 | "+Thread.currentThread().getId()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGParametersDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.testng.annotations.Optional; 4 | import org.testng.annotations.Parameters; 5 | import org.testng.annotations.Test; 6 | 7 | public class TestNGParametersDemo { 8 | 9 | @Test(priority=1, dependsOnGroups={"smoke.*"}) 10 | @Parameters({"MyName"}) 11 | public void test1(@Optional("Raghav") String name) { 12 | System.out.println("I am inside Test 1"); 13 | System.out.println("Name is : "+name); 14 | } 15 | 16 | @Test(priority=2) 17 | public void test2() { 18 | System.out.println("I am inside Test 2"); 19 | } 20 | 21 | @Test(groups=("smoke1")) 22 | public void test3() { 23 | System.out.println("I am inside Test 3"); 24 | } 25 | 26 | @Test(groups=("smoke2")) 27 | public void test4() { 28 | System.out.println("I am inside Test 4"); 29 | } 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGPriorityDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.testng.annotations.Test; 4 | 5 | public class TestNGPriorityDemo { 6 | 7 | @Test 8 | public void one() { 9 | System.out.println("I am inside Test 1"); 10 | } 11 | 12 | @Test(priority=1) 13 | public void two() { 14 | System.out.println("I am inside Test 2"); 15 | } 16 | 17 | @Test(priority = 1) 18 | public void three() { 19 | System.out.println("I am inside Test 3"); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/demo/TestNGRetryFailedDemo.java: -------------------------------------------------------------------------------- 1 | package demo; 2 | 3 | import org.testng.Assert; 4 | import org.testng.annotations.Test; 5 | 6 | public class TestNGRetryFailedDemo { 7 | 8 | @Test 9 | public void test1() { 10 | System.out.println(" I am inside Test 1 "); 11 | } 12 | 13 | @Test 14 | public void test2() { 15 | System.out.println(" I am inside Test 2 "); 16 | //int i=1/0; 17 | } 18 | 19 | @Test(retryAnalyzer = listeners.RetryAnalyzer.class) 20 | public void test3() { 21 | System.out.println(" I am inside Test 3 "); 22 | Assert.assertTrue(0>1); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/listeners/RetryAnalyzer.java: -------------------------------------------------------------------------------- 1 | package listeners; 2 | 3 | import org.testng.IRetryAnalyzer; 4 | import org.testng.ITestResult; 5 | 6 | public class RetryAnalyzer implements IRetryAnalyzer { 7 | 8 | private int retryCount = 0; 9 | private static final int maxRetryCount = 5; 10 | 11 | public boolean retry(ITestResult result) { 12 | if (retryCount < maxRetryCount) { 13 | retryCount++; 14 | return true; 15 | } 16 | return false; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/listeners/TestNGListenerDemo.java: -------------------------------------------------------------------------------- 1 | package listeners; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.chrome.ChromeDriver; 6 | import org.openqa.selenium.firefox.FirefoxDriver; 7 | import org.testng.SkipException; 8 | import org.testng.annotations.Listeners; 9 | import org.testng.annotations.Test; 10 | 11 | import junit.framework.Assert; 12 | 13 | public class TestNGListenerDemo { 14 | 15 | @Test 16 | public void test1() { 17 | System.out.println("I am inside Test 1"); 18 | } 19 | 20 | @Test 21 | public void test2() { 22 | System.out.println("I am inside Test 2"); 23 | 24 | 25 | String projectPath = System.getProperty("user.dir"); 26 | System.out.println(projectPath); 27 | 28 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 29 | WebDriver driver = new ChromeDriver(); 30 | 31 | driver.get("http://google.com/"); 32 | 33 | driver.findElement(By.xpath("//input[@name='q']")).sendKeys("abcd"); 34 | driver.findElement(By.xpath("//input[@name='abc']")).sendKeys("abcd"); 35 | 36 | driver.close(); 37 | 38 | 39 | 40 | } 41 | 42 | @Test 43 | public void test3() { 44 | System.out.println("I am inside Test 3"); 45 | throw new SkipException("This test is skipped"); 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/listeners/TestNGListenerDemo2.java: -------------------------------------------------------------------------------- 1 | package listeners; 2 | 3 | import org.testng.SkipException; 4 | import org.testng.annotations.Listeners; 5 | import org.testng.annotations.Test; 6 | 7 | import junit.framework.Assert; 8 | 9 | public class TestNGListenerDemo2 { 10 | 11 | @Test 12 | public void test4() { 13 | System.out.println("I am inside Test 4"); 14 | } 15 | 16 | @Test 17 | public void test5() { 18 | System.out.println("I am inside Test 5"); 19 | } 20 | 21 | @Test 22 | public void test6() { 23 | System.out.println("I am inside Test 6"); 24 | throw new SkipException("This test is skipped"); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/listeners/TestNGListeners.java: -------------------------------------------------------------------------------- 1 | package listeners; 2 | 3 | import org.testng.ISuite; 4 | import org.testng.ISuiteListener; 5 | import org.testng.ITestContext; 6 | import org.testng.ITestListener; 7 | import org.testng.ITestResult; 8 | 9 | public class TestNGListeners implements ITestListener, ISuiteListener { 10 | 11 | public void onTestStart(ITestResult result) { 12 | System.out.println("********* Test started : "+result.getName()); 13 | } 14 | 15 | public void onTestSuccess(ITestResult result) { 16 | System.out.println("********* Test is sucessful : "+result.getName()); 17 | } 18 | 19 | public void onTestFailure(ITestResult result) { 20 | System.out.println("********* Test failed : "+result.getName()); 21 | } 22 | 23 | public void onTestSkipped(ITestResult result) { 24 | System.out.println("********* Test skipped : "+result.getName()); 25 | } 26 | 27 | public void onTestFailedButWithinSuccessPercentage(ITestResult result) { 28 | // TODO Auto-generated method stub 29 | 30 | } 31 | 32 | public void onStart(ITestContext context) { 33 | // TODO Auto-generated method stub 34 | 35 | } 36 | 37 | public void onFinish(ITestContext context) { 38 | System.out.println("********* Tests Completed : "+context.getName()); 39 | 40 | } 41 | 42 | public void onStart(ISuite suite) { 43 | // TODO Auto-generated method stub 44 | 45 | } 46 | 47 | public void onFinish(ISuite suite) { 48 | // TODO Auto-generated method stub 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/pages/GoogleSearchPage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | 7 | public class GoogleSearchPage { 8 | 9 | private static WebElement element = null; 10 | 11 | 12 | public static WebElement textbox_search(WebDriver driver) { 13 | 14 | element = driver.findElement(By.name("q")); 15 | return element; 16 | } 17 | 18 | public static WebElement button_search(WebDriver driver) { 19 | 20 | element = driver.findElement(By.name("btnK")); 21 | return element; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/pages/GoogleSearchPageObjects.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | 7 | public class GoogleSearchPageObjects { 8 | 9 | WebDriver driver = null; 10 | 11 | By textbox_search = By.id("lst-ib"); 12 | By button_serach = By.name("btnK"); 13 | 14 | public GoogleSearchPageObjects(WebDriver driver) { 15 | this.driver = driver; 16 | } 17 | 18 | public void setTextInSerchBox(String text) { 19 | driver.findElement(textbox_search).sendKeys(text); 20 | } 21 | 22 | public void clickSearchButton() { 23 | driver.findElement(button_serach).sendKeys(Keys.RETURN); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/DesiredCapabilitiesDemo.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.openqa.selenium.ie.InternetExplorerDriver; 8 | import org.openqa.selenium.remote.CapabilityType; 9 | import org.openqa.selenium.remote.DesiredCapabilities; 10 | import org.testng.annotations.AfterTest; 11 | import org.testng.annotations.BeforeTest; 12 | import org.testng.annotations.Test; 13 | 14 | public class DesiredCapabilitiesDemo { 15 | 16 | WebDriver driver = null; 17 | 18 | @BeforeTest 19 | public void setUpTest() { 20 | 21 | DesiredCapabilities caps = new DesiredCapabilities(); 22 | caps.setCapability("ignoreProtectedModeSettings", true); 23 | //caps.setCapability(CapabilityType.BROWSER_NAME, "Chrome"); 24 | 25 | String projectPath = System.getProperty("user.dir"); 26 | System.setProperty("webdriver.ie.driver", projectPath+"/drivers/iedriver/IEDriverServer.exe"); 27 | driver = new InternetExplorerDriver(caps); 28 | 29 | //System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 30 | //driver = new ChromeDriver(); 31 | 32 | } 33 | 34 | @Test 35 | public void googleSearch() { 36 | 37 | //goto google.com 38 | driver.get("https://google.com"); 39 | 40 | //enter text in search textbox 41 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 42 | 43 | //click on search button 44 | //driver.findElement(By.name("btnK")).click(); 45 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 46 | 47 | } 48 | 49 | @AfterTest 50 | public void tearDownTest() { 51 | 52 | //close browser 53 | driver.close(); 54 | driver.quit(); 55 | System.out.println("Test Completed Successfully"); 56 | 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/ExtendReportsBasicDemo.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.Keys; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.chrome.ChromeDriver; 9 | 10 | import com.aventstack.extentreports.ExtentReports; 11 | import com.aventstack.extentreports.ExtentTest; 12 | import com.aventstack.extentreports.MediaEntityBuilder; 13 | import com.aventstack.extentreports.Status; 14 | import com.aventstack.extentreports.reporter.ExtentHtmlReporter; 15 | 16 | public class ExtendReportsBasicDemo { 17 | 18 | private static WebDriver driver = null; 19 | 20 | public static void main(String[] args) throws Exception { 21 | 22 | ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("extentReports.html"); 23 | 24 | // create ExtentReports and attach reporter(s) 25 | ExtentReports extent = new ExtentReports(); 26 | extent.attachReporter(htmlReporter); 27 | 28 | // creates a toggle for the given test, adds all log events under it 29 | ExtentTest test1 = extent.createTest("Google Seartch Test One","this is a test to validate google search functionality"); 30 | 31 | String projectPath = System.getProperty("user.dir"); 32 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 33 | driver = new ChromeDriver(); 34 | 35 | test1.log(Status.INFO, "Starting Test Case"); 36 | driver.get("https://google.com"); 37 | test1.pass("Navigated to google.com"); 38 | 39 | driver.findElement(By.name("q")).sendKeys("Automation"); 40 | test1.pass("Entered text in Searchbox"); 41 | 42 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 43 | test1.pass("Pressed keyboard enter key"); 44 | 45 | driver.close(); 46 | driver.quit(); 47 | test1.pass("Closed the browser"); 48 | 49 | test1.info("Test Completed"); 50 | 51 | 52 | 53 | 54 | 55 | 56 | // creates a toggle for the given test, adds all log events under it 57 | ExtentTest test2 = extent.createTest("Google Seartch Test Two","this is a test to validate google search functionality"); 58 | 59 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 60 | driver = new ChromeDriver(); 61 | 62 | test2.log(Status.INFO, "Starting Test Case"); 63 | driver.get("https://google.com"); 64 | test2.pass("Navigated to google.com"); 65 | 66 | driver.findElement(By.name("q")).sendKeys("Automation"); 67 | test2.pass("Entered text in Searchbox"); 68 | 69 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 70 | //test2.fail("Pressed keyboard enter key"); 71 | // log with snapshot 72 | 73 | driver.close(); 74 | driver.quit(); 75 | test1.pass("Closed the browser"); 76 | 77 | test2.info("Test Completed"); 78 | test2.fail("details", MediaEntityBuilder.createScreenCaptureFromPath("screenshot.png").build()); 79 | 80 | // calling flush writes everything to the log file 81 | extent.flush(); 82 | 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/ExtentReportsDemoWithTestNG.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.testng.annotations.AfterSuite; 8 | import org.testng.annotations.AfterTest; 9 | import org.testng.annotations.BeforeSuite; 10 | import org.testng.annotations.BeforeTest; 11 | import org.testng.annotations.Test; 12 | 13 | import com.aventstack.extentreports.ExtentReports; 14 | import com.aventstack.extentreports.ExtentTest; 15 | import com.aventstack.extentreports.MediaEntityBuilder; 16 | import com.aventstack.extentreports.Status; 17 | import com.aventstack.extentreports.reporter.ExtentHtmlReporter; 18 | 19 | public class ExtentReportsDemoWithTestNG { 20 | 21 | ExtentHtmlReporter htmlReporter; 22 | ExtentReports extent; 23 | 24 | WebDriver driver=null; 25 | 26 | @BeforeSuite 27 | public void setUp() { 28 | htmlReporter = new ExtentHtmlReporter("extent.html"); 29 | extent = new ExtentReports(); 30 | extent.attachReporter(htmlReporter); 31 | } 32 | 33 | @BeforeTest 34 | public void setUpTest() { 35 | 36 | String projectPath = System.getProperty("user.dir"); 37 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 38 | driver = new ChromeDriver(); 39 | 40 | } 41 | 42 | @Test 43 | public void test1() throws Exception { 44 | ExtentTest test = extent.createTest("MyFirstTest", "Sample description"); 45 | 46 | driver.get("https://google.com"); 47 | test.pass("Navigated to google.com"); 48 | 49 | test.log(Status.INFO, "This step shows usage of log(status, details)"); 50 | test.info("This step shows usage of info(details)"); 51 | test.fail("details", MediaEntityBuilder.createScreenCaptureFromPath("screenshot.png").build()); 52 | test.addScreenCaptureFromPath("screenshot.png"); 53 | } 54 | 55 | @Test 56 | public void test2() throws Exception { 57 | ExtentTest test = extent.createTest("MyFirstTest", "Sample description"); 58 | test.log(Status.INFO, "This step shows usage of log(status, details)"); 59 | test.info("This step shows usage of info(details)"); 60 | test.pass("details", MediaEntityBuilder.createScreenCaptureFromPath("screenshot.png").build()); 61 | test.addScreenCaptureFromPath("screenshot.png"); 62 | } 63 | 64 | @AfterTest 65 | public void tearDownTest() { 66 | 67 | //close browser 68 | driver.close(); 69 | driver.quit(); 70 | System.out.println("Test Completed Successfully"); 71 | 72 | } 73 | @AfterSuite 74 | public void tearDown() { 75 | extent.flush(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/GoogleSeachTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | 8 | import pages.GoogleSearchPage; 9 | 10 | public class GoogleSeachTest { 11 | 12 | private static WebDriver driver = null; 13 | 14 | public static void main(String[] args) { 15 | googleSearch(); 16 | } 17 | 18 | 19 | 20 | public static void googleSearch() { 21 | 22 | String projectPath = System.getProperty("user.dir"); 23 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 24 | driver = new ChromeDriver(); 25 | 26 | //goto google.com 27 | driver.get("https://google.com"); 28 | 29 | //enter text in search textbox 30 | //driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 31 | 32 | GoogleSearchPage.textbox_search(driver).sendKeys("Automation step by step"); 33 | 34 | //click on search button 35 | //driver.findElement(By.name("btnK")).click(); 36 | //driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 37 | 38 | GoogleSearchPage.button_search(driver).sendKeys(Keys.RETURN); 39 | 40 | //close browser 41 | driver.close(); 42 | 43 | System.out.println("Test Completed Successfully"); 44 | 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/GoogleSearchPageTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.chrome.ChromeDriver; 5 | 6 | import pages.GoogleSearchPageObjects; 7 | 8 | public class GoogleSearchPageTest { 9 | 10 | private static WebDriver driver = null; 11 | 12 | public static void main(String[] args) { 13 | 14 | googleSearchTest(); 15 | } 16 | 17 | public static void googleSearchTest() { 18 | 19 | String projectPath = System.getProperty("user.dir"); 20 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 21 | driver = new ChromeDriver(); 22 | 23 | GoogleSearchPageObjects searchPageObj = new GoogleSearchPageObjects(driver); 24 | 25 | 26 | driver.get("https://google.com"); 27 | 28 | searchPageObj.setTextInSerchBox("A B C D"); 29 | 30 | searchPageObj.clickSearchButton(); 31 | 32 | driver.close(); 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/Test1_GoogleSearch.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | 8 | public class Test1_GoogleSearch { 9 | 10 | public static void main(String[] args) { 11 | googleSearch(); 12 | } 13 | 14 | 15 | public static void googleSearch() { 16 | 17 | String projectPath = System.getProperty("user.dir"); 18 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 19 | WebDriver driver = new ChromeDriver(); 20 | 21 | //goto google.com 22 | driver.get("https://google.com"); 23 | 24 | //enter text in search textbox 25 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 26 | 27 | //click on search button 28 | //driver.findElement(By.name("btnK")).click(); 29 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 30 | 31 | //close browser 32 | driver.close(); 33 | 34 | System.out.println("Test Completed Successfully"); 35 | 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/TestNG_Demo.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.Keys; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.chrome.ChromeDriver; 9 | import org.openqa.selenium.firefox.FirefoxDriver; 10 | import org.testng.annotations.AfterTest; 11 | import org.testng.annotations.BeforeTest; 12 | import org.testng.annotations.Test; 13 | 14 | import config.PropertiesFile; 15 | import demo.Log4jDemo; 16 | 17 | public class TestNG_Demo { 18 | 19 | WebDriver driver = null; 20 | public static String browserName=null; 21 | private static Logger logger = LogManager.getLogger(Log4jDemo.class); 22 | 23 | 24 | @BeforeTest 25 | public void setUpTest() { 26 | String projectPath = System.getProperty("user.dir"); 27 | PropertiesFile.getProperties(); 28 | 29 | if(browserName.equalsIgnoreCase("chrome")) { 30 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 31 | driver = new ChromeDriver(); 32 | } 33 | else if(browserName.equalsIgnoreCase("firefox")) { 34 | System.setProperty("webdriver.gecko.driver", projectPath+"/drivers/geckodriver/geckodriver.exe"); 35 | driver = new FirefoxDriver(); 36 | } 37 | 38 | 39 | logger.info("Browser started"); 40 | 41 | } 42 | 43 | @Test 44 | public void googleSearch() { 45 | 46 | //goto google.com 47 | driver.get("https://google.com"); 48 | logger.info("Navigated to google.com"); 49 | 50 | //enter text in search textbox 51 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 52 | 53 | //click on search button 54 | //driver.findElement(By.name("btnK")).click(); 55 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 56 | 57 | } 58 | 59 | @AfterTest 60 | public void tearDownTest() { 61 | 62 | //close browser 63 | driver.close(); 64 | //driver.quit(); 65 | System.out.println("Test Completed Successfully"); 66 | PropertiesFile.setProperties(); 67 | 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/test/TestNG_Demo2.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.Keys; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.testng.annotations.AfterTest; 8 | import org.testng.annotations.BeforeTest; 9 | import org.testng.annotations.Test; 10 | 11 | public class TestNG_Demo2 { 12 | 13 | WebDriver driver = null; 14 | 15 | @BeforeTest 16 | public void setUpTest() { 17 | 18 | String projectPath = System.getProperty("user.dir"); 19 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 20 | driver = new ChromeDriver(); 21 | 22 | } 23 | 24 | @Test 25 | public void googleSearch2() { 26 | 27 | //goto google.com 28 | driver.get("https://google.com"); 29 | 30 | //enter text in search textbox 31 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 32 | 33 | //click on search button 34 | //driver.findElement(By.name("btnK")).click(); 35 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 36 | 37 | } 38 | 39 | @Test 40 | public void googleSearch3() { 41 | 42 | //goto google.com 43 | driver.get("https://google.com"); 44 | 45 | //enter text in search textbox 46 | driver.findElement(By.name("q")).sendKeys("Automation Step by Step"); 47 | 48 | //click on search button 49 | //driver.findElement(By.name("btnK")).click(); 50 | driver.findElement(By.name("btnK")).sendKeys(Keys.RETURN); 51 | 52 | } 53 | @AfterTest 54 | public void tearDownTest() { 55 | 56 | //close browser 57 | driver.close(); 58 | driver.quit(); 59 | System.out.println("Test Completed Successfully"); 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/src/test/java/utils/ExcelDataProvider.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.chrome.ChromeDriver; 6 | import org.openqa.selenium.firefox.FirefoxDriver; 7 | import org.testng.annotations.BeforeTest; 8 | import org.testng.annotations.DataProvider; 9 | import org.testng.annotations.Test; 10 | 11 | import config.PropertiesFile; 12 | 13 | public class ExcelDataProvider { 14 | 15 | WebDriver driver=null; 16 | 17 | @BeforeTest 18 | public void setUpTest() { 19 | String projectPath = System.getProperty("user.dir"); 20 | System.setProperty("webdriver.chrome.driver", projectPath+"/drivers/chromedriver/chromedriver.exe"); 21 | driver = new ChromeDriver(); 22 | } 23 | 24 | @Test(dataProvider="test1data") 25 | public void test1(String username, String password) throws Exception { 26 | System.out.println(username+" | "+password); 27 | 28 | driver.get("https://opensource-demo.orangehrmlive.com/"); 29 | driver.findElement(By.id("txtUsername")).sendKeys(username); 30 | driver.findElement(By.id("txtPassword")).sendKeys(password); 31 | Thread.sleep(2000); 32 | 33 | 34 | 35 | 36 | 37 | } 38 | 39 | @DataProvider(name = "test1data") 40 | public Object[][] getData() { 41 | String excelPath = "D:\\Desktop\\Projects\\Selenium\\SeleniumJavaFramework\\excel\\data.xlsx"; 42 | Object data[][] = testData(excelPath, "Sheet1"); 43 | return data; 44 | 45 | } 46 | 47 | 48 | public Object[][] testData(String excelPath, String sheetName) { 49 | 50 | ExcelUtils excel = new ExcelUtils(excelPath, sheetName); 51 | 52 | int rowCount = excel.getRowCount(); 53 | int colCount = excel.getColCount(); 54 | 55 | Object data[][] = new Object[rowCount-1][colCount]; 56 | 57 | for(int i=1; i 2 | 3 | 4 | 5 | 15 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Default suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Failed suite [Default suite]/Default test(failed).html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Default test(failed) 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Default test(failed)

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/1/0
Started on:Wed Aug 15 13:35:44 IST 2018
Total time:0 seconds (34 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 114 | 115 | 116 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
test3
Test class: demo.TestNGRetryFailedDemo
java.lang.AssertionError: expected [true] but found [false]
 80 | 	at demo.TestNGRetryFailedDemo.test3(TestNGRetryFailedDemo.java:22)
 81 | ... Removed 29 stack frames
Click to show all stack frames 82 |
java.lang.AssertionError: expected [true] but found [false]
 83 | 	at org.testng.Assert.fail(Assert.java:96)
 84 | 	at org.testng.Assert.failNotEquals(Assert.java:776)
 85 | 	at org.testng.Assert.assertTrue(Assert.java:44)
 86 | 	at org.testng.Assert.assertTrue(Assert.java:54)
 87 | 	at demo.TestNGRetryFailedDemo.test3(TestNGRetryFailedDemo.java:22)
 88 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 89 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 90 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 91 | 	at java.lang.reflect.Method.invoke(Unknown Source)
 92 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
 93 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
 94 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
 95 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
 96 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
 97 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
 98 | 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
 99 | 	at org.testng.TestRunner.run(TestRunner.java:505)
100 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
101 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
102 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
103 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
104 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
105 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
106 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
107 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
108 | 	at org.testng.TestNG.runSuites(TestNG.java:1049)
109 | 	at org.testng.TestNG.run(TestNG.java:1017)
110 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
111 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
112 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
113 | 
0demo.TestNGRetryFailedDemo@3aeaafa6

117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
test2
Test class: demo.TestNGRetryFailedDemo
0demo.TestNGRetryFailedDemo@3aeaafa6

130 | 131 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Failed suite [Default suite]/Default test(failed).xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Failed suite [Default suite]/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Failed suite [Suite1]/Test1(failed).html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Test1(failed) 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Test1(failed)

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/0/0
Started on:Wed Aug 15 12:33:26 IST 2018
Total time:0 seconds (15 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Failed suite [Suite1]/Test1(failed).xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/Chrome Test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Chrome Test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Chrome Test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/0/0
Started on:Mon Aug 13 12:38:17 IST 2018
Total time:5 seconds (5025 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
test1
Test class: demo.TestNGMultiBrowserTestingDemo
1demo.TestNGMultiBrowserTestingDemo@e720b71

83 | 84 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/Chrome Test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/Firefox Test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Firefox Test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Firefox Test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/0/0
Started on:Mon Aug 13 12:38:17 IST 2018
Total time:5 seconds (5236 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
test1
Test class: demo.TestNGMultiBrowserTestingDemo
1demo.TestNGMultiBrowserTestingDemo@1fc2b765

83 | 84 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/Firefox Test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/IE Test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: IE Test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

IE Test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/1/0
Started on:Mon Aug 13 12:38:17 IST 2018
Total time:0 seconds (59 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 109 | 110 | 111 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
test1
Test class: demo.TestNGMultiBrowserTestingDemo
java.lang.NullPointerException
 80 | 	at demo.TestNGMultiBrowserTestingDemo.test1(TestNGMultiBrowserTestingDemo.java:44)
 81 | 	at java.util.concurrent.FutureTask.run(Unknown Source)
 82 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 83 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 84 | 	at java.lang.Thread.run(Unknown Source)
 85 | ... Removed 16 stack frames
Click to show all stack frames 86 |
java.lang.NullPointerException
 87 | 	at demo.TestNGMultiBrowserTestingDemo.test1(TestNGMultiBrowserTestingDemo.java:44)
 88 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 89 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 90 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 91 | 	at java.lang.reflect.Method.invoke(Unknown Source)
 92 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
 93 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
 94 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
 95 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
 96 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
 97 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
 98 | 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
 99 | 	at org.testng.TestRunner.run(TestRunner.java:505)
100 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
101 | 	at org.testng.SuiteRunner.access$000(SuiteRunner.java:40)
102 | 	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:489)
103 | 	at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52)
104 | 	at java.util.concurrent.FutureTask.run(Unknown Source)
105 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
106 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
107 | 	at java.lang.Thread.run(Unknown Source)
108 | 
0demo.TestNGMultiBrowserTestingDemo@78ac1102

112 | 113 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/IE Test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/Test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/0/0
Started on:Mon Aug 13 12:29:28 IST 2018
Total time:3 seconds (3087 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
test1
Test class: demo.TestNGMultiBrowserTestingDemo
0demo.TestNGMultiBrowserTestingDemo@11758f2a

83 | 84 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/Test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/Test1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Test1 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Test1

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/0/0
Started on:Tue Aug 14 15:26:38 IST 2018
Total time:0 seconds (33 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
test
Test class: demo.TestNGParametersDemo
Parameters: Raghav
0demo.TestNGParametersDemo@12f41634

83 | 84 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/Test1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/TestOnChrome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: TestOnChrome 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

TestOnChrome

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/0/0
Started on:Mon Aug 13 12:53:48 IST 2018
Total time:11 seconds (11366 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
test1
Test class: demo.TestNGMultiBrowserDemo
5demo.TestNGMultiBrowserDemo@e720b71

83 | 84 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/TestOnChrome.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/TestOnFirefox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | (InternetExplorerDriver.java:212) 36 | at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:154) 37 | at demo.TestNGMultiBrowserDemo.setup(TestNGMultiBrowserDemo.java:33) 38 | at java.util.concurrent.FutureTask.run(Unknown Source) 39 | at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 40 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 41 | at java.lang.Thread.run(Unknown Source) 42 | ... Removed 19 stack frames]]> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/TestOnIE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | (InternetExplorerDriver.java:212) 36 | at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:154) 37 | at demo.TestNGMultiBrowserDemo.setup(TestNGMultiBrowserDemo.java:33) 38 | at java.util.concurrent.FutureTask.run(Unknown Source) 39 | at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 40 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 41 | at java.lang.Thread.run(Unknown Source) 42 | ... Removed 19 stack frames]]> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/Suite1/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/bullet_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/test-output/bullet_point.png -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/test-output/collapseall.gif -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG Report 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Default suite
Default test0014,551
14 | 15 |
ClassMethodStartTime (ms)
Default suite
Default test — failed
demo.FluentWaitDemotest115345833469764521
16 |

Default test

demo.FluentWaitDemo#test1

Exception
org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document 17 | (Session info: chrome=68.0.3440.106) 18 | (Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information) 19 | Command duration or timeout: 56 milliseconds 20 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html 21 | Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' 22 | System info: host: 'EC2AMAZ-NDM7R0M', ip: '172.20.128.1', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131' 23 | Driver info: org.openqa.selenium.chrome.ChromeDriver 24 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91), userDataDir=C:\Users\ADMINI~1\AppData\Local\Temp\2\scoped_dir6016_77}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=68.0.3440.106, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=false, acceptInsecureCerts=false, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}] 25 | Session ID: 915df9244eb126c89ffd8678e124c8dd 26 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 27 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 28 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 29 | at java.lang.reflect.Constructor.newInstance(Unknown Source) 30 | at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215) 31 | at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167) 32 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671) 33 | at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:272) 34 | at org.openqa.selenium.remote.RemoteWebElement.isDisplayed(RemoteWebElement.java:313) 35 | at demo.FluentWaitDemo.test1(FluentWaitDemo.java:64) 36 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 37 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 38 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 39 | at java.lang.reflect.Method.invoke(Unknown Source) 40 | at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) 41 | at org.testng.internal.Invoker.invokeMethod(Invoker.java:580) 42 | at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716) 43 | at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988) 44 | at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) 45 | at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) 46 | at org.testng.TestRunner.privateRun(TestRunner.java:648) 47 | at org.testng.TestRunner.run(TestRunner.java:505) 48 | at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) 49 | at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) 50 | at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) 51 | at org.testng.SuiteRunner.run(SuiteRunner.java:364) 52 | at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 53 | at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) 54 | at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) 55 | at org.testng.TestNG.runSuitesLocally(TestNG.java:1137) 56 | at org.testng.TestNG.runSuites(TestNG.java:1049) 57 | at org.testng.TestNG.run(TestNG.java:1017) 58 | at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114) 59 | at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) 60 | at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) 61 |

back to summary

62 | 63 | 64 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/test-output/failed.png -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.Demo1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.FluentWaitDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.Test1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGDependencyDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGGroupingDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGGroupsDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGIgnoreDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGIgnoreTestDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGMultiBrowserDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | (InternetExplorerDriver.java:212) 45 | at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:154) 46 | at demo.TestNGMultiBrowserDemo.setup(TestNGMultiBrowserDemo.java:33) 47 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 48 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 49 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 50 | at java.lang.reflect.Method.invoke(Unknown Source) 51 | at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) 52 | at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59) 53 | at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458) 54 | at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222) 55 | at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142) 56 | at org.testng.TestRunner.beforeRun(TestRunner.java:529) 57 | at org.testng.TestRunner.run(TestRunner.java:497) 58 | at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) 59 | at org.testng.SuiteRunner.access$000(SuiteRunner.java:40) 60 | at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:489) 61 | at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52) 62 | at java.util.concurrent.FutureTask.run(Unknown Source) 63 | at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 64 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 65 | at java.lang.Thread.run(Unknown Source) 66 | ]]> 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGMultiBrowserTestingDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGParallelTestingDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGParametersDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGPriorityDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGRerunFailedDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 35 | 36 | 37 | 38 | 39 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo.TestNGRetryFailedDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-demo1.TestNGPriorityDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-listeners.TestNGListenerDemo2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-listeners.TestNGListenerDemo3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-test.DesiredCapabilitiesDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-test.ExtentReportsDemoWithTestNG.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-test.ExtentReportsWithTestNG_Demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-test.PropFileDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-test.TestNG_Demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-test.TestNG_Demo2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-utils.ExcelDataProvider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/junitreports/TEST-utils.ExcelDataProvider2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/navigator-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/test-output/navigator-bullet.png -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/Default test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Default test] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Class nameMethod nameGroups
demo.FluentWaitDemo  
@Test
 test1 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
29 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Default suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/18 14:39:06 0      test1main@1883840933
7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Default suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/18 14:39:06 0      test1main@1883840933
7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Default suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Default suite">
  <test thread-count="5" verbose="2" name="Default test">
    <classes>
      <class name="demo.FluentWaitDemo"/>
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Default suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Default suite 4 | 5 | 6 | 7 | 8 |

Results for
Default suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test1 class1 method:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Default test (0/1/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/Default test(failed).properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Default test(failed)] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Class nameMethod nameGroups
demo.TestNGRetryFailedDemo  
@Test
 test2 
 test3 
 test1 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
37 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/index.html: -------------------------------------------------------------------------------- 1 | Results for Failed suite [Default suite] 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/main.html: -------------------------------------------------------------------------------- 1 | Results for Failed suite [Default suite] 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Failed suite [Default suite]

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/15 13:35:44 0      test2main@1896294051
18/08/15 13:35:44 11      test3main@1896294051
9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 | 3 |
demo.TestNGRetryFailedDemo.test1
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Failed suite [Default suite]

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/15 13:35:44 0      test2main@1896294051
18/08/15 13:35:44 11      test3main@1896294051
9 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Failed suite [Default suite]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Failed suite [Default suite]">
  <test thread-count="5" name="Default test(failed)">
    <classes>
      <class name="demo.TestNGRetryFailedDemo">
        <methods>
          <include name="test2"/>
          <include name="test3"/>
        </methods>
      </class> <!-- demo.TestNGRetryFailedDemo -->
    </classes>
  </test> <!-- Default test(failed) -->
</suite> <!-- Failed suite [Default suite] -->
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Default suite]/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Failed suite [Default suite] 4 | 5 | 6 | 7 | 8 |

Results for
Failed suite [Default suite]

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test1 class2 methods:
14 |   chronological
15 |   alphabetical
16 |   not run (1)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Default test(failed) (1/1/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/Test1(failed).properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test1(failed)] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
Class nameMethod nameGroups
7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/index.html: -------------------------------------------------------------------------------- 1 | Results for Failed suite [Suite1] 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/main.html: -------------------------------------------------------------------------------- 1 | Results for Failed suite [Suite1] 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Failed suite [Suite1]

(Hover the method name to see the test class name)

2 | 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 | 3 | 4 | 5 | 6 |
demo.TestNGParametersDemo.test1
demo.TestNGParametersDemo.test3
demo.TestNGParametersDemo.test4
demo.TestNGParametersDemo.test2
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Failed suite [Suite1]

(Hover the method name to see the test class name)

2 | 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Failed suite [Suite1]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Failed suite [Suite1]">
  <test thread-count="5" name="Test1(failed)">
    <classes>
      <class name="demo.TestNGParametersDemo">
        <methods>
          <include name="test"/>
        </methods>
      </class> <!-- demo.TestNGParametersDemo -->
    </classes>
  </test> <!-- Test1(failed) -->
</suite> <!-- Failed suite [Suite1] -->
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Failed suite [Suite1]/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Failed suite [Suite1] 4 | 5 | 6 | 7 | 8 |

Results for
Failed suite [Suite1]

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test0 class0 method:
14 |   chronological
15 |   alphabetical
16 |   not run (4)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Test1(failed) (0/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/Chrome Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=IE Test][SuiteResult context=Chrome Test][SuiteResult context=Firefox Test] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/Firefox Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=IE Test][SuiteResult context=Chrome Test][SuiteResult context=Firefox Test] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/IE Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=IE Test][SuiteResult context=Chrome Test][SuiteResult context=Firefox Test] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Class nameMethod nameGroups
demo.TestNGMultiBrowserTestingDemo  
@Test
 test1 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
29 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/13 12:38:17 0  >>setUp     TestNG-tests-2@1199098436
18/08/13 12:38:17 0  >>setUp     TestNG-tests-3@403331477
18/08/13 12:38:17 0  >>setUp     TestNG-tests-1@545162382
18/08/13 12:38:17 47  <<tearDown     TestNG-tests-3@403331477
18/08/13 12:38:22 5013  <<tearDown     TestNG-tests-1@545162382
18/08/13 12:38:22 5223  <<tearDown     TestNG-tests-2@1199098436
18/08/13 12:38:17 26      test1TestNG-tests-3@403331477
18/08/13 12:38:20 3351      test1TestNG-tests-1@545162382
18/08/13 12:38:21 4159      test1TestNG-tests-2@1199098436
23 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/13 12:38:17 0  >>setUp     TestNG-tests-2@1199098436
18/08/13 12:38:17 0  >>setUp     TestNG-tests-3@403331477
18/08/13 12:38:17 0  >>setUp     TestNG-tests-1@545162382
18/08/13 12:38:17 26      test1TestNG-tests-3@403331477
18/08/13 12:38:17 47  <<tearDown     TestNG-tests-3@403331477
18/08/13 12:38:20 3351      test1TestNG-tests-1@545162382
18/08/13 12:38:21 4159      test1TestNG-tests-2@1199098436
18/08/13 12:38:22 5013  <<tearDown     TestNG-tests-1@545162382
18/08/13 12:38:22 5223  <<tearDown     TestNG-tests-2@1199098436
23 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Suite" parallel="tests">
  <test thread-count="5" name="Chrome Test" parallel="tests">
    <parameter name="browserName" value="chrome"/>
    <classes>
      <class name="demo.TestNGMultiBrowserTestingDemo"/>
    </classes>
  </test> <!-- Chrome Test -->
  <test thread-count="5" name="Firefox Test" parallel="tests">
    <parameter name="browserName" value="firefox"/>
    <classes>
      <class name="demo.TestNGMultiBrowserTestingDemo"/>
    </classes>
  </test> <!-- Firefox Test -->
  <test thread-count="5" name="IE Test" parallel="tests">
    <parameter name="browserName" value="ie"/>
    <classes>
      <class name="demo.TestNGMultiBrowserTestingDemo"/>
    </classes>
  </test> <!-- IE Test -->
</suite> <!-- Suite -->
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Suite 4 | 5 | 6 | 7 | 8 |

Results for
Suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
3 tests1 class3 methods:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
IE Test (0/1/0) 26 | Results 27 |
28 |
30 | 31 | 32 |

37 |

33 |
Chrome Test (1/0/0) 34 | Results 35 |
36 |
38 | 39 | 40 |

45 |

41 |
Firefox Test (1/0/0) 42 | Results 43 |
44 |
46 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/Test1.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test1] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/TestOnChrome.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=TestOnIE][SuiteResult context=TestOnFirefox][SuiteResult context=TestOnChrome] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/TestOnFirefox.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=TestOnIE][SuiteResult context=TestOnFirefox][SuiteResult context=TestOnChrome] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/TestOnIE.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=TestOnIE][SuiteResult context=TestOnFirefox][SuiteResult context=TestOnChrome] -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Class nameMethod nameGroups
demo.TestNGParametersDemo  
@Test
 test 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
29 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/index.html: -------------------------------------------------------------------------------- 1 | Results for Suite1 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/main.html: -------------------------------------------------------------------------------- 1 | Results for Suite1 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite1

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/14 15:26:38 0      testmain@1134612201
7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite1

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
18/08/14 15:26:38 0      testmain@1134612201
7 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Suite1<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Suite1">
  <test thread-count="5" name="Test1">
    <classes>
      <class name="demo.TestNGParametersDemo"/>
    </classes>
  </test> <!-- Test1 -->
</suite> <!-- Suite1 -->
-------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/Suite1/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Suite1 4 | 5 | 6 | 7 | 8 |

Results for
Suite1

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test1 class1 method:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Test1 (1/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total010 
Default suite010Link
10 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/test-output/passed.png -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raghav-Pal/SeleniumJavaFramework1/0423f59dd626fb9629536517a6fa3e33358c8a1c/SeleniumJavaFramework/test-output/skipped.png -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px 0px 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0px; 7 | } 8 | 9 | li { 10 | list-style-type: none; 11 | } 12 | 13 | a { 14 | text-decoration: none; 15 | } 16 | 17 | a:hover { 18 | text-decoration: underline; 19 | } 20 | 21 | .navigator-selected { 22 | background: #ffa500; 23 | } 24 | 25 | .wrapper { 26 | position: absolute; 27 | top: 60px; 28 | bottom: 0; 29 | left: 400px; 30 | right: 0; 31 | overflow: auto; 32 | } 33 | 34 | .navigator-root { 35 | position: absolute; 36 | top: 60px; 37 | bottom: 0; 38 | left: 0; 39 | width: 400px; 40 | overflow-y: auto; 41 | } 42 | 43 | .suite { 44 | margin: 0px 10px 10px 0px; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times; 52 | } 53 | 54 | .main-panel-header { 55 | padding: 5px; 56 | background-color: #9FB4D9; //afeeee; 57 | font-family: monospace; 58 | font-size: 18px; 59 | } 60 | 61 | .main-panel-content { 62 | padding: 5px; 63 | margin-bottom: 10px; 64 | background-color: #DEE8FC; //d0ffff; 65 | } 66 | 67 | .rounded-window { 68 | border-radius: 10px; 69 | border-style: solid; 70 | border-width: 1px; 71 | } 72 | 73 | .rounded-window-top { 74 | border-top-right-radius: 10px 10px; 75 | border-top-left-radius: 10px 10px; 76 | border-style: solid; 77 | border-width: 1px; 78 | overflow: auto; 79 | } 80 | 81 | .light-rounded-window-top { 82 | border-top-right-radius: 10px 10px; 83 | border-top-left-radius: 10px 10px; 84 | } 85 | 86 | .rounded-window-bottom { 87 | border-style: solid; 88 | border-width: 0px 1px 1px 1px; 89 | border-bottom-right-radius: 10px 10px; 90 | border-bottom-left-radius: 10px 10px; 91 | overflow: auto; 92 | } 93 | 94 | .method-name { 95 | font-size: 12px; 96 | font-family: monospace; 97 | } 98 | 99 | .method-content { 100 | border-style: solid; 101 | border-width: 0px 0px 1px 0px; 102 | margin-bottom: 10; 103 | padding-bottom: 5px; 104 | width: 80%; 105 | } 106 | 107 | .parameters { 108 | font-size: 14px; 109 | font-family: monospace; 110 | } 111 | 112 | .stack-trace { 113 | white-space: pre; 114 | font-family: monospace; 115 | font-size: 12px; 116 | font-weight: bold; 117 | margin-top: 0px; 118 | margin-left: 20px; 119 | } 120 | 121 | .testng-xml { 122 | font-family: monospace; 123 | } 124 | 125 | .method-list-content { 126 | margin-left: 10px; 127 | } 128 | 129 | .navigator-suite-content { 130 | margin-left: 10px; 131 | font: 12px 'Lucida Grande'; 132 | } 133 | 134 | .suite-section-title { 135 | margin-top: 10px; 136 | width: 80%; 137 | border-style: solid; 138 | border-width: 1px 0px 0px 0px; 139 | font-family: Times; 140 | font-size: 18px; 141 | font-weight: bold; 142 | } 143 | 144 | .suite-section-content { 145 | list-style-image: url(bullet_point.png); 146 | } 147 | 148 | .top-banner-root { 149 | position: absolute; 150 | top: 0; 151 | height: 45px; 152 | left: 0; 153 | right: 0; 154 | padding: 5px; 155 | margin: 0px 0px 5px 0px; 156 | background-color: #0066ff; 157 | font-family: Times; 158 | color: #fff; 159 | text-align: center; 160 | } 161 | 162 | .top-banner-title-font { 163 | font-size: 25px; 164 | } 165 | 166 | .test-name { 167 | font-family: 'Lucida Grande'; 168 | font-size: 16px; 169 | } 170 | 171 | .suite-icon { 172 | padding: 5px; 173 | float: right; 174 | height: 20; 175 | } 176 | 177 | .test-group { 178 | font: 20px 'Lucida Grande'; 179 | margin: 5px 5px 10px 5px; 180 | border-width: 0px 0px 1px 0px; 181 | border-style: solid; 182 | padding: 5px; 183 | } 184 | 185 | .test-group-name { 186 | font-weight: bold; 187 | } 188 | 189 | .method-in-group { 190 | font-size: 16px; 191 | margin-left: 80px; 192 | } 193 | 194 | table.google-visualization-table-table { 195 | width: 100%; 196 | } 197 | 198 | .reporter-method-name { 199 | font-size: 14px; 200 | font-family: monospace; 201 | } 202 | 203 | .reporter-method-output-div { 204 | padding: 5px; 205 | margin: 0px 0px 5px 20px; 206 | font-size: 12px; 207 | font-family: monospace; 208 | border-width: 0px 0px 0px 1px; 209 | border-style: solid; 210 | } 211 | 212 | .ignored-class-div { 213 | font-size: 14px; 214 | font-family: monospace; 215 | } 216 | 217 | .ignored-methods-div { 218 | padding: 5px; 219 | margin: 0px 0px 5px 20px; 220 | font-size: 12px; 221 | font-family: monospace; 222 | border-width: 0px 0px 0px 1px; 223 | border-style: solid; 224 | } 225 | 226 | .border-failed { 227 | border-top-left-radius: 10px 10px; 228 | border-bottom-left-radius: 10px 10px; 229 | border-style: solid; 230 | border-width: 0px 0px 0px 10px; 231 | border-color: #f00; 232 | } 233 | 234 | .border-skipped { 235 | border-top-left-radius: 10px 10px; 236 | border-bottom-left-radius: 10px 10px; 237 | border-style: solid; 238 | border-width: 0px 0px 0px 10px; 239 | border-color: #edc600; 240 | } 241 | 242 | .border-passed { 243 | border-top-left-radius: 10px 10px; 244 | border-bottom-left-radius: 10px 10px; 245 | border-style: solid; 246 | border-width: 0px 0px 0px 10px; 247 | border-color: #19f52d; 248 | } 249 | 250 | .times-div { 251 | text-align: center; 252 | padding: 5px; 253 | } 254 | 255 | .suite-total-time { 256 | font: 16px 'Lucida Grande'; 257 | } 258 | 259 | .configuration-suite { 260 | margin-left: 20px; 261 | } 262 | 263 | .configuration-test { 264 | margin-left: 40px; 265 | } 266 | 267 | .configuration-class { 268 | margin-left: 60px; 269 | } 270 | 271 | .configuration-method { 272 | margin-left: 80px; 273 | } 274 | 275 | .test-method { 276 | margin-left: 100px; 277 | } 278 | 279 | .chronological-class { 280 | background-color: #0ccff; 281 | border-style: solid; 282 | border-width: 0px 0px 1px 1px; 283 | } 284 | 285 | .method-start { 286 | float: right; 287 | } 288 | 289 | .chronological-class-name { 290 | padding: 0px 0px 0px 5px; 291 | color: #008; 292 | } 293 | 294 | .after, .before, .test-method { 295 | font-family: monospace; 296 | font-size: 14px; 297 | } 298 | 299 | .navigator-suite-header { 300 | font-size: 22px; 301 | margin: 0px 10px 5px 0px; 302 | background-color: #deb887; 303 | text-align: center; 304 | } 305 | 306 | .collapse-all-icon { 307 | padding: 5px; 308 | float: right; 309 | } 310 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').click(function() { 3 | // Extract the panel for this link 4 | var panel = getPanelName($(this)); 5 | 6 | // Mark this link as currently selected 7 | $('.navigator-link').parent().removeClass('navigator-selected'); 8 | $(this).parent().addClass('navigator-selected'); 9 | 10 | showPanel(panel); 11 | }); 12 | 13 | installMethodHandlers('failed'); 14 | installMethodHandlers('skipped'); 15 | installMethodHandlers('passed', true); // hide passed methods by default 16 | 17 | $('a.method').click(function() { 18 | showMethod($(this)); 19 | return false; 20 | }); 21 | 22 | // Hide all the panels and display the first one (do this last 23 | // to make sure the click() will invoke the listeners) 24 | $('.panel').hide(); 25 | $('.navigator-link').first().click(); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').click(function() { 29 | var contents = $('.navigator-suite-content'); 30 | if (contents.css('display') == 'none') { 31 | contents.show(); 32 | } else { 33 | contents.hide(); 34 | } 35 | }); 36 | }); 37 | 38 | // The handlers that take care of showing/hiding the methods 39 | function installMethodHandlers(name, hide) { 40 | function getContent(t) { 41 | return $('.method-list-content.' + name + "." + t.attr('panel-name')); 42 | } 43 | 44 | function getHideLink(t, name) { 45 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); 46 | return $(s); 47 | } 48 | 49 | function getShowLink(t, name) { 50 | return $('a.show-methods.' + name + "." + t.attr('panel-name')); 51 | } 52 | 53 | function getMethodPanelClassSel(element, name) { 54 | var panelName = getPanelName(element); 55 | var sel = '.' + panelName + "-class-" + name; 56 | return $(sel); 57 | } 58 | 59 | $('a.hide-methods.' + name).click(function() { 60 | var w = getContent($(this)); 61 | w.hide(); 62 | getHideLink($(this), name).hide(); 63 | getShowLink($(this), name).show(); 64 | getMethodPanelClassSel($(this), name).hide(); 65 | }); 66 | 67 | $('a.show-methods.' + name).click(function() { 68 | var w = getContent($(this)); 69 | w.show(); 70 | getHideLink($(this), name).show(); 71 | getShowLink($(this), name).hide(); 72 | showPanel(getPanelName($(this))); 73 | getMethodPanelClassSel($(this), name).show(); 74 | }); 75 | 76 | if (hide) { 77 | $('a.hide-methods.' + name).click(); 78 | } else { 79 | $('a.show-methods.' + name).click(); 80 | } 81 | } 82 | 83 | function getHashForMethod(element) { 84 | return element.attr('hash-for-method'); 85 | } 86 | 87 | function getPanelName(element) { 88 | return element.attr('panel-name'); 89 | } 90 | 91 | function showPanel(panelName) { 92 | $('.panel').hide(); 93 | var panel = $('.panel[panel-name="' + panelName + '"]'); 94 | panel.show(); 95 | } 96 | 97 | function showMethod(element) { 98 | var hashTag = getHashForMethod(element); 99 | var panelName = getPanelName(element); 100 | showPanel(panelName); 101 | var current = document.location.href; 102 | var base = current.substring(0, current.indexOf('#')) 103 | document.location.href = base + '#' + hashTag; 104 | var newPosition = $(document).scrollTop() - 65; 105 | $(document).scrollTop(newPosition); 106 | } 107 | 108 | function drawTable() { 109 | for (var i = 0; i < suiteTableInitFunctions.length; i++) { 110 | window[suiteTableInitFunctions[i]](); 111 | } 112 | 113 | for (var k in window.suiteTableData) { 114 | var v = window.suiteTableData[k]; 115 | var div = v.tableDiv; 116 | var data = v.tableData 117 | var table = new google.visualization.Table(document.getElementById(div)); 118 | table.draw(data, { 119 | showRowNumber : false 120 | }); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/test-output/testng.css: -------------------------------------------------------------------------------- 1 | .invocation-failed, .test-failed { background-color: #DD0000; } 2 | .invocation-percent, .test-percent { background-color: #006600; } 3 | .invocation-passed, .test-passed { background-color: #00AA00; } 4 | .invocation-skipped, .test-skipped { background-color: #CCCC00; } 5 | 6 | .main-page { 7 | font-size: x-large; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/testng1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/testng2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/testng3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/testng4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/testng5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /SeleniumJavaFramework/testng6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal --------------------------------------------------------------------------------