├── .gitignore ├── .gitattributes ├── test-output ├── old │ ├── TestSuite │ │ ├── groups.html │ │ ├── testGuru.properties │ │ ├── reporter-output.html │ │ ├── methods-not-run.html │ │ ├── main.html │ │ ├── index.html │ │ ├── testng.xml.html │ │ ├── classes.html │ │ ├── toc.html │ │ ├── methods.html │ │ └── methods-alphabetical.html │ ├── Default suite │ │ ├── groups.html │ │ ├── Default test.properties │ │ ├── reporter-output.html │ │ ├── methods-not-run.html │ │ ├── main.html │ │ ├── index.html │ │ ├── testng.xml.html │ │ ├── classes.html │ │ ├── toc.html │ │ ├── methods.html │ │ └── methods-alphabetical.html │ └── index.html ├── failed.png ├── passed.png ├── skipped.png ├── collapseall.gif ├── bullet_point.png ├── navigator-bullet.png ├── testng.css ├── Default suite │ ├── Default test.xml │ ├── testng-failed.xml │ └── Default test.html ├── TestSuite │ ├── testGuru.xml │ └── testGuru.html ├── junitreports │ ├── TEST-com.crm.qa.testcases.XylemSmokeTest.xml │ └── TEST-com.xylem.qa.testcases.XylemSmokeTest.xml ├── testng-failed.xml ├── emailable-report.html ├── testng-results.xml ├── testng-reports.js ├── testng-reports.css ├── index.html └── Extent.html ├── .DS_Store ├── drivers └── chromedriver.exe ├── .settings ├── org.eclipse.m2e.core.prefs ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs ├── src ├── main │ ├── java │ │ └── com │ │ │ ├── xylem │ │ │ └── qa │ │ │ │ ├── testdata │ │ │ │ └── TestData.xlsx │ │ │ │ ├── config │ │ │ │ └── config.properties │ │ │ │ ├── pages │ │ │ │ ├── XylemHomePage.java │ │ │ │ └── XylemProjectPage.java │ │ │ │ ├── base │ │ │ │ └── XylemBase.java │ │ │ │ └── util │ │ │ │ ├── WebEventListener.java │ │ │ │ └── TestUtil.java │ │ │ └── qa │ │ │ └── ExtentReportListener │ │ │ └── ExtentReporterNG.java │ └── resources │ │ ├── testng_sanity.xml │ │ └── testng.xml └── test │ └── java │ └── com │ └── xylem │ └── qa │ └── testcases │ └── XylemSmokeTest.java ├── README.md ├── .project ├── LICENSE ├── .classpath └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | test-output/* linguist-vendored 2 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /test-output/old/TestSuite/testGuru.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=testGuru] -------------------------------------------------------------------------------- /test-output/old/Default suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /test-output/old/Default suite/Default test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Default test] -------------------------------------------------------------------------------- /test-output/old/TestSuite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/.DS_Store -------------------------------------------------------------------------------- /test-output/old/Default suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /test-output/old/TestSuite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

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

Methods that were not run

2 |
-------------------------------------------------------------------------------- /test-output/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/test-output/failed.png -------------------------------------------------------------------------------- /test-output/passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/test-output/passed.png -------------------------------------------------------------------------------- /drivers/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/drivers/chromedriver.exe -------------------------------------------------------------------------------- /test-output/skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/test-output/skipped.png -------------------------------------------------------------------------------- /test-output/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/test-output/collapseall.gif -------------------------------------------------------------------------------- /test-output/bullet_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/test-output/bullet_point.png -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /test-output/navigator-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/test-output/navigator-bullet.png -------------------------------------------------------------------------------- /test-output/old/TestSuite/main.html: -------------------------------------------------------------------------------- 1 | Results for TestSuite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /test-output/old/Default suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/testdata/TestData.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJavedAli/selenium-java-testng-starter/HEAD/src/main/java/com/xylem/qa/testdata/TestData.xlsx -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding/=UTF-8 6 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/index.html: -------------------------------------------------------------------------------- 1 | Results for TestSuite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-output/old/Default suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Selenium-Java-TestNG-Maven-starter 2 | 3 | 4 | Dependency 5 | Java 6 | Maven 7 | 8 | ###libraries used 9 | Selenium 10 | TestNG 11 | log4j 12 | Extent Reports 13 | 14 | ### Steps to clone execute the tests 15 | ``` 16 | git clone https://github.com/MJavedAli/selenium-java-xylem 17 | cd selenium-java-xylem 18 | mvn clean test 19 | ``` 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/config/config.properties: -------------------------------------------------------------------------------- 1 | xylemurl=https://test.xylect.com 2 | 3 | xyuser=testpoc1 4 | xypassword=5nG%7#3G%yLh 5 | searchTag=N 3000 6 | series=N 3000, N-technology pumps, Flygt 7 | langlist=BULGARIAN,CHINESE,DANISH,DUTCH,ENGLISH,ENGLISH_US,FINNISH,FRENCH,FRENCH_CANADIAN,GERMAN,HUNGARIAN,ITALIAN,NORWEGIAN,POLISH,PORTUGUESE,PORTUGUESE_BRAZIL,ROMANIAN,RUSSIAN,SPANISH,SWEDISH,THAI 8 | 9 | browser = chrome 10 | -------------------------------------------------------------------------------- /src/main/resources/testng_sanity.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-output/Default suite/Default test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | XylemPOC 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 | -------------------------------------------------------------------------------- /test-output/TestSuite/testGuru.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-com.crm.qa.testcases.XylemSmokeTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-com.xylem.qa.testcases.XylemSmokeTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for TestSuite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" guice-stage="DEVELOPMENT" name="TestSuite" parallel="methods">
  <test name="testGuru">
    <classes>
      <class name="com.crm.qa.testcases.TestMultipleSession"/>
    </classes>
  </test> <!-- testGuru -->
</suite> <!-- TestSuite -->
-------------------------------------------------------------------------------- /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 verbose="2" name="Default test">
    <classes>
      <class name="com.xylem.qa.testcases.XylemSmokeTest"/>
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->
-------------------------------------------------------------------------------- /test-output/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 12 | org.eclipse.jdt.core.compiler.release=disabled 13 | org.eclipse.jdt.core.compiler.source=1.8 14 | -------------------------------------------------------------------------------- /test-output/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | Test results 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total300 
Default suite300Link
10 | -------------------------------------------------------------------------------- /test-output/Default suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Class nameMethod nameGroups
com.xylem.qa.testcases.XylemSmokeTest  
@Test
 pumpSearchTest 
 languageListTest 
 loginTest 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
37 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/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
com.crm.qa.testcases.TestMultipleSession  
@Test
 executSessionOne 
 executSessionThree 
 executeSessionTwo 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Javed Ali 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for TestSuite 4 | 5 | 6 | 7 | 8 |

Results for
TestSuite

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

29 |

25 |
testGuru (3/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /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 class3 methods:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Default test (3/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


TestSuite

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

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
17/09/26 16:28:37 0      executSessionOneTestNG-test=testGuru-1@649293552
17/09/26 16:28:37 0      executSessionThreeTestNG-test=testGuru-2@267709270
17/09/26 16:28:37 0      executeSessionTwoTestNG-test=testGuru-3@2037721091
11 | -------------------------------------------------------------------------------- /test-output/old/TestSuite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


TestSuite

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

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
17/09/26 16:28:37 0      executSessionOneTestNG-test=testGuru-1@649293552
17/09/26 16:28:37 0      executSessionThreeTestNG-test=testGuru-2@267709270
17/09/26 16:28:37 0      executeSessionTwoTestNG-test=testGuru-3@2037721091
11 | -------------------------------------------------------------------------------- /src/test/java/com/xylem/qa/testcases/XylemSmokeTest.java: -------------------------------------------------------------------------------- 1 | package com.xylem.qa.testcases; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | import org.testng.Assert; 8 | import org.testng.annotations.AfterTest; 9 | import org.testng.annotations.BeforeTest; 10 | import org.testng.annotations.Test; 11 | 12 | import com.xylem.qa.base.XylemBase; 13 | import com.xylem.qa.pages.XylemHomePage; 14 | import com.xylem.qa.pages.XylemProjectPage; 15 | 16 | public class XylemSmokeTest extends XylemBase{ 17 | XylemHomePage homePage; 18 | XylemProjectPage projectPage; 19 | 20 | public XylemSmokeTest(){ 21 | super(); 22 | } 23 | 24 | @BeforeTest 25 | public void setUp(){ 26 | initialization(); 27 | homePage = new XylemHomePage(); 28 | projectPage = new XylemProjectPage(); 29 | 30 | } 31 | 32 | @Test(priority=1) 33 | public void loginTest(){ 34 | boolean atHome= homePage.isHomePage(); 35 | Assert.assertEquals(true, atHome); 36 | homePage.navigateToIndiaHomePage(); 37 | homePage.userLogin(prop.getProperty("xyuser"), prop.getProperty("xypassword")); 38 | Assert.assertEquals(projectPage.getLoggerInUser().contains("Hi"), true); 39 | } 40 | 41 | @Test(priority=2) 42 | public void pumpSearchTest(){ 43 | String count=projectPage.getPumpModelQuantity(prop.getProperty("searchTag"),prop.getProperty("series")); 44 | Assert.assertEquals(count, "56"); 45 | 46 | } 47 | 48 | @Test(priority=3) 49 | public void languageListTest(){ 50 | List Actuallist=projectPage.getLanguageList(); 51 | //List Explist = new ArrayList(); 52 | 53 | String str[] = prop.getProperty("langlist").split(","); 54 | // for(int i=0;i Expectedlist = new ArrayList(Arrays.asList(str)); 58 | Assert.assertEquals(Actuallist, Expectedlist, "Equal"); 59 | } 60 | 61 | @AfterTest 62 | public void tearDown(){ 63 | driver.quit(); 64 | } 65 | 66 | 67 | 68 | 69 | 70 | } 71 | -------------------------------------------------------------------------------- /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 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/08/30 12:10:23 0  >>setUp     main@1887813102
20/08/30 12:10:38 14628      loginTestmain@1887813102
20/08/30 12:10:58 34695      pumpSearchTestmain@1887813102
20/08/30 12:11:01 38375      languageListTestmain@1887813102
20/08/30 12:11:02 39103  <<tearDown     main@1887813102
15 | -------------------------------------------------------------------------------- /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 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/08/30 12:11:01 0      languageListTestmain@1887813102
20/08/30 12:10:38 -23747      loginTestmain@1887813102
20/08/30 12:10:58 -3680      pumpSearchTestmain@1887813102
20/08/30 12:10:23 -38375  >>setUp     main@1887813102
20/08/30 12:11:02 728  <<tearDown     main@1887813102
15 | -------------------------------------------------------------------------------- /test-output/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | TestNG Report
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Default suite
Default test30039,798
ClassMethodStartTime (ms)
Default suite
Default test — passed
com.xylem.qa.testcases.XylemSmokeTestlanguageListTest1598769661914726
loginTest159876963816720067
pumpSearchTest15987696582343680

Default test

com.xylem.qa.testcases.XylemSmokeTest#languageListTest

back to summary

com.xylem.qa.testcases.XylemSmokeTest#loginTest

back to summary

com.xylem.qa.testcases.XylemSmokeTest#pumpSearchTest

back to summary

-------------------------------------------------------------------------------- /test-output/testng-results.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 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/java/com/qa/ExtentReportListener/ExtentReporterNG.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @author : Javed Ali 3 | * 4 | */ 5 | package com.qa.ExtentReportListener; 6 | 7 | import java.io.File; 8 | import java.util.Calendar; 9 | import java.util.Date; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | import org.testng.IReporter; 14 | import org.testng.IResultMap; 15 | import org.testng.ISuite; 16 | import org.testng.ISuiteResult; 17 | import org.testng.ITestContext; 18 | import org.testng.ITestResult; 19 | import org.testng.xml.XmlSuite; 20 | 21 | import com.relevantcodes.extentreports.ExtentReports; 22 | import com.relevantcodes.extentreports.ExtentTest; 23 | import com.relevantcodes.extentreports.LogStatus; 24 | 25 | public class ExtentReporterNG implements IReporter { 26 | private ExtentReports extent; 27 | 28 | public void generateReport(List xmlSuites, List suites, 29 | String outputDirectory) { 30 | extent = new ExtentReports(outputDirectory + File.separator 31 | + "Extent.html", true); 32 | 33 | for (ISuite suite : suites) { 34 | Map result = suite.getResults(); 35 | 36 | for (ISuiteResult r : result.values()) { 37 | ITestContext context = r.getTestContext(); 38 | 39 | buildTestNodes(context.getPassedTests(), LogStatus.PASS); 40 | buildTestNodes(context.getFailedTests(), LogStatus.FAIL); 41 | buildTestNodes(context.getSkippedTests(), LogStatus.SKIP); 42 | } 43 | } 44 | 45 | extent.flush(); 46 | extent.close(); 47 | } 48 | 49 | private void buildTestNodes(IResultMap tests, LogStatus status) { 50 | ExtentTest test; 51 | 52 | if (tests.size() > 0) { 53 | for (ITestResult result : tests.getAllResults()) { 54 | test = extent.startTest(result.getMethod().getMethodName()); 55 | 56 | test.setStartedTime(getTime(result.getStartMillis())); 57 | test.setEndedTime(getTime(result.getEndMillis())); 58 | 59 | for (String group : result.getMethod().getGroups()) 60 | test.assignCategory(group); 61 | 62 | if (result.getThrowable() != null) { 63 | test.log(status, result.getThrowable()); 64 | } else { 65 | test.log(status, "Test " + status.toString().toLowerCase() 66 | + "ed"); 67 | } 68 | 69 | extent.endTest(test); 70 | } 71 | } 72 | } 73 | 74 | private Date getTime(long millis) { 75 | Calendar calendar = Calendar.getInstance(); 76 | calendar.setTimeInMillis(millis); 77 | return calendar.getTime(); 78 | } 79 | } -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/pages/XylemHomePage.java: -------------------------------------------------------------------------------- 1 | package com.xylem.qa.pages; 2 | 3 | import org.openqa.selenium.WebElement; 4 | import org.openqa.selenium.support.CacheLookup; 5 | import org.openqa.selenium.support.FindBy; 6 | import org.openqa.selenium.support.PageFactory; 7 | import org.openqa.selenium.support.ui.ExpectedConditions; 8 | import org.openqa.selenium.support.ui.Wait; 9 | import org.openqa.selenium.support.ui.WebDriverWait; 10 | 11 | import com.xylem.qa.base.XylemBase; 12 | import com.xylem.qa.util.TestUtil; 13 | 14 | public class XylemHomePage extends XylemBase { 15 | 16 | @FindBy(xpath = "//img[@id='all_logos']") 17 | @CacheLookup 18 | WebElement allLogo; 19 | 20 | @FindBy(xpath = "//a[@id='xyl-privacy-accept']") 21 | WebElement btnPrivacyAccept; 22 | 23 | @FindBy(xpath = "//a[@id='xyl-cookies-accept']") 24 | WebElement btnCookieAccept; 25 | 26 | @FindBy(xpath = "//div[@id='xyl-consent']") 27 | WebElement consentBox; 28 | 29 | @FindBy(xpath = "//input[@id='inpage_login_user']") 30 | WebElement txtUsername; 31 | 32 | @FindBy(xpath = "//input[@id='inpage_login_passwd']") 33 | WebElement txtPassword; 34 | 35 | @FindBy(xpath = "//a[@id='inpage_login_submit']") 36 | WebElement btnLogon; 37 | 38 | @FindBy(xpath = "//a[contains(text(),'India')]") 39 | WebElement lnkIndia; 40 | 41 | @FindBy(xpath = "//input[@id='HeaderBtnOpts']") 42 | WebElement btnHeader; 43 | 44 | @SuppressWarnings("rawtypes") 45 | Wait wait = new WebDriverWait(driver, 20); 46 | 47 | // Initializing the Page Objects: 48 | public XylemHomePage() { 49 | PageFactory.initElements(driver, this); 50 | } 51 | 52 | public void navigateToIndiaHomePage() { 53 | this.lnkIndia.click(); 54 | this.handlePrivacyPopUp(); 55 | } 56 | 57 | @SuppressWarnings("unchecked") 58 | private void handlePrivacyPopUp() { 59 | wait.until(ExpectedConditions.visibilityOf(this.btnPrivacyAccept)); 60 | this.btnPrivacyAccept.click(); 61 | this.btnCookieAccept.click(); 62 | } 63 | 64 | public void userLogin(String username,String password) { 65 | TestUtil.waitForPageLoadComplete(driver, 20000); 66 | this.txtUsername.sendKeys(username); 67 | this.txtPassword.sendKeys(password); 68 | this.btnLogon.click(); 69 | TestUtil.waitForPageLoadComplete(driver, 20000); 70 | 71 | } 72 | public boolean isHomePage(){ 73 | testUtil.waitForUrlContains("Xylect.dll", driver, 20000); 74 | try { 75 | if(this.allLogo.isDisplayed()) { 76 | return true; 77 | } 78 | }catch(Exception e) { 79 | } 80 | return false; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/base/XylemBase.java: -------------------------------------------------------------------------------- 1 | package com.xylem.qa.base; 2 | 3 | import java.io.FileInputStream; 4 | import java.io.FileNotFoundException; 5 | import java.io.IOException; 6 | import java.util.Properties; 7 | import java.util.concurrent.TimeUnit; 8 | 9 | import org.openqa.selenium.WebDriver; 10 | import org.openqa.selenium.chrome.ChromeDriver; 11 | import org.openqa.selenium.firefox.FirefoxDriver; 12 | import org.openqa.selenium.support.events.EventFiringWebDriver; 13 | 14 | import com.xylem.qa.pages.XylemHomePage; 15 | import com.xylem.qa.pages.XylemProjectPage; 16 | import com.xylem.qa.util.TestUtil; 17 | import com.xylem.qa.util.WebEventListener; 18 | 19 | public class XylemBase{ 20 | 21 | public static WebDriver driver; 22 | public static Properties prop; 23 | public static EventFiringWebDriver e_driver; 24 | public static WebEventListener eventListener; 25 | protected static TestUtil testUtil; 26 | static XylemHomePage homepage; 27 | XylemProjectPage projectpage; 28 | 29 | 30 | 31 | public XylemBase(){ 32 | try { 33 | prop = new Properties(); 34 | FileInputStream ip = new FileInputStream(System.getProperty("user.dir")+ "/src/main/java/com/xylem" 35 | + "/qa/config/config.properties"); 36 | prop.load(ip); 37 | } catch (FileNotFoundException e) { 38 | e.printStackTrace(); 39 | } catch (IOException e) { 40 | e.printStackTrace(); 41 | } 42 | } 43 | 44 | 45 | public static void initialization(){ 46 | testUtil = new TestUtil(); 47 | 48 | String browserName = prop.getProperty("browser"); 49 | 50 | if(browserName.equals("chrome")){ 51 | System.setProperty("webdriver.chrome.driver", "C:/Users/Javed Ali/Documents/workspace/PageObjectModel/drivers/chromedriver.exe"); 52 | driver = new ChromeDriver(); 53 | } 54 | else if(browserName.equals("FF")){ 55 | System.setProperty("webdriver.gecko.driver", "C:/Users/Javed Ali/Documents/workspace/PageObjectModel/drivers/geckodriver.exe"); 56 | driver = new FirefoxDriver(); 57 | } 58 | 59 | 60 | e_driver = new EventFiringWebDriver(driver); 61 | // Now create object of EventListerHandler to register it with EventFiringWebDriver 62 | eventListener = new WebEventListener(); 63 | e_driver.register(eventListener); 64 | driver = e_driver; 65 | 66 | driver.manage().window().maximize(); 67 | driver.manage().deleteAllCookies(); 68 | driver.manage().timeouts().pageLoadTimeout(TestUtil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS); 69 | driver.manage().timeouts().implicitlyWait(TestUtil.IMPLICIT_WAIT, TimeUnit.SECONDS); 70 | 71 | driver.get(prop.getProperty("xylemurl")); 72 | 73 | 74 | 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /test-output/Default suite/Default test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Default test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Default test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:3/0/0
Started on:Sun Aug 30 12:10:23 IST 2020
Total time:39 seconds (39798 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 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
languageListTest
Test class: com.xylem.qa.testcases.XylemSmokeTest
0com.xylem.qa.testcases.XylemSmokeTest@ae45eb6
loginTest
Test class: com.xylem.qa.testcases.XylemSmokeTest
20com.xylem.qa.testcases.XylemSmokeTest@ae45eb6
pumpSearchTest
Test class: com.xylem.qa.testcases.XylemSmokeTest
3com.xylem.qa.testcases.XylemSmokeTest@ae45eb6

93 | 94 | -------------------------------------------------------------------------------- /test-output/TestSuite/testGuru.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: testGuru 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

testGuru

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:3/0/0
Started on:Tue Sep 26 16:29:19 IST 2017
Total time:8 seconds (8306 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 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
executSessionOne
Test class: com.crm.qa.testcases.TestMultipleSession
5com.crm.qa.testcases.TestMultipleSession@1794d431
executSessionThree
Test class: com.crm.qa.testcases.TestMultipleSession
5com.crm.qa.testcases.TestMultipleSession@1794d431
executeSessionTwo
Test class: com.crm.qa.testcases.TestMultipleSession
2com.crm.qa.testcases.TestMultipleSession@1794d431

93 | 94 | -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/pages/XylemProjectPage.java: -------------------------------------------------------------------------------- 1 | package com.xylem.qa.pages; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.openqa.selenium.By; 7 | import org.openqa.selenium.WebElement; 8 | import org.openqa.selenium.support.FindBy; 9 | import org.openqa.selenium.support.PageFactory; 10 | import org.openqa.selenium.support.ui.ExpectedConditions; 11 | import org.openqa.selenium.support.ui.Select; 12 | import org.openqa.selenium.support.ui.Wait; 13 | import org.openqa.selenium.support.ui.WebDriverWait; 14 | 15 | import com.xylem.qa.base.XylemBase; 16 | 17 | public class XylemProjectPage extends XylemBase { 18 | 19 | @FindBy(xpath = "//input[@id='HeaderBtnOpts']") 20 | WebElement btnHeader; 21 | 22 | @FindBy(xpath = "//span[@class='HiName_text']") 23 | WebElement lblLoggedInUser; 24 | 25 | @FindBy(xpath = "//input[@id='quicksearch_inpproduct']") 26 | WebElement txtModelSearch; 27 | 28 | @FindBy(xpath = "//span[@class='wichtig']") 29 | WebElement lblProductCount; 30 | 31 | @FindBy(xpath = "//select[@id='TP__LGG']") 32 | WebElement listLanguage; 33 | 34 | @FindBy(xpath = "//p[contains(text(),'Preferences')]") 35 | WebElement OptPreference; 36 | 37 | @SuppressWarnings("rawtypes") 38 | Wait wait = new WebDriverWait(driver, 20); 39 | 40 | 41 | // Initializing the Page Objects: 42 | public XylemProjectPage() { 43 | PageFactory.initElements(driver, this); 44 | 45 | } 46 | 47 | 48 | @SuppressWarnings("unchecked") 49 | public String getLoggerInUser(){ 50 | wait.until(ExpectedConditions.visibilityOf(this.lblLoggedInUser)); 51 | String lblUser=this.lblLoggedInUser.getText(); 52 | return lblUser; 53 | } 54 | 55 | 56 | @SuppressWarnings("unchecked") 57 | public boolean isProjectPage() { 58 | try { 59 | wait.until(ExpectedConditions.visibilityOf(this.btnHeader)); 60 | return true; 61 | } catch (Exception e) { 62 | System.out.println("User is not at Project Page"); 63 | return false; 64 | } 65 | } 66 | 67 | 68 | @SuppressWarnings("unchecked") 69 | public String getPumpModelQuantity(String tag,String series) { 70 | wait.until(ExpectedConditions.visibilityOf(this.txtModelSearch)); 71 | this.txtModelSearch.sendKeys(tag); 72 | driver.findElement(By.xpath("//a[contains(text(),'"+series+"')]")).click(); 73 | wait.until(ExpectedConditions.visibilityOf(this.lblProductCount)); 74 | String productdetails=this.lblProductCount.getText(); 75 | String arrProd[]=productdetails.split(" "); 76 | return arrProd[0]; 77 | 78 | } 79 | 80 | 81 | @SuppressWarnings({ "rawtypes", "unchecked" }) 82 | public List getLanguageList() { 83 | this.btnHeader.click(); 84 | this.OptPreference.click(); 85 | Select select =new Select(this.listLanguage); 86 | List options = select.getOptions(); 87 | List arrLangList=new ArrayList(); 88 | for(WebElement item:options) 89 | { 90 | arrLangList.add(item.getAttribute("value")); 91 | } 92 | return arrLangList; 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | XylemPOCTestAutomation 6 | XylemPOC 7 | 0.0.1-SNAPSHOT 8 | jar 9 | 10 | XylemPOC 11 | http://maven.apache.org 12 | 13 | 14 | UTF-8 15 | 1.8 16 | 1.8 17 | 18 | 19 | 20 | 21 | 22 | org.seleniumhq.selenium 23 | selenium-java 24 | 3.14.0 25 | 26 | 27 | 28 | org.testng 29 | testng 30 | 6.11 31 | compile 32 | 33 | 34 | 35 | 36 | org.apache.poi 37 | poi 38 | 3.16-beta2 39 | 40 | 41 | 42 | 43 | org.apache.poi 44 | poi-ooxml 45 | 3.9 46 | 47 | 48 | org.apache.poi 49 | poi-ooxml-schemas 50 | 3.9 51 | 52 | 53 | org.apache.poi 54 | poi-scratchpad 55 | 3.9 56 | 57 | 58 | org.apache.poi 59 | ooxml-schemas 60 | 1.1 61 | 62 | 63 | 64 | org.apache.poi 65 | openxml4j 66 | 1.0-beta 67 | 68 | 69 | org.apache.poi 70 | poi 71 | 3.9 72 | 73 | 74 | org.apache.poi 75 | poi-ooxml 76 | 3.9 77 | 78 | 79 | org.apache.poi 80 | poi-ooxml-schemas 81 | 3.9 82 | 83 | 84 | org.apache.poi 85 | poi-scratchpad 86 | 3.9 87 | 88 | 89 | org.apache.poi 90 | ooxml-schemas 91 | 1.1 92 | 93 | 94 | 95 | org.apache.poi 96 | openxml4j 97 | 1.0-beta 98 | 99 | 100 | 101 | 102 | com.relevantcodes 103 | extentreports 104 | 2.41.2 105 | 106 | 107 | 108 | 109 | commons-io 110 | commons-io 111 | 2.6 112 | 113 | 114 | 115 | org.apache.commons 116 | commons-exec 117 | 1.3 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/util/WebEventListener.java: -------------------------------------------------------------------------------- 1 | package com.xylem.qa.util; 2 | /*************************************** PURPOSE ********************************** 3 | 4 | - This class implements the WebDriverEventListener, which is included under events. 5 | The purpose of implementing this interface is to override all the methods and define certain useful Log statements 6 | which would be displayed/logged as the application under test is being run. 7 | 8 | Do not call any of these methods, instead these methods will be invoked automatically 9 | as an when the action done (click, findBy etc). 10 | 11 | */ 12 | 13 | import java.io.IOException; 14 | 15 | import org.openqa.selenium.By; 16 | import org.openqa.selenium.OutputType; 17 | import org.openqa.selenium.WebDriver; 18 | import org.openqa.selenium.WebElement; 19 | import org.openqa.selenium.support.events.WebDriverEventListener; 20 | 21 | import com.xylem.qa.base.XylemBase; 22 | 23 | public class WebEventListener extends XylemBase implements WebDriverEventListener { 24 | 25 | public void beforeNavigateTo(String url, WebDriver driver) { 26 | System.out.println("Before navigating to: '" + url + "'"); 27 | } 28 | 29 | public void afterNavigateTo(String url, WebDriver driver) { 30 | System.out.println("Navigated to:'" + url + "'"); 31 | } 32 | 33 | public void beforeChangeValueOf(WebElement element, WebDriver driver) { 34 | System.out.println("Value of the:" + element.toString() + " before any changes made"); 35 | } 36 | 37 | public void afterChangeValueOf(WebElement element, WebDriver driver) { 38 | System.out.println("Element value changed to: " + element.toString()); 39 | } 40 | 41 | public void beforeClickOn(WebElement element, WebDriver driver) { 42 | System.out.println("Trying to click on: " + element.toString()); 43 | } 44 | 45 | public void afterClickOn(WebElement element, WebDriver driver) { 46 | System.out.println("Clicked on: " + element.toString()); 47 | } 48 | 49 | public void beforeNavigateBack(WebDriver driver) { 50 | System.out.println("Navigating back to previous page"); 51 | } 52 | 53 | public void afterNavigateBack(WebDriver driver) { 54 | System.out.println("Navigated back to previous page"); 55 | } 56 | 57 | public void beforeNavigateForward(WebDriver driver) { 58 | System.out.println("Navigating forward to next page"); 59 | } 60 | 61 | public void afterNavigateForward(WebDriver driver) { 62 | System.out.println("Navigated forward to next page"); 63 | } 64 | 65 | public void onException(Throwable error, WebDriver driver) { 66 | System.out.println("Exception occured: " + error); 67 | try { 68 | TestUtil.takeScreenshotAtEndOfTest(); 69 | } catch (IOException e) { 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | public void beforeFindBy(By by, WebElement element, WebDriver driver) { 75 | System.out.println("Trying to find Element By : " + by.toString()); 76 | } 77 | 78 | public void afterFindBy(By by, WebElement element, WebDriver driver) { 79 | System.out.println("Found Element By : " + by.toString()); 80 | } 81 | 82 | /* 83 | * non overridden methods of WebListener class 84 | */ 85 | public void beforeScript(String script, WebDriver driver) { 86 | } 87 | 88 | public void afterScript(String script, WebDriver driver) { 89 | } 90 | 91 | public void beforeAlertAccept(WebDriver driver) { 92 | // TODO Auto-generated method stub 93 | 94 | } 95 | 96 | public void afterAlertAccept(WebDriver driver) { 97 | // TODO Auto-generated method stub 98 | 99 | } 100 | 101 | public void afterAlertDismiss(WebDriver driver) { 102 | // TODO Auto-generated method stub 103 | 104 | } 105 | 106 | public void beforeAlertDismiss(WebDriver driver) { 107 | // TODO Auto-generated method stub 108 | 109 | } 110 | 111 | public void beforeNavigateRefresh(WebDriver driver) { 112 | // TODO Auto-generated method stub 113 | 114 | } 115 | 116 | public void afterNavigateRefresh(WebDriver driver) { 117 | // TODO Auto-generated method stub 118 | 119 | } 120 | 121 | public void beforeChangeValueOf(WebElement element, WebDriver driver, CharSequence[] keysToSend) { 122 | // TODO Auto-generated method stub 123 | 124 | } 125 | 126 | public void afterChangeValueOf(WebElement element, WebDriver driver, CharSequence[] keysToSend) { 127 | // TODO Auto-generated method stub 128 | 129 | } 130 | 131 | public void afterGetScreenshotAs(OutputType arg0, X arg1) { 132 | // TODO Auto-generated method stub 133 | 134 | } 135 | 136 | public void afterGetText(WebElement arg0, WebDriver arg1, String arg2) { 137 | // TODO Auto-generated method stub 138 | 139 | } 140 | 141 | public void afterSwitchToWindow(String arg0, WebDriver arg1) { 142 | // TODO Auto-generated method stub 143 | 144 | } 145 | 146 | public void beforeGetScreenshotAs(OutputType arg0) { 147 | // TODO Auto-generated method stub 148 | 149 | } 150 | 151 | public void beforeGetText(WebElement arg0, WebDriver arg1) { 152 | // TODO Auto-generated method stub 153 | 154 | } 155 | 156 | public void beforeSwitchToWindow(String arg0, WebDriver arg1) { 157 | // TODO Auto-generated method stub 158 | 159 | } 160 | 161 | } -------------------------------------------------------------------------------- /src/main/java/com/xylem/qa/util/TestUtil.java: -------------------------------------------------------------------------------- 1 | package com.xylem.qa.util; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileNotFoundException; 6 | import java.io.IOException; 7 | 8 | import org.apache.commons.io.FileUtils; 9 | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; 10 | import org.apache.poi.ss.usermodel.Sheet; 11 | import org.apache.poi.ss.usermodel.Workbook; 12 | import org.apache.poi.ss.usermodel.WorkbookFactory; 13 | import org.openqa.selenium.JavascriptExecutor; 14 | import org.openqa.selenium.OutputType; 15 | import org.openqa.selenium.TakesScreenshot; 16 | import org.openqa.selenium.WebDriver; 17 | import org.openqa.selenium.support.ui.ExpectedCondition; 18 | import org.openqa.selenium.support.ui.Wait; 19 | import org.openqa.selenium.support.ui.WebDriverWait; 20 | 21 | import com.xylem.qa.base.XylemBase; 22 | 23 | public class TestUtil extends XylemBase { 24 | 25 | public static long PAGE_LOAD_TIMEOUT = 20; 26 | public static long IMPLICIT_WAIT = 20; 27 | 28 | public static String TESTDATA_SHEET_PATH = "C:/Users/Javed Ali/Documents/workspace" 29 | + "/PageObjectModel/src/main/java/com/crm/qa/testdata/TestData.xlsx"; 30 | 31 | static Workbook book; 32 | static Sheet sheet; 33 | static JavascriptExecutor js; 34 | 35 | public void switchToFrame() { 36 | driver.switchTo().frame("mainpanel"); 37 | } 38 | 39 | public static Object[][] getTestData(String sheetName) { 40 | FileInputStream file = null; 41 | try { 42 | file = new FileInputStream(TESTDATA_SHEET_PATH); 43 | } catch (FileNotFoundException e) { 44 | e.printStackTrace(); 45 | } 46 | try { 47 | book = WorkbookFactory.create(file); 48 | } catch (InvalidFormatException e) { 49 | e.printStackTrace(); 50 | } catch (IOException e) { 51 | e.printStackTrace(); 52 | } 53 | sheet = book.getSheet(sheetName); 54 | Object[][] data = new Object[sheet.getLastRowNum()][sheet.getRow(0).getLastCellNum()]; 55 | // System.out.println(sheet.getLastRowNum() + "--------" + 56 | // sheet.getRow(0).getLastCellNum()); 57 | for (int i = 0; i < sheet.getLastRowNum(); i++) { 58 | for (int k = 0; k < sheet.getRow(0).getLastCellNum(); k++) { 59 | data[i][k] = sheet.getRow(i + 1).getCell(k).toString(); 60 | // System.out.println(data[i][k]); 61 | } 62 | } 63 | return data; 64 | } 65 | 66 | public static void takeScreenshotAtEndOfTest() throws IOException { 67 | File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); 68 | String currentDir = System.getProperty("user.dir"); 69 | FileUtils.copyFile(scrFile, new File(currentDir + "/screenshots/" + System.currentTimeMillis() + ".png")); 70 | } 71 | 72 | public static void runTimeInfo(String messageType, String message) throws InterruptedException { 73 | js = (JavascriptExecutor) driver; 74 | // Check for jQuery on the page, add it if need be 75 | js.executeScript("if (!window.jQuery) {" 76 | + "var jquery = document.createElement('script'); jquery.type = 'text/javascript';" 77 | + "jquery.src = 'https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js';" 78 | + "document.getElementsByTagName('head')[0].appendChild(jquery);" + "}"); 79 | Thread.sleep(5000); 80 | 81 | // Use jQuery to add jquery-growl to the page 82 | js.executeScript("$.getScript('https://the-internet.herokuapp.com/js/vendor/jquery.growl.js')"); 83 | 84 | // Use jQuery to add jquery-growl styles to the page 85 | js.executeScript("$('head').append('');"); 87 | Thread.sleep(5000); 88 | 89 | // jquery-growl w/ no frills 90 | js.executeScript("$.growl({ title: 'GET', message: '/' });"); 91 | //'"+color+"'" 92 | if (messageType.equals("error")) { 93 | js.executeScript("$.growl.error({ title: 'ERROR', message: '"+message+"' });"); 94 | }else if(messageType.equals("info")){ 95 | js.executeScript("$.growl.notice({ title: 'Notice', message: 'your notice message goes here' });"); 96 | }else if(messageType.equals("warning")){ 97 | js.executeScript("$.growl.warning({ title: 'Warning!', message: 'your warning message goes here' });"); 98 | }else 99 | System.out.println("no error message"); 100 | // jquery-growl w/ colorized output 101 | // js.executeScript("$.growl.error({ title: 'ERROR', message: 'your error message goes here' });"); 102 | // js.executeScript("$.growl.notice({ title: 'Notice', message: 'your notice message goes here' });"); 103 | // js.executeScript("$.growl.warning({ title: 'Warning!', message: 'your warning message goes here' });"); 104 | Thread.sleep(5000); 105 | } 106 | 107 | public void waitForUrlContains(String expectedString, WebDriver driver, int specifiedTimeout) { 108 | WebDriverWait wait = new WebDriverWait(driver, specifiedTimeout); 109 | ExpectedCondition urlIsCorrect = arg0 -> driver.getCurrentUrl().contains(expectedString); 110 | wait.until(urlIsCorrect); 111 | waitForPageLoadComplete(driver, specifiedTimeout); 112 | } 113 | 114 | public static void waitForPageLoadComplete(WebDriver driver, int specifiedTimeout) { 115 | Wait wait = new WebDriverWait(driver, specifiedTimeout); 116 | wait.until(driver1 -> String 117 | .valueOf(((JavascriptExecutor) driver1).executeScript("return document.readyState")) 118 | .equals("complete")); 119 | } 120 | 121 | 122 | } 123 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /test-output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | TestNG reports 7 | 8 | 9 | 10 | 11 | 12 | 18 | 21 | 22 | 23 | 24 |

25 | Test results 26 |
27 | 1 suite 28 |
29 | 127 |
128 |
129 |
130 |
131 |
132 | 133 | com.xylem.qa.testcases.XylemSmokeTest 134 |
135 |
136 |
137 |
138 | 139 | 140 | languageListTest 141 |
142 |
143 |
144 |
145 | 146 | 147 | loginTest 148 |
149 |
150 |
151 |
152 | 153 | 154 | pumpSearchTest 155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | C:\Users\Javed Ali\AppData\Local\Temp\testng-eclipse-204801722\testng-customsuite.xml 163 |
164 |
165 |
166 | <?xml version="1.0" encoding="UTF-8"?>
167 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
168 | <suite guice-stage="DEVELOPMENT" name="Default suite">
169 |   <test verbose="2" name="Default test">
170 |     <classes>
171 |       <class name="com.xylem.qa.testcases.XylemSmokeTest"/>
172 |     </classes>
173 |   </test> <!-- Default test -->
174 | </suite> <!-- Default suite -->
175 |             
176 |
177 |
178 |
179 |
180 | Tests for Default suite 181 |
182 |
183 |
    184 |
  • 185 | Default test (1 class) 186 |
  • 187 |
188 |
189 |
190 |
191 |
192 | Groups for Default suite 193 |
194 |
195 |
196 |
197 |
198 |
199 | Times for Default suite 200 |
201 |
202 |
203 | 228 | Total running time: 24 seconds 229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 | Reporter output for Default suite 237 |
238 |
239 |
240 |
241 |
242 |
243 | 0 ignored methods 244 |
245 |
246 |
247 |
248 |
249 |
250 | Methods in chronological order 251 |
252 |
253 |
254 |
com.xylem.qa.testcases.XylemSmokeTest
255 |
256 | setUp 257 | 0 ms 258 |
259 |
260 | loginTest 261 | 14628 ms 262 |
263 |
264 | pumpSearchTest 265 | 34695 ms 266 |
267 |
268 | languageListTest 269 | 38375 ms 270 |
271 |
272 | tearDown 273 | 39103 ms 274 |
275 |
276 |
277 |
278 |
279 | 280 | 281 | -------------------------------------------------------------------------------- /test-output/Extent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ExtentReports 2.0 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | 64 | 65 | 66 | 67 |
68 | 69 | 70 |
71 |
72 |
73 |
74 | Total Tests 75 | 76 |
77 |
78 |
79 |
80 | Total Steps 81 | 82 |
83 |
84 |
85 |
86 | Total Time Taken (Current Run) 87 | 0h 3m 15s+135ms 88 |
89 |
90 |
91 |
92 | Total Time Taken (Overall) 93 | 0h 3m 15s+135ms 94 |
95 |
96 |
97 |
98 | Start 99 | 2017-10-13 23:50:03 100 |
101 |
102 |
103 |
104 | End 105 | 2017-10-13 23:53:18 106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | Tests View 114 |
115 | 118 |
119 | 120 |
121 |
122 | test(s) passed 123 |
124 |
125 | test(s) failed, others 126 |
127 |
128 |
129 |
130 |
131 |
132 | Steps View 133 |
134 | 137 |
138 | 139 |
140 |
141 | step(s) passed 142 |
143 |
144 | step(s) failed, others 145 |
146 |
147 |
148 |
149 |
150 | Pass Percentage 151 | 152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 | Environment 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 |
ParamValue
User Namenaveenkhunteta
OSMac OS X
Java Version1.8.0_121
Host NameNaveens-MacBook-Air.local
188 |
189 |
190 |
191 |
192 | 193 | 194 | 195 |
196 |
197 |
198 |
199 |
Tests
200 |
201 |
202 |
203 | 204 | 205 | 206 | 213 |
214 |
215 | 216 | 217 | 218 |
219 |
220 | 221 | 222 | 223 |
224 |
225 | 226 | 227 | 228 |
229 | 237 |
238 |
239 |
240 |
    241 |
  • 242 |
    243 | verifyContactsLinkTest 244 | pass 245 | 246 |
    247 |
    248 |
    249 | 2017-10-13 23:51:39 250 | 2017-10-13 23:51:41 251 | 0h 0m 1s+809ms 252 |
    253 |
    254 |
    255 |
    256 |
    257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 |
    StatusTimestampDetails
    23:51:41Test passed
    273 |
      274 |
    275 |
    276 |
    277 |
  • 278 |
  • 279 |
    280 | verifyContactsPageLabel 281 | pass 282 | 283 |
    284 |
    285 |
    286 | 2017-10-13 23:50:28 287 | 2017-10-13 23:50:28 288 | 0h 0m 0s+171ms 289 |
    290 |
    291 |
    292 |
    293 |
    294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 |
    StatusTimestampDetails
    23:50:28Test passed
    310 |
      311 |
    312 |
    313 |
    314 |
  • 315 |
  • 316 |
    317 | verifyUserNameTest 318 | pass 319 | 320 |
    321 |
    322 |
    323 | 2017-10-13 23:50:44 324 | 2017-10-13 23:50:45 325 | 0h 0m 0s+725ms 326 |
    327 |
    328 |
    329 |
    330 |
    331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 |
    StatusTimestampDetails
    23:50:45Test passed
    347 |
      348 |
    349 |
    350 |
    351 |
  • 352 |
  • 353 |
    354 | verifyHomePageTitleTest 355 | pass 356 | 357 |
    358 |
    359 |
    360 | 2017-10-13 23:50:16 361 | 2017-10-13 23:50:16 362 | 0h 0m 0s+100ms 363 |
    364 |
    365 |
    366 |
    367 |
    368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 |
    StatusTimestampDetails
    23:50:16Test passed
    384 |
      385 |
    386 |
    387 |
    388 |
  • 389 |
  • 390 |
    391 | crmLogoImageTest 392 | pass 393 | 394 |
    395 |
    396 |
    397 | 2017-10-13 23:50:33 398 | 2017-10-13 23:50:33 399 | 0h 0m 0s+67ms 400 |
    401 |
    402 |
    403 |
    404 |
    405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 |
    StatusTimestampDetails
    23:50:33Test passed
    421 |
      422 |
    423 |
    424 |
    425 |
  • 426 |
  • 427 |
    428 | validateCreateNewContact 429 | pass 430 | 431 |
    432 |
    433 |
    434 | 2017-10-13 23:53:02 435 | 2017-10-13 23:53:07 436 | 0h 0m 4s+686ms 437 |
    438 |
    439 |
    440 |
    441 |
    442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 |
    StatusTimestampDetails
    23:53:07Test passed
    458 |
      459 |
    460 |
    461 |
    462 |
  • 463 |
  • 464 |
    465 | validateCreateNewContact 466 | pass 467 | 468 |
    469 |
    470 |
    471 | 2017-10-13 23:52:46 472 | 2017-10-13 23:52:52 473 | 0h 0m 5s+257ms 474 |
    475 |
    476 |
    477 |
    478 |
    479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 |
    StatusTimestampDetails
    23:52:52Test passed
    495 |
      496 |
    497 |
    498 |
    499 |
  • 500 |
  • 501 |
    502 | loginPageTitleTest 503 | pass 504 | 505 |
    506 |
    507 |
    508 | 2017-10-13 23:50:03 509 | 2017-10-13 23:50:03 510 | 0h 0m 0s+61ms 511 |
    512 |
    513 |
    514 |
    515 |
    516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 |
    StatusTimestampDetails
    23:50:03Test passed
    532 |
      533 |
    534 |
    535 |
    536 |
  • 537 |
  • 538 |
    539 | validateCreateNewContact 540 | pass 541 | 542 |
    543 |
    544 |
    545 | 2017-10-13 23:52:27 546 | 2017-10-13 23:52:33 547 | 0h 0m 5s+197ms 548 |
    549 |
    550 |
    551 |
    552 |
    553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 |
    StatusTimestampDetails
    23:52:33Test passed
    569 |
      570 |
    571 |
    572 |
    573 |
  • 574 |
  • 575 |
    576 | loginTest 577 | pass 578 | 579 |
    580 |
    581 |
    582 | 2017-10-13 23:51:21 583 | 2017-10-13 23:51:25 584 | 0h 0m 4s+259ms 585 |
    586 |
    587 |
    588 |
    589 |
    590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 |
    StatusTimestampDetails
    23:51:25Test passed
    606 |
      607 |
    608 |
    609 |
    610 |
  • 611 |
  • 612 |
    613 | selectSingleContactsTest 614 | fail 615 | 616 |
    617 |
    618 |
    619 | 2017-10-13 23:50:56 620 | 2017-10-13 23:51:16 621 | 0h 0m 20s+631ms 622 |
    623 |
    624 |
    625 |
    626 |
    627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 700 | 701 | 702 |
    StatusTimestampDetails
    23:51:16
    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']"}
     640 |   (Session info: chrome=61.0.3163.100)
     641 |   (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)
     642 | Command duration or timeout: 0 milliseconds
     643 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
     644 | Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
     645 | System info: host: 'Naveens-MacBook-Air.local', ip: 'fe80:0:0:0:828:e267:315b:c8a4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
     646 | Driver info: org.openqa.selenium.chrome.ChromeDriver
     647 | Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=MAC, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b), userDataDir=/var/folders/0w/z084sy393n7798ssctmpjhq00000gn/T/.org.chromium.Chromium.XRZTbU}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=61.0.3163.100, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
     648 | Session ID: fec53fe7539628c2a413fac2aed277ff
     649 | *** Element info: {Using=xpath, value=//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']}
     650 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     651 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     652 | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     653 | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
     654 | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
     655 | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
     656 | 	at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
     657 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
     658 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
     659 | 	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
     660 | 	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
     661 | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
     662 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:416)
     663 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:518)
     664 | 	at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
     665 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:408)
     666 | 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     667 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     668 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     669 | 	at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:105)
     670 | 	at com.sun.proxy.$Proxy8.findElement(Unknown Source)
     671 | 	at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:189)
     672 | 	at com.crm.qa.pages.ContactsPage.selectContactsByName(ContactsPage.java:42)
     673 | 	at com.crm.qa.testcases.ContactsPageTest.selectSingleContactsTest(ContactsPageTest.java:58)
     674 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     675 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     676 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     677 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     678 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
     679 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
     680 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
     681 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
     682 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
     683 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
     684 | 	at org.testng.TestRunner.privateRun(TestRunner.java:744)
     685 | 	at org.testng.TestRunner.run(TestRunner.java:602)
     686 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
     687 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
     688 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
     689 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
     690 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     691 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     692 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
     693 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
     694 | 	at org.testng.TestNG.runSuites(TestNG.java:1144)
     695 | 	at org.testng.TestNG.run(TestNG.java:1115)
     696 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
     697 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
     698 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
     699 | 
    703 |
      704 |
    705 |
    706 |
    707 |
  • 708 |
  • 709 |
    710 | selectMultipleContactsTest 711 | fail 712 | 713 |
    714 |
    715 |
    716 | 2017-10-13 23:51:52 717 | 2017-10-13 23:52:12 718 | 0h 0m 20s+481ms 719 |
    720 |
    721 |
    722 |
    723 |
    724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 797 | 798 | 799 |
    StatusTimestampDetails
    23:52:12
    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']"}
     737 |   (Session info: chrome=61.0.3163.100)
     738 |   (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)
     739 | Command duration or timeout: 0 milliseconds
     740 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
     741 | Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
     742 | System info: host: 'Naveens-MacBook-Air.local', ip: 'fe80:0:0:0:828:e267:315b:c8a4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
     743 | Driver info: org.openqa.selenium.chrome.ChromeDriver
     744 | Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=MAC, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b), userDataDir=/var/folders/0w/z084sy393n7798ssctmpjhq00000gn/T/.org.chromium.Chromium.WdyUdq}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=61.0.3163.100, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
     745 | Session ID: d08a002bf183b1fbcc19c132316d1bbf
     746 | *** Element info: {Using=xpath, value=//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']}
     747 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     748 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     749 | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     750 | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
     751 | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
     752 | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
     753 | 	at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
     754 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
     755 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
     756 | 	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
     757 | 	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
     758 | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
     759 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:416)
     760 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:518)
     761 | 	at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
     762 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:408)
     763 | 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     764 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     765 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     766 | 	at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:105)
     767 | 	at com.sun.proxy.$Proxy8.findElement(Unknown Source)
     768 | 	at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:189)
     769 | 	at com.crm.qa.pages.ContactsPage.selectContactsByName(ContactsPage.java:42)
     770 | 	at com.crm.qa.testcases.ContactsPageTest.selectMultipleContactsTest(ContactsPageTest.java:63)
     771 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     772 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     773 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     774 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     775 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
     776 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
     777 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
     778 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
     779 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
     780 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
     781 | 	at org.testng.TestRunner.privateRun(TestRunner.java:744)
     782 | 	at org.testng.TestRunner.run(TestRunner.java:602)
     783 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
     784 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
     785 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
     786 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
     787 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     788 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     789 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
     790 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
     791 | 	at org.testng.TestNG.runSuites(TestNG.java:1144)
     792 | 	at org.testng.TestNG.run(TestNG.java:1115)
     793 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
     794 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
     795 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
     796 | 
    800 |
      801 |
    802 |
    803 |
    804 |
  • 805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 | 831 | 832 | 833 | 834 | 835 | 836 |
837 |
838 |
839 |
840 |
Defects
841 |
842 |
843 | 851 |
852 |
853 |
854 |
    855 |
  • 856 |
    857 | org.openqa.selenium.NoSuchElementException 858 |
    859 |
    860 | 2 861 |
    862 |
    863 |
    864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 937 | 938 | 939 | 940 | 941 | 1002 | 1003 | 1004 |
    RunDateTest NameException
    2017-10-13 23:50:56selectSingleContactsTest
    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']"}
     877 |   (Session info: chrome=61.0.3163.100)
     878 |   (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)
     879 | Command duration or timeout: 0 milliseconds
     880 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
     881 | Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
     882 | System info: host: 'Naveens-MacBook-Air.local', ip: 'fe80:0:0:0:828:e267:315b:c8a4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
     883 | Driver info: org.openqa.selenium.chrome.ChromeDriver
     884 | Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=MAC, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b), userDataDir=/var/folders/0w/z084sy393n7798ssctmpjhq00000gn/T/.org.chromium.Chromium.XRZTbU}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=61.0.3163.100, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
     885 | Session ID: fec53fe7539628c2a413fac2aed277ff
     886 | *** Element info: {Using=xpath, value=//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']}
     887 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     888 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     889 | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     890 | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
     891 | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
     892 | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
     893 | 	at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
     894 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
     895 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
     896 | 	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
     897 | 	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
     898 | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
     899 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:416)
     900 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:518)
     901 | 	at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
     902 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:408)
     903 | 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     904 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     905 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     906 | 	at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:105)
     907 | 	at com.sun.proxy.$Proxy8.findElement(Unknown Source)
     908 | 	at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:189)
     909 | 	at com.crm.qa.pages.ContactsPage.selectContactsByName(ContactsPage.java:42)
     910 | 	at com.crm.qa.testcases.ContactsPageTest.selectSingleContactsTest(ContactsPageTest.java:58)
     911 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     912 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     913 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     914 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     915 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
     916 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
     917 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
     918 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
     919 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
     920 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
     921 | 	at org.testng.TestRunner.privateRun(TestRunner.java:744)
     922 | 	at org.testng.TestRunner.run(TestRunner.java:602)
     923 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
     924 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
     925 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
     926 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
     927 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     928 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     929 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
     930 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
     931 | 	at org.testng.TestNG.runSuites(TestNG.java:1144)
     932 | 	at org.testng.TestNG.run(TestNG.java:1115)
     933 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
     934 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
     935 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
     936 | 
    2017-10-13 23:51:52selectMultipleContactsTest
    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']"}
     942 |   (Session info: chrome=61.0.3163.100)
     943 |   (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)
     944 | Command duration or timeout: 0 milliseconds
     945 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
     946 | Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
     947 | System info: host: 'Naveens-MacBook-Air.local', ip: 'fe80:0:0:0:828:e267:315b:c8a4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
     948 | Driver info: org.openqa.selenium.chrome.ChromeDriver
     949 | Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=MAC, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b), userDataDir=/var/folders/0w/z084sy393n7798ssctmpjhq00000gn/T/.org.chromium.Chromium.WdyUdq}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=61.0.3163.100, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
     950 | Session ID: d08a002bf183b1fbcc19c132316d1bbf
     951 | *** Element info: {Using=xpath, value=//a[text()='test2 test2']//parent::td[@class='datalistrow']//preceding-sibling::td[@class='datalistrow']//input[@name='contact_id']}
     952 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     953 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     954 | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     955 | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
     956 | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
     957 | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
     958 | 	at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
     959 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
     960 | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
     961 | 	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
     962 | 	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
     963 | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
     964 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:416)
     965 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:518)
     966 | 	at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
     967 | 	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:408)
     968 | 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     969 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     970 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     971 | 	at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:105)
     972 | 	at com.sun.proxy.$Proxy8.findElement(Unknown Source)
     973 | 	at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:189)
     974 | 	at com.crm.qa.pages.ContactsPage.selectContactsByName(ContactsPage.java:42)
     975 | 	at com.crm.qa.testcases.ContactsPageTest.selectMultipleContactsTest(ContactsPageTest.java:63)
     976 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     977 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     978 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     979 | 	at java.lang.reflect.Method.invoke(Method.java:498)
     980 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
     981 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
     982 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
     983 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
     984 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
     985 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
     986 | 	at org.testng.TestRunner.privateRun(TestRunner.java:744)
     987 | 	at org.testng.TestRunner.run(TestRunner.java:602)
     988 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
     989 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
     990 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
     991 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
     992 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     993 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     994 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
     995 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
     996 | 	at org.testng.TestNG.runSuites(TestNG.java:1144)
     997 | 	at org.testng.TestNG.run(TestNG.java:1115)
     998 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
     999 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
    1000 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
    1001 | 
    1005 |
    1006 |
    1007 |
  • 1008 |
1009 |
1010 |
1011 |
1012 |
1013 |
1014 |
1015 |
1016 |
1017 |
1018 |
1019 |
1020 |
1021 |
1022 |
1023 | 1024 | 1025 | 1026 | 1027 | 1028 |
1029 | 1030 | 1031 | 1032 | 1048 | 1049 | 1050 | 1051 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1096 | 1097 | 1098 | --------------------------------------------------------------------------------