(); info.put("host name", "Krishna Windows");
93 | * info.put("user name", "Krishna"); info.put("Environment", "QA");
94 | *
95 | * extent.addSystemInfo(info);
96 | *
97 | * }
98 | *
99 | * public void FormatResult() { if (result.getStatus() == ITestResult.FAILURE) {
100 | * extentTest.log(LogStatus.FAIL, "Failed test case is ::" + result.getName());
101 | * extentTest.log(LogStatus.FAIL, "Failed test case is ::" +
102 | * result.getThrowable()); TestUtils.takeScreenShot(driver);
103 | * extentTest.log(LogStatus.FAIL,
104 | * extentTest.addScreenCapture(TestUtils.SCREENSHOT_PATH)); } else if
105 | * (result.getStatus() == ITestResult.SKIP) { extentTest.log(LogStatus.SKIP,
106 | * "Skipped test case is ::" + result.getName()); } else if (result.getStatus()
107 | * == ITestResult.SUCCESS) { extentTest.log(LogStatus.PASS,
108 | * "Passed testc case is ::" + result.getName()); }
109 | *
110 | * extent.endTest(extentTest);
111 | *
112 | * }
113 | */}
114 |
--------------------------------------------------------------------------------
/.svn/pristine/01/01cebaacd36abd8a864cf3eb6c2d9acb4dfba57e.svn-base:
--------------------------------------------------------------------------------
1 | testng.xml for Suite <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<listeners>
<listener class-name="com.crm.qa.reports.ExtentReporterNG"/>
</listeners>
<test name="Testing">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases"/>
<class name="com.crm.qa.testcases.SearchFlightTestCases"/>
</classes>
</test> <!-- Testing -->
</suite> <!-- Suite -->
--------------------------------------------------------------------------------
/.svn/pristine/03/03a15bf1804e6be8c9f0e3c3bfe41221c3985aad.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | TestNG: Testing
4 |
5 |
6 |
7 |
11 |
53 |
54 |
55 |
56 | Testing
57 |
58 | Tests passed/Failed/Skipped: 4/0/0
59 |
60 | Started on: Mon Jun 10 13:00:15 PDT 2019
61 |
62 | Total time: 170 seconds (170450 ms)
63 |
64 | Included groups:
65 |
66 | Excluded groups:
67 |
68 |
69 | (Hover the method name to see the test class name)
70 |
71 | PASSED TESTS
72 | Test method
73 | Exception
74 | Time (seconds)
75 | Instance
76 |
77 |
78 | TC001_CheckifLogoisPresent Test class: com.crm.qa.testcases.FlightTestCases
79 |
80 | 2
81 | com.crm.qa.testcases.FlightTestCases@337d0578
82 |
83 | TC001_VerifyHeaderContent Test class: com.crm.qa.testcases.SearchFlightTestCases
84 |
85 | 0
86 | com.crm.qa.testcases.SearchFlightTestCases@234bef66
87 |
88 | TC002_SearchFligh Test class: com.crm.qa.testcases.SearchFlightTestCases
89 |
90 | 4
91 | com.crm.qa.testcases.SearchFlightTestCases@234bef66
92 |
93 | TC002_SelectFlightOption Test class: com.crm.qa.testcases.FlightTestCases
94 |
95 | 18
96 | com.crm.qa.testcases.FlightTestCases@337d0578
97 |
98 |
99 |
--------------------------------------------------------------------------------
/.svn/pristine/0a/0a1abada9c9752de329084be49964ea17a53f914.svn-base:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.svn/pristine/0a/0a28520625b53b24f12b0905b0576e6fc53c72c2.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/0c/0c27e69814f019f48556247938f6cbcf900a6563.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/0e/0e26bc41dcf0fbb469583770e2cb66c43650c837.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.svn/pristine/0e/0eb3aed9dc6635bc79931fe58eb67d74f6fa4ff6.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.text.DateFormat;
6 | import java.text.SimpleDateFormat;
7 | import java.util.Date;
8 |
9 | import org.apache.commons.io.FileUtils;
10 | import org.openqa.selenium.OutputType;
11 | import org.openqa.selenium.TakesScreenshot;
12 | import org.openqa.selenium.WebDriver;
13 |
14 | public class TestUtils {
15 |
16 | static DateFormat dateFormat;
17 | static Date date;
18 |
19 | public static final long PAGE_LOAD_TIMEOUT = 100;
20 |
21 | public static final long IMPLICIT_WAIT = 10;
22 |
23 | public static final String WORKSAPCE_PATH = "C://Users//Gorya//Desktop//Krishna_study//Workspace//FressCRMAutomation";
24 |
25 | public static final String SCREENSHOT_PATH = WORKSAPCE_PATH + "//Screenshot//";
26 |
27 | public static final String DateFormat = "yyyyMMddHH:mm:ss";
28 |
29 | public static String getDate(String format) {
30 | dateFormat = new SimpleDateFormat(format);
31 | date = new Date();
32 | return dateFormat.format(date);
33 | }
34 |
35 | public static void takeScreenShot(WebDriver driver) {
36 | File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
37 | try {
38 | FileUtils.copyFile(src, new File(SCREENSHOT_PATH + "//screenshot//" + getDate(DateFormat) + ".png"));
39 | } catch (IOException e) {
40 | // TODO Auto-generated catch block
41 | e.printStackTrace();
42 | }
43 |
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/.svn/pristine/11/1147f56c1679abefbadbddc4b0fff43a77efd35d.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/11/1147f56c1679abefbadbddc4b0fff43a77efd35d.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/11/11a400ca996d8a1a6aabb47fe70fcda4381bf649.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.reports;
2 |
3 | import java.io.File;
4 | import java.util.Calendar;
5 | import java.util.Date;
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | import org.testng.IReporter;
10 | import org.testng.IResultMap;
11 | import org.testng.ISuite;
12 | import org.testng.ISuiteResult;
13 | import org.testng.ITestContext;
14 | import org.testng.ITestResult;
15 | import org.testng.xml.XmlSuite;
16 |
17 | import com.relevantcodes.extentreports.ExtentReports;
18 | import com.relevantcodes.extentreports.ExtentTest;
19 | import com.relevantcodes.extentreports.LogStatus;
20 |
21 | public class ExtentReporterNG implements IReporter {
22 | private ExtentReports extent;
23 |
24 | public void generateReport(List xmlSuites, List suites,
25 | String outputDirectory) {
26 | extent = new ExtentReports(outputDirectory + File.separator
27 | + "Extent.html", true);
28 |
29 | for (ISuite suite : suites) {
30 | Map result = suite.getResults();
31 |
32 | for (ISuiteResult r : result.values()) {
33 | ITestContext context = r.getTestContext();
34 |
35 | buildTestNodes(context.getPassedTests(), LogStatus.PASS);
36 | buildTestNodes(context.getFailedTests(), LogStatus.FAIL);
37 | buildTestNodes(context.getSkippedTests(), LogStatus.SKIP);
38 | }
39 | }
40 |
41 | extent.flush();
42 | extent.close();
43 | }
44 |
45 | private void buildTestNodes(IResultMap tests, LogStatus status) {
46 | ExtentTest test;
47 |
48 | if (tests.size() > 0) {
49 | for (ITestResult result : tests.getAllResults()) {
50 | test = extent.startTest(result.getMethod().getMethodName());
51 |
52 | test.setStartedTime(getTime(result.getStartMillis()));
53 | test.setEndedTime(getTime(result.getEndMillis()));
54 |
55 | for (String group : result.getMethod().getGroups())
56 | test.assignCategory(group);
57 |
58 | if (result.getThrowable() != null) {
59 | test.log(status, result.getThrowable());
60 | } else {
61 | test.log(status, "Test " + status.toString().toLowerCase()
62 | + "ed");
63 | }
64 |
65 | extent.endTest(test);
66 | }
67 | }
68 | }
69 |
70 | private Date getTime(long millis) {
71 | Calendar calendar = Calendar.getInstance();
72 | calendar.setTimeInMillis(millis);
73 | return calendar.getTime();
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/.svn/pristine/12/12326edffc61f0cd45a749466896ffde8ec7d064.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/13/13cf4db2bf920b2c33cc0ba8cd1213a470ebcdef.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Default suite
4 |
5 |
6 |
7 |
8 | Results forDefault suite
9 |
23 |
24 |
25 | Default test (2/0/0)
26 | Results
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/.svn/pristine/14/14910e62a231e87f24875105ddeb3ae8b139ac14.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.svn/pristine/16/1687fc316b973de76feca3384e68c22fb02bf123.svn-base:
--------------------------------------------------------------------------------
1 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\test\java\com\crm\qa\testcases\FlightTestCases.java
2 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\test\java\com\crm\qa\testcases\SearchFlightTestCases.java
3 |
--------------------------------------------------------------------------------
/.svn/pristine/16/16bba5fcf708c35d554d47bbfc48e8a82d7354ae.svn-base:
--------------------------------------------------------------------------------
1 | [SuiteResult context=Default test]
--------------------------------------------------------------------------------
/.svn/pristine/20/208294fb3aebccdb558a64d5b66f003908d8022a.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/20/208294fb3aebccdb558a64d5b66f003908d8022a.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/21/2155155daea8ac72b77afad8fadd40bc53eb3429.svn-base:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | log4j.rootCategoryr=debug, console, file
3 |
4 | # Direct log messages to a log file
5 | log4j.appender.file=org.apache.log4j.RollingFileAppender
6 | log4j.appender.file.File= System.log
7 | log4j.appender.file.MaxFileSize=10MB
8 | log4j.appender.file.MaxBackupIndex=10
9 | log4j.appender.file.layout=org.apache.log4j.PatternLayout
10 | log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
11 | log4j.appender.file.Append = true
12 |
13 | # Direct log messages to console
14 | log4j.appender.console=org.apache.log4j.ConsoleAppender
15 | log4j.appender.console.layout=org.apache.log4j.PatternLayout
16 | log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
--------------------------------------------------------------------------------
/.svn/pristine/26/2660ab73c9b1acadec6f9e85a97472031c30eced.svn-base:
--------------------------------------------------------------------------------
1 | testng.xml for Default suite <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default suite">
<test verbose="2" name="Default test">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases"/>
</classes>
</test> <!-- Default test -->
</suite> <!-- Default suite -->
--------------------------------------------------------------------------------
/.svn/pristine/28/28c7c3e82015d8cbf3533f2e100703c2f82c4326.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/12 09:32:34 0 TC001_CheckifLogoisPresent
5 | main@267760927
6 | 19/06/12 09:33:02 28040 TC001_VerifyHeaderContent
7 | main@267760927
8 | 19/06/12 09:33:02 28055 TC002_SearchFligh
9 | main@267760927
10 | 19/06/12 09:32:44 10223 TC002_SelectFlightOption
11 | main@267760927
12 | 19/06/12 09:32:29 -5056 >>setUp
13 | main@267760927
14 | 19/06/12 09:32:44 10238 >>setUp
15 | main@267760927
16 | 19/06/12 09:32:44 10207 <<tearDown
17 | main@267760927
18 |
19 |
--------------------------------------------------------------------------------
/.svn/pristine/2e/2e3e2c3e36dbba5b467d01c036e3b65efcb865b9.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.text.DateFormat;
6 | import java.text.SimpleDateFormat;
7 | import java.util.Date;
8 |
9 | import org.apache.commons.io.FileUtils;
10 | import org.openqa.selenium.OutputType;
11 | import org.openqa.selenium.TakesScreenshot;
12 | import org.openqa.selenium.WebDriver;
13 |
14 | public class TestUtils {
15 |
16 | static DateFormat dateFormat;
17 | static Date date;
18 |
19 | public static final long PAGE_LOAD_TIMEOUT = 50;
20 |
21 | public static final long IMPLICIT_WAIT = 10;
22 |
23 | public static final String SCREENSHOT_PATH = "C://Users//Gorya//Desktop//Krishna_study//Workspace//FressCRMAutomation//";
24 |
25 | public static final String DateFormat ="yyyyMMddHH:mm:ss";
26 |
27 | public static String getDate(String format) {
28 | dateFormat = new SimpleDateFormat(format);
29 | date = new Date();
30 | return dateFormat.format(date);
31 | }
32 |
33 | public static void takeScreenShot(WebDriver driver) {
34 | File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
35 | try {
36 | FileUtils.copyFile(src, new File(SCREENSHOT_PATH + "//screenshot//" +getDate(DateFormat)+".png"));
37 | } catch (IOException e) {
38 | // TODO Auto-generated catch block
39 | e.printStackTrace();
40 | }
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/.svn/pristine/2f/2f4b484f1db90d2a69a7a2f936f261630de07615.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/12 09:32:29 0 >>setUp
5 | main@267760927
6 | 19/06/12 09:32:34 5056 TC001_CheckifLogoisPresent
7 | main@267760927
8 | 19/06/12 09:32:44 15263 <<tearDown
9 | main@267760927
10 | 19/06/12 09:32:44 15279 TC002_SelectFlightOption
11 | main@267760927
12 | 19/06/12 09:32:44 15294 >>setUp
13 | main@267760927
14 | 19/06/12 09:33:02 33096 TC001_VerifyHeaderContent
15 | main@267760927
16 | 19/06/12 09:33:02 33111 TC002_SearchFligh
17 | main@267760927
18 |
19 |
--------------------------------------------------------------------------------
/.svn/pristine/36/36fe68fdbd27cb6975a784cc786e9a225d9e48c9.svn-base:
--------------------------------------------------------------------------------
1 | [SuiteResult context=Testing]
--------------------------------------------------------------------------------
/.svn/pristine/38/38003efc7603aa035b062088a1892895a3c01dc4.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/12 10:03:27 0 TC001_CheckifLogoisPresent
5 | main@1824835605
6 | 19/06/12 10:04:11 43987 TC001_VerifyHeaderContent
7 | main@1824835605
8 | 19/06/12 10:04:11 43995 TC002_SearchFligh
9 | main@1824835605
10 | 19/06/12 10:03:43 16134 TC002_SelectFlightOption
11 | main@1824835605
12 | 19/06/12 10:02:43 -43396 >>setUp
13 | main@1824835605
14 | 19/06/12 10:03:35 8281 >>setUp
15 | main@1824835605
16 | 19/06/12 10:03:59 32683 >>setUp
17 | main@1824835605
18 | 19/06/12 10:03:28 1177 <<tearDown
19 | main@1824835605
20 | 19/06/12 10:03:55 28540 <<tearDown
21 | main@1824835605
22 |
23 |
--------------------------------------------------------------------------------
/.svn/pristine/38/38910b67a252543fa516144e0174e1dfafae6fce.svn-base:
--------------------------------------------------------------------------------
1 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\utilities\SeleniumActions.java
2 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\pages\FlightResultPage.java
3 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\base\TestBase.java
4 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\utilities\WebDriverListener.java
5 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\pages\SearchHotelPage.java
6 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\utilities\TestUtils.java
7 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\pages\SearchFlightsPage.java
8 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\reports\ExtentReporterNG.java
9 | C:\Users\Gorya\Desktop\Krishna_study\Workspace\FressCRMAutomation\src\main\java\com\crm\qa\pages\HomePage.java
10 |
--------------------------------------------------------------------------------
/.svn/pristine/39/3952abf272488e2121784aa892b6a28c3bfcaafd.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TestNG: Unit Test
5 |
30 |
31 |
32 |
33 | Test Methods Passed Scenarios Passed # skipped # failed Total Time Included Groups Excluded Groups
34 | Testing 4 4 0 0 170.4 seconds
35 |
36 |
43 | Testing
44 | com.crm.qa.testcases.FlightTestCases:TC001_CheckifLogoisPresent
45 | back to summary
46 | com.crm.qa.testcases.FlightTestCases:TC002_SelectFlightOption
47 | back to summary
48 | com.crm.qa.testcases.SearchFlightTestCases:TC002_SearchFligh
49 | back to summary
50 | com.crm.qa.testcases.SearchFlightTestCases:TC001_VerifyHeaderContent
51 | back to summary
52 |
53 |
--------------------------------------------------------------------------------
/.svn/pristine/43/43bfd218311ec4c2917df4dd2b5c98a8ee0327f5.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import org.openqa.selenium.WebElement;
4 | import org.openqa.selenium.support.ui.Select;
5 |
6 | import com.crm.qa.base.TestBase;
7 |
8 | public class SeleniumActions extends TestBase {
9 |
10 | public void selectbyText(WebElement element, String text) {
11 | Select select = new Select(element);
12 | select.selectByVisibleText(text);
13 | }
14 |
15 | public void selectbyValue(WebElement element, String value) {
16 | Select select = new Select(element);
17 | select.selectByValue(value);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/.svn/pristine/47/47ae433892e1db0a3394b4a2bef4e1cd4555cfd4.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/47/47ae433892e1db0a3394b4a2bef4e1cd4555cfd4.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/4a/4a0c0647434e9cb4caf5d47b0081e252d3a40834.svn-base:
--------------------------------------------------------------------------------
1 |
2 | Test results
3 |
4 |
5 | Test results
6 | Suite Passed Failed Skipped testng.xml
7 | Total 0 1 3
8 | Suite
9 | 0 1 3 Link
10 |
--------------------------------------------------------------------------------
/.svn/pristine/4a/4ae2ca0746375fa0578c2ff7f9f3eb930416c72f.svn-base:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.svn/pristine/4b/4be5eabd8aef20d0b1aed822ee18ba07d7d5aa6e.svn-base:
--------------------------------------------------------------------------------
1 | -------------------------------------------------------------------------------
2 | Test set: TestSuite
3 | -------------------------------------------------------------------------------
4 | Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 176.218 s - in TestSuite
5 |
--------------------------------------------------------------------------------
/.svn/pristine/4f/4f7d7e103ab2671c0c91170324b86a8d69eb993e.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/4f/4f7d7e103ab2671c0c91170324b86a8d69eb993e.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/51/517c42fe0399f93923a1cc78f6589acaf20e32f3.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | TestNG: Testing
4 |
5 |
6 |
7 |
11 |
53 |
54 |
55 |
56 | Testing
57 |
58 | Tests passed/Failed/Skipped: 4/0/0
59 |
60 | Started on: Mon Jun 10 04:51:08 PDT 2019
61 |
62 | Total time: 197 seconds (197010 ms)
63 |
64 | Included groups:
65 |
66 | Excluded groups:
67 |
68 |
69 | (Hover the method name to see the test class name)
70 |
71 | PASSED TESTS
72 | Test method
73 | Exception
74 | Time (seconds)
75 | Instance
76 |
77 |
78 | TC001_CheckifLogoisPresent Test class: com.crm.qa.testcases.FlightTestCases
79 |
80 | 0
81 | com.crm.qa.testcases.FlightTestCases@3532ec19
82 |
83 | TC001_VerifyHeaderContent Test class: com.crm.qa.testcases.SearchFlightTestCases
84 |
85 | 0
86 | com.crm.qa.testcases.SearchFlightTestCases@5c3bd550
87 |
88 | TC002_SearchFligh Test class: com.crm.qa.testcases.SearchFlightTestCases
89 |
90 | 4
91 | com.crm.qa.testcases.SearchFlightTestCases@5c3bd550
92 |
93 | TC002_SelectFlightOption Test class: com.crm.qa.testcases.FlightTestCases
94 |
95 | 17
96 | com.crm.qa.testcases.FlightTestCases@3532ec19
97 |
98 |
99 |
--------------------------------------------------------------------------------
/.svn/pristine/58/58dac5b9022ae1e48fa9951ab391c6c37c612988.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.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 |
8 | import com.crm.qa.base.TestBase;
9 |
10 | public class HomePage extends TestBase {
11 |
12 | public HomePage() {
13 | PageFactory.initElements(driver, this);
14 | }
15 |
16 | @FindBy(className = "cleartripLogo")
17 | WebElement logo;
18 |
19 | @FindBy(xpath = "//ul[contains(@class,'navGroup')]//li[@class='flightApp']")
20 | WebElement flightOption;
21 |
22 | @FindBy(className = "hotelApp")
23 | WebElement hotelOption;
24 |
25 | @FindBy(className = "trainsApp")
26 | @CacheLookup
27 | WebElement TrainOption;
28 |
29 | public boolean isLogoDisplayed() {
30 | return logo.isDisplayed();
31 | }
32 |
33 | public SearchFlightsPage selectFlightOption() {
34 | if (flightOption.isEnabled()) {
35 | flightOption.click();
36 | }
37 | return new SearchFlightsPage();
38 | }
39 |
40 | public SearchHotelPage selecthotelOption() {
41 | hotelOption.click();
42 | ;
43 | return new SearchHotelPage();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/.svn/pristine/59/590674350224ec4e08ec8ec8ef9440f713a0b804.svn-base:
--------------------------------------------------------------------------------
1 | #Generated by Maven
2 | #Mon Jun 10 13:03:29 PDT 2019
3 | version=0.0.1-SNAPSHOT
4 | groupId=FreeCRMautomation
5 | artifactId=FressCRMAutomation
6 |
--------------------------------------------------------------------------------
/.svn/pristine/59/59e10ca0b5b9a42d5d2fe0a4330be3263f7f8d80.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TestNG: Unit Test
5 |
30 |
31 |
32 |
33 | Test Methods Passed Scenarios Passed # skipped # failed Total Time Included Groups Excluded Groups
34 | Testing 4 4 0 0 197.0 seconds
35 |
36 |
42 | Testing
43 | com.crm.qa.testcases.FlightTestCases:TC002_SelectFlightOption
44 | back to summary
45 | com.crm.qa.testcases.FlightTestCases:TC001_CheckifLogoisPresent
46 | back to summary
47 | com.crm.qa.testcases.SearchFlightTestCases:TC002_SearchFligh
48 | back to summary
49 | com.crm.qa.testcases.SearchFlightTestCases:TC001_VerifyHeaderContent
50 | back to summary
51 |
52 |
--------------------------------------------------------------------------------
/.svn/pristine/5d/5dea91e95c371075d4886e9d7fab58f1be8097c1.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Default suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/07 01:10:06 0 >>setUp
5 | main@1458540918
6 | 19/06/07 01:10:25 19041 TC001_CheckifLogoisPresent
7 | main@1458540918
8 | 19/06/07 01:10:25 19293 <<tearDown
9 | main@1458540918
10 | 19/06/07 01:10:29 23387 >>setUp
11 | main@1458540918
12 | 19/06/07 01:11:04 58153 TC002_SelectFlightOption
13 | main@1458540918
14 | 19/06/07 01:11:22 75575 <<tearDown
15 | main@1458540918
16 |
17 |
--------------------------------------------------------------------------------
/.svn/pristine/5e/5e10f71756f65460be4d97fa6774266952dd35be.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.svn/pristine/5f/5f64989021923f68ebfa23a56012d4d7d8c47786.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/5f/5f64989021923f68ebfa23a56012d4d7d8c47786.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/68/68f19c34e5b09f2dfef8af4a967dc2a042073299.svn-base:
--------------------------------------------------------------------------------
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 | // Keep the navigator div always visible
38 | var $scrollingDiv = $(".navigator-root");
39 | $(window).scroll(function() {
40 | $scrollingDiv.css('height', $(window).height() - 65);
41 | $scrollingDiv.stop()
42 | .animate({"marginTop": ($(window).scrollTop() + 60) + "px"} );
43 | });
44 | });
45 |
46 | // The handlers that take care of showing/hiding the methods
47 | function installMethodHandlers(name, hide) {
48 | function getContent(t) {
49 | return $('.method-list-content.' + name + "." + t.attr('panel-name'));
50 | }
51 |
52 | function getHideLink(t, name) {
53 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name');
54 | return $(s);
55 | }
56 |
57 | function getShowLink(t, name) {
58 | return $('a.show-methods.' + name + "." + t.attr('panel-name'));
59 | }
60 |
61 | function getMethodPanelClassSel(element, name) {
62 | var panelName = getPanelName(element);
63 | var sel = '.' + panelName + "-class-" + name;
64 | return $(sel);
65 | }
66 |
67 | $('a.hide-methods.' + name).click(function() {
68 | var w = getContent($(this));
69 | w.hide();
70 | getHideLink($(this), name).hide();
71 | getShowLink($(this), name).show();
72 | getMethodPanelClassSel($(this), name).hide();
73 | });
74 |
75 | $('a.show-methods.' + name).click(function() {
76 | var w = getContent($(this));
77 | w.show();
78 | getHideLink($(this), name).show();
79 | getShowLink($(this), name).hide();
80 | showPanel(getPanelName($(this)));
81 | getMethodPanelClassSel($(this), name).show();
82 | });
83 |
84 | if (hide) {
85 | $('a.hide-methods.' + name).click();
86 | } else {
87 | $('a.show-methods.' + name).click();
88 | }
89 | }
90 |
91 | function getHashForMethod(element) {
92 | return element.attr('hash-for-method');
93 | }
94 |
95 | function getPanelName(element) {
96 | return element.attr('panel-name');
97 | }
98 |
99 | function showPanel(panelName) {
100 | $('.panel').hide();
101 | var panel = $('.panel[panel-name="' + panelName + '"]');
102 | panel.show();
103 | }
104 |
105 | function showMethod(element) {
106 | var hashTag = getHashForMethod(element);
107 | var panelName = getPanelName(element);
108 | showPanel(panelName);
109 | var current = document.location.href;
110 | var base = current.substring(0, current.indexOf('#'))
111 | document.location.href = base + '#' + hashTag;
112 | var newPosition = $(document).scrollTop() - 65;
113 | $(document).scrollTop(newPosition);
114 | }
115 |
116 | function drawTable() {
117 | for (var i = 0; i < suiteTableInitFunctions.length; i++) {
118 | window[suiteTableInitFunctions[i]]();
119 | }
120 |
121 | for (var k in window.suiteTableData) {
122 | var v = window.suiteTableData[k];
123 | var div = v.tableDiv;
124 | var data = v.tableData
125 | var table = new google.visualization.Table(document.getElementById(div));
126 | table.draw(data, {
127 | showRowNumber : false
128 | });
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/.svn/pristine/6a/6a7f35c37b37d2613228b2f2541eaf71f3c194f3.svn-base:
--------------------------------------------------------------------------------
1 | com\crm\qa\testcases\FlightTestCases.class
2 | com\crm\qa\testcases\SearchFlightTestCases.class
3 |
--------------------------------------------------------------------------------
/.svn/pristine/6d/6d0a25c8a32f3f8548a726d4d3c0ddf520e607a4.svn-base:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.svn/pristine/6d/6d58fb02359a92cbe8dc0857ed0f66ba695431ec.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/6d/6d58fb02359a92cbe8dc0857ed0f66ba695431ec.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/6e/6ec5a78538d801ac681e165c75d166c5b08f7505.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/6e/6ec5a78538d801ac681e165c75d166c5b08f7505.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/6f/6f87ff7083ea631dc3fef0ab265d024042733e10.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.text.DateFormat;
6 | import java.text.SimpleDateFormat;
7 | import java.util.Date;
8 |
9 | import org.apache.commons.io.FileUtils;
10 | import org.openqa.selenium.OutputType;
11 | import org.openqa.selenium.TakesScreenshot;
12 | import org.openqa.selenium.WebDriver;
13 |
14 | public class TestUtils {
15 |
16 | static DateFormat dateFormat;
17 | static Date date;
18 |
19 | public static final long PAGE_LOAD_TIMEOUT = 100;
20 |
21 | public static final long IMPLICIT_WAIT = 10;
22 |
23 | public static final String SCREENSHOT_PATH = "C://Users//Gorya//Desktop//Krishna_study//Workspace//FressCRMAutomation//";
24 |
25 | public static final String DateFormat ="yyyyMMddHH:mm:ss";
26 |
27 | public static String getDate(String format) {
28 | dateFormat = new SimpleDateFormat(format);
29 | date = new Date();
30 | return dateFormat.format(date);
31 | }
32 |
33 | public static void takeScreenShot(WebDriver driver) {
34 | File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
35 | try {
36 | FileUtils.copyFile(src, new File(SCREENSHOT_PATH + "//screenshot//" +getDate(DateFormat)+".png"));
37 | } catch (IOException e) {
38 | // TODO Auto-generated catch block
39 | e.printStackTrace();
40 | }
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/.svn/pristine/70/7041b2c905f343718617d938c6d4f8bd7b314dc3.svn-base:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.svn/pristine/72/72fb69a12901c1d0ee693146cbd82b7895071cd5.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Default suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/07 01:10:25 0 TC001_CheckifLogoisPresent
5 | main@1458540918
6 | 19/06/07 01:11:04 39112 TC002_SelectFlightOption
7 | main@1458540918
8 | 19/06/07 01:10:06 -19041 >>setUp
9 | main@1458540918
10 | 19/06/07 01:10:29 4346 >>setUp
11 | main@1458540918
12 | 19/06/07 01:10:25 252 <<tearDown
13 | main@1458540918
14 | 19/06/07 01:11:22 56534 <<tearDown
15 | main@1458540918
16 |
17 |
--------------------------------------------------------------------------------
/.svn/pristine/76/760c8bf4f791e2600b6444c446725d9d09d98b82.svn-base:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.svn/pristine/77/77ef267841950f460a6f03eba0a309e4841530ac.svn-base:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
13 | org.eclipse.jdt.core.compiler.release=disabled
14 | org.eclipse.jdt.core.compiler.source=1.6
15 |
--------------------------------------------------------------------------------
/.svn/pristine/77/77fb84779a2b74653f9bf12a3488b687aa5cbf1e.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/77/77fb84779a2b74653f9bf12a3488b687aa5cbf1e.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/78/7882df3901b94f9f694e2e930f2dfadb4b31eafb.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/78/7882df3901b94f9f694e2e930f2dfadb4b31eafb.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/7b/7bf35c6360f86223e69bdbb5e003fd30970850de.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.pages;
2 |
3 | public class SearchHotelPage {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/.svn/pristine/80/804af304ec94cd49ba037b15ae026f5c23f8c96e.svn-base:
--------------------------------------------------------------------------------
1 | 2019-06-07 01:04:15 DEBUG cache:45 - Couldn't find template in cache for "Extent.ftl"("en_IN", UTF-8, parsed); will try to load it.
2 | 2019-06-07 01:04:15 DEBUG cache:45 - TemplateLoader.findTemplateSource("Extent_en_IN.ftl"): Not found
3 | 2019-06-07 01:04:15 DEBUG cache:45 - TemplateLoader.findTemplateSource("Extent_en.ftl"): Not found
4 | 2019-06-07 01:04:15 DEBUG cache:45 - TemplateLoader.findTemplateSource("Extent.ftl"): Found
5 | 2019-06-07 01:04:15 DEBUG cache:45 - Loading template for "Extent.ftl"("en_IN", UTF-8, parsed) from "jar:file:/C:/Users/Gorya/.m2/repository/com/relevantcodes/extentreports/2.41.2/extentreports-2.41.2.jar!/com/relevantcodes/extentreports/view/Extent.ftl"
6 | 2019-06-07 01:04:16 DEBUG cache:45 - Couldn't find template in cache for "Extent.ftl"("en_IN", UTF-8, parsed); will try to load it.
7 | 2019-06-07 01:04:16 DEBUG cache:45 - TemplateLoader.findTemplateSource("Extent_en_IN.ftl"): Not found
8 | 2019-06-07 01:04:16 DEBUG cache:45 - TemplateLoader.findTemplateSource("Extent_en.ftl"): Not found
9 | 2019-06-07 01:04:16 DEBUG cache:45 - TemplateLoader.findTemplateSource("Extent.ftl"): Found
10 | 2019-06-07 01:04:16 DEBUG cache:45 - Loading template for "Extent.ftl"("en_IN", UTF-8, parsed) from "jar:file:/C:/Users/Gorya/.m2/repository/com/relevantcodes/extentreports/2.41.2/extentreports-2.41.2.jar!/com/relevantcodes/extentreports/view/Extent.ftl"
11 |
--------------------------------------------------------------------------------
/.svn/pristine/80/80f15f3442530eb94185e13c919ac6b00ec2e2de.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.testcases;
2 |
3 | import org.testng.Assert;
4 | import org.testng.annotations.AfterMethod;
5 | import org.testng.annotations.BeforeMethod;
6 | import org.testng.annotations.Test;
7 |
8 | import com.crm.qa.base.TestBase;
9 | import com.crm.qa.pages.FlightResultPage;
10 | import com.crm.qa.pages.HomePage;
11 | import com.crm.qa.pages.SearchFlightsPage;
12 |
13 | public class SearchFlightTestCases extends TestBase {
14 |
15 | SearchFlightsPage searchFlightsPage;
16 | HomePage homePage;
17 | FlightResultPage flightResultPage;
18 |
19 | public SearchFlightTestCases() {
20 | super();
21 | }
22 |
23 | @BeforeMethod
24 | public void setUp() {
25 | initializaton();
26 | homePage = new HomePage();
27 | searchFlightsPage = homePage.selectFlightOption();
28 | }
29 |
30 | @Test
31 | public void TC001_VerifyHeaderContent() {
32 | Assert.assertEquals(searchFlightsPage.getPageHeader(), "Search flights");
33 | }
34 |
35 | @Test
36 | public void TC002_SearchFligh() {
37 | searchFlightsPage.SearchFlight(properties.getProperty("FromCity"), properties.getProperty("ToCity"),
38 | properties.getProperty("Date"));
39 | Assert.assertEquals(searchFlightsPage.getPageHeader(), "Search flights", "Mandatory data is missing");
40 | }
41 |
42 | @AfterMethod
43 | public void tearDown() {
44 | // FormatResult();
45 | tearDownMain();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/.svn/pristine/82/8251bd97ff52a8cbccd049faaec0fb9522e80a58.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/82/8251bd97ff52a8cbccd049faaec0fb9522e80a58.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/87/870d39d2efec5e4d40245e33f407a397ce97429b.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/87/870d39d2efec5e4d40245e33f407a397ce97429b.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/89/898205536cd19514309ed468300a8633bb0ec6ff.svn-base:
--------------------------------------------------------------------------------
1 | Results for Suite
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/8a/8a41d763fec64c4d36737e9242244a2e9123ec76.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.pages;
2 |
3 | public class FlightResultPage {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/.svn/pristine/8b/8b831b9d5e227fd0fc9adad7463725e15370c069.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/8b/8b831b9d5e227fd0fc9adad7463725e15370c069.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/8b/8ba9891de8e2c96cc98e449f308b9a0adf509659.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/8b/8ba9891de8e2c96cc98e449f308b9a0adf509659.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/8e/8eec635b3742ac07262f5672bac492a6ea831905.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/8e/8eec635b3742ac07262f5672bac492a6ea831905.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/90/9096a2425f1b9e1c11a0facbaa2be76d2212f727.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.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.chrome.ChromeOptions;
12 | import org.openqa.selenium.firefox.FirefoxDriver;
13 | import org.openqa.selenium.ie.InternetExplorerDriver;
14 | import org.openqa.selenium.support.events.EventFiringWebDriver;
15 |
16 | import com.crm.qa.utilities.SeleniumActions;
17 | import com.crm.qa.utilities.TestUtils;
18 | import com.crm.qa.utilities.WebDriverListener;
19 |
20 | public class TestBase {
21 |
22 | protected static WebDriver driver;
23 | protected static Properties properties;
24 | protected static SeleniumActions sele_Actions;
25 | protected static WebDriverListener eventListener;
26 | protected static EventFiringWebDriver e_driver;
27 | protected static ChromeOptions chromeOptions;
28 |
29 | /*
30 | * protected ITestResult result; protected ExtentReports extent; protected
31 | * ExtentTest extentTest;
32 | */
33 | public TestBase() {
34 |
35 | try {
36 | properties = new Properties();
37 | FileInputStream ip = new FileInputStream(
38 | System.getProperty("user.dir") + "/src/main/java/com/crm/qa/config/config.properties");
39 | properties.load(ip);
40 | } catch (FileNotFoundException e) {
41 | // TODO Auto-generated catch block
42 | e.printStackTrace();
43 | System.out.println("file not found");
44 | } catch (IOException e) {
45 | System.out.println("io exception");
46 |
47 | }
48 |
49 | }
50 |
51 | protected static void initializaton() {
52 | String browswerName = properties.getProperty("browser");
53 | if (browswerName.equalsIgnoreCase("chrome")) {
54 | System.setProperty("webdriver.chrome.driver", TestUtils.WORKSAPCE_PATH + "//drivers//chromedriver.exe");
55 | chromeOptions = new ChromeOptions();
56 | chromeOptions.addArguments("--start-maximized");
57 | driver = new ChromeDriver(chromeOptions);
58 | } else if (browswerName.equalsIgnoreCase("FF")) {
59 | System.setProperty("webdriver.gecko.driver", "C://Users/Gorya/Desktop/Krishna_study/geckodriver.exe");
60 | driver = new FirefoxDriver();
61 | } else if (browswerName.equalsIgnoreCase("IE")) {
62 | System.setProperty("webdriver.ie.driver", TestUtils.WORKSAPCE_PATH + "//drivers//IEDriverServer.exe");
63 | driver = new InternetExplorerDriver();
64 | }
65 |
66 | e_driver = new EventFiringWebDriver(driver);
67 | eventListener = new WebDriverListener();
68 | e_driver.register(eventListener);
69 | driver = e_driver;
70 |
71 | driver.manage().window().maximize();
72 | driver.manage().deleteAllCookies();
73 |
74 | driver.manage().timeouts().implicitlyWait(TestUtils.IMPLICIT_WAIT, TimeUnit.SECONDS);
75 | driver.manage().timeouts().pageLoadTimeout(TestUtils.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS);
76 |
77 | driver.get(properties.getProperty("url"));
78 |
79 | sele_Actions = new SeleniumActions();
80 |
81 | }
82 |
83 | public void tearDownMain() {
84 | driver.manage().deleteAllCookies();
85 | driver.close();
86 | }
87 |
88 | /*
89 | * public void setExtend() { extent = new
90 | * ExtentReports(System.getProperty("user.dir") +
91 | * "//test-output//+NewExtentReport.html", true); Map info = new
92 | * HashMap(); info.put("host name", "Krishna Windows");
93 | * info.put("user name", "Krishna"); info.put("Environment", "QA");
94 | *
95 | * extent.addSystemInfo(info);
96 | *
97 | * }
98 | *
99 | * public void FormatResult() { if (result.getStatus() == ITestResult.FAILURE) {
100 | * extentTest.log(LogStatus.FAIL, "Failed test case is ::" + result.getName());
101 | * extentTest.log(LogStatus.FAIL, "Failed test case is ::" +
102 | * result.getThrowable()); TestUtils.takeScreenShot(driver);
103 | * extentTest.log(LogStatus.FAIL,
104 | * extentTest.addScreenCapture(TestUtils.SCREENSHOT_PATH)); } else if
105 | * (result.getStatus() == ITestResult.SKIP) { extentTest.log(LogStatus.SKIP,
106 | * "Skipped test case is ::" + result.getName()); } else if (result.getStatus()
107 | * == ITestResult.SUCCESS) { extentTest.log(LogStatus.PASS,
108 | * "Passed testc case is ::" + result.getName()); }
109 | *
110 | * extent.endTest(extentTest);
111 | *
112 | * }
113 | */}
114 |
--------------------------------------------------------------------------------
/.svn/pristine/90/90ca02afa3fc251cada9759f4b25ce779a65a23a.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.pages;
2 |
3 | import org.openqa.selenium.WebElement;
4 | import org.openqa.selenium.support.FindBy;
5 | import org.openqa.selenium.support.PageFactory;
6 |
7 | import com.crm.qa.base.TestBase;
8 |
9 | public class SearchFlightsPage extends TestBase {
10 |
11 |
12 | public SearchFlightsPage() {
13 | PageFactory.initElements(driver, this);
14 | }
15 |
16 | @FindBy(xpath = "//form[@id='SearchForm']//h1")
17 | WebElement SearchFlighHeader;
18 |
19 | @FindBy(xpath = "//form[@id='SearchForm']//h2")
20 | WebElement searchFlightSubHeader;
21 |
22 | @FindBy(id = "OneWay")
23 | WebElement oneWayButton;
24 |
25 | @FindBy(id = "RoundTrip")
26 | WebElement roundTripButton;
27 |
28 | @FindBy(id = "FromTag")
29 | WebElement fromCity;
30 |
31 | @FindBy(id = "ToTag")
32 | WebElement toCity;
33 |
34 | @FindBy(id = "DepartDate")
35 | WebElement calender;
36 |
37 | @FindBy(id = "Adults")
38 | WebElement adultsCount;
39 |
40 | @FindBy(id = "Childrens")
41 | WebElement childrenCount;
42 |
43 | @FindBy(id = "Infants")
44 | WebElement infantsCount;
45 |
46 | @FindBy(id = "SearchBtn")
47 | WebElement submitButton;
48 |
49 | public String getPageHeader() {
50 | return SearchFlighHeader.getText();
51 | }
52 |
53 | public FlightResultPage SearchFlight(String from, String to, String date) {
54 | fromCity.sendKeys(from);
55 | toCity.sendKeys(to);
56 | calender.click();
57 | sele_Actions.selectbyValue(adultsCount, "2");
58 | sele_Actions.selectbyValue(childrenCount, "0");
59 | sele_Actions.selectbyValue(infantsCount, "0");
60 | submitButton.click();
61 | return new FlightResultPage();
62 |
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/.svn/pristine/91/917b8ec2b70b70884530de0e3662e13f3d3b5b61.svn-base:
--------------------------------------------------------------------------------
1 | Methods that were not run
--------------------------------------------------------------------------------
/.svn/pristine/94/94eb3cb25b279154e2f85b44fe7d9f8e267103f9.svn-base:
--------------------------------------------------------------------------------
1 | Results for Suite
2 | Select a result on the left-hand pane.
3 |
--------------------------------------------------------------------------------
/.svn/pristine/98/985d4c8de5a14cf66ae6b141d270f78e00f79797.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.text.DateFormat;
6 | import java.text.SimpleDateFormat;
7 | import java.util.Date;
8 |
9 | import org.apache.commons.io.FileUtils;
10 | import org.openqa.selenium.OutputType;
11 | import org.openqa.selenium.TakesScreenshot;
12 | import org.openqa.selenium.WebDriver;
13 |
14 | public class TestUtils {
15 |
16 | static DateFormat dateFormat;
17 | static Date date;
18 |
19 | public static final long PAGE_LOAD_TIMEOUT = 100;
20 |
21 | public static final long IMPLICIT_WAIT = 10;
22 |
23 | public static final String WORKSAPCE_PATH = "C://Users//Gorya//Desktop//Krishna_study//Workspace";
24 |
25 | public static final String SCREENSHOT_PATH = WORKSAPCE_PATH + "//FressCRMAutomation//";
26 |
27 | public static final String DateFormat = "yyyyMMddHH:mm:ss";
28 |
29 | public static String getDate(String format) {
30 | dateFormat = new SimpleDateFormat(format);
31 | date = new Date();
32 | return dateFormat.format(date);
33 | }
34 |
35 | public static void takeScreenShot(WebDriver driver) {
36 | File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
37 | try {
38 | FileUtils.copyFile(src, new File(SCREENSHOT_PATH + "//screenshot//" + getDate(DateFormat) + ".png"));
39 | } catch (IOException e) {
40 | // TODO Auto-generated catch block
41 | e.printStackTrace();
42 | }
43 |
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/.svn/pristine/98/98609b323683a73476321cb76a5f53838690a29b.svn-base:
--------------------------------------------------------------------------------
1 |
2 | Test results
3 |
4 |
5 | Test results
6 | Suite Passed Failed Skipped testng.xml
7 | Total 1 1 2
8 | Suite
9 | 1 1 2 Link
10 |
--------------------------------------------------------------------------------
/.svn/pristine/99/99e783ee614062e9066afe73824e3a88f6072f7e.svn-base:
--------------------------------------------------------------------------------
1 | Results for Default suite
2 | Select a result on the left-hand pane.
3 |
--------------------------------------------------------------------------------
/.svn/pristine/9b/9b8122a9c234c7fb2cfab25b4a9f9e1bc2be18c6.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/9b/9b8122a9c234c7fb2cfab25b4a9f9e1bc2be18c6.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/a1/a112be21c325d37ebc17baafd40c0386b5d09df1.svn-base:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/.svn/pristine/a3/a3a37ccece9d513af3465f40ac201e039102d12a.svn-base:
--------------------------------------------------------------------------------
1 | testng.xml for Suite <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite verbose="0" name="Suite">
<listeners>
<listener class-name="com.crm.qa.reports.ExtentReporterNG"/>
</listeners>
<test name="Testing">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases"/>
<class name="com.crm.qa.testcases.SearchFlightTestCases"/>
</classes>
</test> <!-- Testing -->
</suite> <!-- Suite -->
--------------------------------------------------------------------------------
/.svn/pristine/a7/a76d1942a07dfd71e052cd0350e3a38c5ef48aed.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | TestNG: Default test
4 |
5 |
6 |
7 |
11 |
53 |
54 |
55 |
56 | Default test
57 |
58 | Tests passed/Failed/Skipped: 2/0/0
59 |
60 | Started on: Fri Jun 07 01:10:06 PDT 2019
61 |
62 | Total time: 78 seconds (78586 ms)
63 |
64 | Included groups:
65 |
66 | Excluded groups:
67 |
68 |
69 | (Hover the method name to see the test class name)
70 |
71 | PASSED TESTS
72 | Test method
73 | Exception
74 | Time (seconds)
75 | Instance
76 |
77 |
78 | TC001_CheckifLogoisPresent Test class: com.crm.qa.testcases.FlightTestCases
79 |
80 | 0
81 | com.crm.qa.testcases.FlightTestCases@5e5792a0
82 |
83 | TC002_SelectFlightOption Test class: com.crm.qa.testcases.FlightTestCases
84 |
85 | 17
86 | com.crm.qa.testcases.FlightTestCases@5e5792a0
87 |
88 |
89 |
--------------------------------------------------------------------------------
/.svn/pristine/a9/a93f3b46ba5711d45883c9e0e283d906abadd445.svn-base:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | FreeCRMautomation
7 | FressCRMAutomation
8 | 0.0.1-SNAPSHOT
9 | jar
10 |
11 | FressCRMAutomation
12 | http://maven.apache.org
13 |
14 |
15 | UTF-8
16 |
17 |
18 |
19 |
20 |
21 |
22 | org.apache.maven.plugins
23 | maven-compiler-plugin
24 | 3.8.1
25 |
26 |
27 |
28 | org.apache.maven.plugins
29 | maven-surefire-plugin
30 | 3.0.0-M3
31 |
32 |
33 | src/main/resources/testng.xml
34 |
35 |
36 |
37 |
38 |
39 |
40 | org.apache.maven.plugins
41 | maven-source-plugin
42 | 3.1.0
43 |
44 |
45 | attach-sources
46 | verify
47 |
48 | jar-no-fork
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | org.seleniumhq.selenium
62 | selenium-java
63 | 3.141.59
64 |
65 |
66 |
67 | org.testng
68 | testng
69 | 6.8
70 | compile
71 |
72 |
73 |
74 | org.apache.poi
75 | poi
76 | 4.1.0
77 |
78 |
79 | org.apache.poi
80 | poi-ooxml
81 | 4.1.0
82 |
83 |
84 | org.apache.poi
85 | poi-ooxml-schemas
86 | 4.1.0
87 |
88 |
89 | org.apache.poi
90 | poi-scratchpad
91 | 4.1.0
92 |
93 |
94 | org.apache.poi
95 | ooxml-schemas
96 | 1.1
97 |
98 |
99 |
100 | org.apache.poi
101 | openxml4j
102 | 1.0-beta
103 |
104 |
105 |
106 | org.seleniumhq.selenium
107 | selenium-chrome-driver
108 | 3.141.59
109 |
110 |
111 | commons-io
112 | commons-io
113 | 2.6
114 |
115 |
116 | com.relevantcodes
117 | extentreports
118 | 2.41.2
119 |
120 |
121 | log4j
122 | log4j
123 | 1.2.17
124 |
125 |
126 |
127 |
128 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/.svn/pristine/aa/aa3b04560bc95d3e77a960a4d27bd7528916ea80.svn-base:
--------------------------------------------------------------------------------
1 |
Reporter output
--------------------------------------------------------------------------------
/.svn/pristine/ae/ae9ac4e684c779ffd4b762cf5206e582d58adfb8.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/ae/ae9ac4e684c779ffd4b762cf5206e582d58adfb8.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/af/af902f6342268cd909822995e0eda2670c53bdf9.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/af/af902f6342268cd909822995e0eda2670c53bdf9.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/af/afbf9c0f62223320589b61b5ad41d7a624c1e70b.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/10 04:52:04 0 TC001_CheckifLogoisPresent
5 | main@267760927
6 | 19/06/10 04:53:42 98700 TC001_VerifyHeaderContent
7 | main@267760927
8 | 19/06/10 04:54:16 132342 TC002_SearchFligh
9 | main@267760927
10 | 19/06/10 04:52:41 37703 TC002_SelectFlightOption
11 | main@267760927
12 | 19/06/10 04:51:08 -55321 >>setUp
13 | main@267760927
14 | 19/06/10 04:52:21 17161 >>setUp
15 | main@267760927
16 | 19/06/10 04:53:08 64132 >>setUp
17 | main@267760927
18 | 19/06/10 04:53:47 103234 >>setUp
19 | main@267760927
20 | 19/06/10 04:52:05 828 <<tearDown
21 | main@267760927
22 | 19/06/10 04:52:59 55270 <<tearDown
23 | main@267760927
24 | 19/06/10 04:53:43 98891 <<tearDown
25 | main@267760927
26 | 19/06/10 04:54:20 136677 <<tearDown
27 | main@267760927
28 |
29 |
--------------------------------------------------------------------------------
/.svn/pristine/b0/b02d58b33976b661347b50c42c531e2e77a8d8f3.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | Class name
4 | Method name
5 | Groups
6 |
7 | com.crm.qa.testcases.SearchFlightTestCases
8 |
9 |
10 | @Test
11 |
12 |
13 |
14 | TC002_SearchFligh
15 |
16 |
17 |
18 | TC001_VerifyHeaderContent
19 |
20 |
21 | @BeforeClass
22 |
23 |
24 | @BeforeMethod
25 |
26 |
27 |
28 | setUp
29 |
30 |
31 | @AfterMethod
32 |
33 |
34 |
35 | tearDown
36 |
37 |
38 | @AfterClass
39 |
40 |
41 | com.crm.qa.testcases.FlightTestCases
42 |
43 |
44 | @Test
45 |
46 |
47 |
48 | TC001_CheckifLogoisPresent
49 |
50 |
51 |
52 | TC002_SelectFlightOption
53 |
54 |
55 | @BeforeClass
56 |
57 |
58 | @BeforeMethod
59 |
60 |
61 |
62 | setUp
63 |
64 |
65 | @AfterMethod
66 |
67 |
68 |
69 | tearDown
70 |
71 |
72 | @AfterClass
73 |
74 |
75 |
--------------------------------------------------------------------------------
/.svn/pristine/b3/b315f782e8889d52dcac8e18ea57048b23fe2020.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/b3/b315f782e8889d52dcac8e18ea57048b23fe2020.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/b3/b3b669bb77a4c01b003fcdee43fbffef34efb4ec.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/b4/b4ab1f57107527312e8c99ecfa655d81417c36bc.svn-base:
--------------------------------------------------------------------------------
1 | com\crm\qa\pages\FlightResultPage.class
2 | com\crm\qa\base\TestBase.class
3 | com\crm\qa\pages\HomePage.class
4 | com\crm\qa\pages\SearchFlightsPage.class
5 | com\crm\qa\pages\SearchHotelPage.class
6 | com\crm\qa\reports\ExtentReporterNG.class
7 | com\crm\qa\utilities\TestUtils.class
8 | com\crm\qa\utilities\SeleniumActions.class
9 | com\crm\qa\utilities\WebDriverListener.class
10 |
--------------------------------------------------------------------------------
/.svn/pristine/b5/b5fe4e65c200a08297eeffd6e3a48b9d6bbfe4d3.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Suite
4 |
5 |
6 |
7 |
8 | Results forSuite
9 |
23 |
30 |
--------------------------------------------------------------------------------
/.svn/pristine/be/be3067a9cfc3c6f9012f192b9f6143607747fe13.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Suite
4 |
5 |
6 |
7 |
8 | Results forSuite
9 |
23 |
30 |
--------------------------------------------------------------------------------
/.svn/pristine/c9/c921cd5ee454267795de5625362f9b98afdce46a.svn-base:
--------------------------------------------------------------------------------
1 |
2 | Test results
3 |
4 |
5 | Test results
6 | Suite Passed Failed Skipped testng.xml
7 | Total 4 0 0
8 | Suite
9 | 4 0 0 Link
10 |
--------------------------------------------------------------------------------
/.svn/pristine/ca/ca2205065ef6be2f3738e15eadf0316830f144b5.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/ca/ca2205065ef6be2f3738e15eadf0316830f144b5.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/d6/d696b862525a48f987707afb3cae041fde7b9b7f.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/d6/d696b862525a48f987707afb3cae041fde7b9b7f.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/d6/d6b82681716f82f450c38113e371d6ee204b33f3.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/10 04:51:08 0 >>setUp
5 | main@267760927
6 | 19/06/10 04:52:04 55321 TC001_CheckifLogoisPresent
7 | main@267760927
8 | 19/06/10 04:52:05 56149 <<tearDown
9 | main@267760927
10 | 19/06/10 04:52:21 72482 >>setUp
11 | main@267760927
12 | 19/06/10 04:52:41 93024 TC002_SelectFlightOption
13 | main@267760927
14 | 19/06/10 04:52:59 110591 <<tearDown
15 | main@267760927
16 | 19/06/10 04:53:08 119453 >>setUp
17 | main@267760927
18 | 19/06/10 04:53:42 154021 TC001_VerifyHeaderContent
19 | main@267760927
20 | 19/06/10 04:53:43 154212 <<tearDown
21 | main@267760927
22 | 19/06/10 04:53:47 158555 >>setUp
23 | main@267760927
24 | 19/06/10 04:54:16 187663 TC002_SearchFligh
25 | main@267760927
26 | 19/06/10 04:54:20 191998 <<tearDown
27 | main@267760927
28 |
29 |
--------------------------------------------------------------------------------
/.svn/pristine/d7/d70daa5571649c7fa5181fd0954b85111ce9153b.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/de/debda6422ef2e9fa91a7768d461ca36432dabaeb.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/de/debda6422ef2e9fa91a7768d461ca36432dabaeb.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/de/def1c09130679f9068658ca004f74c8678e5e5ba.svn-base:
--------------------------------------------------------------------------------
1 | package com.crm.qa.testcases;
2 |
3 | import org.testng.Assert;
4 | import org.testng.annotations.*;
5 |
6 | import com.crm.qa.base.TestBase;
7 | import com.crm.qa.pages.HomePage;
8 |
9 | public class FlightTestCases extends TestBase {
10 |
11 | HomePage homepage;
12 |
13 | public FlightTestCases() {
14 | super();
15 | }
16 |
17 | /*
18 | * @BeforeTest public void setExtentReport() { setExtend(); }
19 | */
20 |
21 | @BeforeMethod
22 | public void setUp() {
23 | initializaton();
24 | homepage = new HomePage();
25 | }
26 |
27 | @Test
28 | public void TC001_CheckifLogoisPresent() {
29 | boolean flag = homepage.isLogoDisplayed();
30 | Assert.assertTrue(flag);
31 | }
32 |
33 | @Test
34 | public void TC002_SelectFlightOption() {
35 | homepage.selectFlightOption();
36 | }
37 |
38 | @AfterMethod
39 | public void tearDown() {
40 | // FormatResult();
41 | tearDownMain();
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/.svn/pristine/e1/e1933828fc5f8e5c530f0aad023802f689e03c88.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | FressCRMAutomation
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 |
--------------------------------------------------------------------------------
/.svn/pristine/e1/e1b41ec182f5b02e10520a2728376ea9deea62f1.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/e1/e1b41ec182f5b02e10520a2728376ea9deea62f1.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/e2/e2f30fc9d63fb0df7575a703f2cfa021cebb3042.svn-base:
--------------------------------------------------------------------------------
1 | Results for Default suite
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.svn/pristine/e8/e829324dd0f94f5ec67407efa74eb5ccdbe28afa.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/10 13:00:59 0 TC001_CheckifLogoisPresent
5 | main@1824835605
6 | 19/06/10 13:02:22 82732 TC001_VerifyHeaderContent
7 | main@1824835605
8 | 19/06/10 13:02:55 116531 TC002_SearchFligh
9 | main@1824835605
10 | 19/06/10 13:01:33 34429 TC002_SelectFlightOption
11 | main@1824835605
12 | 19/06/10 13:00:15 -44092 >>setUp
13 | main@1824835605
14 | 19/06/10 13:01:12 12804 >>setUp
15 | main@1824835605
16 | 19/06/10 13:01:59 59723 >>setUp
17 | main@1824835605
18 | 19/06/10 13:02:27 88270 >>setUp
19 | main@1824835605
20 | 19/06/10 13:01:02 2826 <<tearDown
21 | main@1824835605
22 | 19/06/10 13:01:52 53137 <<tearDown
23 | main@1824835605
24 | 19/06/10 13:02:22 82887 <<tearDown
25 | main@1824835605
26 | 19/06/10 13:03:00 121122 <<tearDown
27 | main@1824835605
28 |
29 |
--------------------------------------------------------------------------------
/.svn/pristine/e8/e88b7086e5641df79739d1eb0875ae2214421954.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Suite
4 |
5 |
6 |
7 |
8 | Results forSuite
9 |
23 |
30 |
--------------------------------------------------------------------------------
/.svn/pristine/ea/eabeeb21331686d48ba4f7d2e8db4a739940fb98.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.svn/pristine/ea/ead1d91551293b3f204c3188ade63ab7df5d6b44.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/10 13:00:15 0 >>setUp
5 | main@1824835605
6 | 19/06/10 13:00:59 44092 TC001_CheckifLogoisPresent
7 | main@1824835605
8 | 19/06/10 13:01:02 46918 <<tearDown
9 | main@1824835605
10 | 19/06/10 13:01:12 56896 >>setUp
11 | main@1824835605
12 | 19/06/10 13:01:33 78521 TC002_SelectFlightOption
13 | main@1824835605
14 | 19/06/10 13:01:52 97229 <<tearDown
15 | main@1824835605
16 | 19/06/10 13:01:59 103815 >>setUp
17 | main@1824835605
18 | 19/06/10 13:02:22 126824 TC001_VerifyHeaderContent
19 | main@1824835605
20 | 19/06/10 13:02:22 126979 <<tearDown
21 | main@1824835605
22 | 19/06/10 13:02:27 132362 >>setUp
23 | main@1824835605
24 | 19/06/10 13:02:55 160623 TC002_SearchFligh
25 | main@1824835605
26 | 19/06/10 13:03:00 165214 <<tearDown
27 | main@1824835605
28 |
29 |
--------------------------------------------------------------------------------
/.svn/pristine/eb/eb822acc3c3c21d9d18935d5a7b37b48c58413b1.svn-base:
--------------------------------------------------------------------------------
1 | Groups used for this test run
--------------------------------------------------------------------------------
/.svn/pristine/ed/ed9255847649659c6aa62b066034c60cd8e4a074.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/ed/ed9255847649659c6aa62b066034c60cd8e4a074.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/f0/f010fe04435b721794272f1e0c7457f835ba96b5.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/f0/f010fe04435b721794272f1e0c7457f835ba96b5.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/f6/f69f832672d72400478fb5b78367c81585698117.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/pristine/f6/f69f832672d72400478fb5b78367c81585698117.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/f6/f6e5e7fd0cec2ce6582f349e2aedba8b3055a44c.svn-base:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/12 10:02:43 0 >>setUp
5 | main@1824835605
6 | 19/06/12 10:03:27 43396 TC001_CheckifLogoisPresent
7 | main@1824835605
8 | 19/06/12 10:03:28 44573 <<tearDown
9 | main@1824835605
10 | 19/06/12 10:03:35 51677 >>setUp
11 | main@1824835605
12 | 19/06/12 10:03:43 59530 TC002_SelectFlightOption
13 | main@1824835605
14 | 19/06/12 10:03:55 71936 <<tearDown
15 | main@1824835605
16 | 19/06/12 10:03:59 76079 >>setUp
17 | main@1824835605
18 | 19/06/12 10:04:11 87383 TC001_VerifyHeaderContent
19 | main@1824835605
20 | 19/06/12 10:04:11 87391 TC002_SearchFligh
21 | main@1824835605
22 |
23 |
--------------------------------------------------------------------------------
/.svn/pristine/f7/f76a1c3cea091e21de4c653b0fd9bcd2da0f2ac0.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | Class name
4 | Method name
5 | Groups
6 |
7 | com.crm.qa.testcases.FlightTestCases
8 |
9 |
10 | @Test
11 |
12 |
13 |
14 | TC001_CheckifLogoisPresent
15 |
16 |
17 |
18 | TC002_SelectFlightOption
19 |
20 |
21 | @BeforeClass
22 |
23 |
24 | @BeforeMethod
25 |
26 |
27 |
28 | setUp
29 |
30 |
31 | @AfterMethod
32 |
33 |
34 |
35 | tearDown
36 |
37 |
38 | @AfterClass
39 |
40 |
41 |
--------------------------------------------------------------------------------
/.svn/pristine/fd/fdd49905e073a1abe9994180d0cd5bac4942ae7b.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.svn/pristine/ff/ff5fe9d137e27756c877ff2126f1d4a48396d93b.svn-base:
--------------------------------------------------------------------------------
1 | url = https://www.cleartrip.com/
2 | browser = chrome
3 |
4 | FromCity = Mumbai
5 | ToCity = Goa
6 | Date = 28-Jul-2019
--------------------------------------------------------------------------------
/.svn/wc.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/wc.db
--------------------------------------------------------------------------------
/.svn/wc.db-journal:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/.svn/wc.db-journal
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Selenium-POM-TestNG-Maven
2 | This is sample of widely used POM framework in selenium using Java as scripting language. Maven is used for dependency management and continuous development. TestNG is used to maintain test cases
3 |
4 |
5 | Downlaod project in your local machine and Import Project as exisitng maven project.
6 | After imporitng, use 'mvn clean' command
7 | Use 'mvn test' to execute test cases.
8 |
--------------------------------------------------------------------------------
/action.yml:
--------------------------------------------------------------------------------
1 | name: Java CI with Maven
2 |
3 | on:
4 |
5 | push:
6 |
7 | branches: [ main ]
8 |
9 | jobs:
10 |
11 | test:
12 |
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 |
17 | - uses: actions/checkout@v2
18 |
19 | - name: Set up JDK 11
20 |
21 | uses: actions/setup-java@v2
22 |
23 | with:
24 |
25 | java-version: '11'
26 |
27 | distribution: 'temurin'
28 |
29 | cache: maven
30 |
31 | - name: Build with Maven
32 |
33 | run: mvn clean test
34 |
35 | mkdir marketspark && cp target/*.jar marketspark
36 |
37 | - name: artifact
38 |
39 | uses: actions/upload-artifact@v3
40 |
41 | with:
42 |
43 | name: marketspark-automation-ci
44 |
45 | path: marketspark
46 |
47 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 |
6 | FreeCRMautomation
7 | FressCRMAutomation
8 | 0.0.1-SNAPSHOT
9 | jar
10 |
11 | FressCRMAutomation
12 | http://maven.apache.org
13 |
14 |
15 | UTF-8
16 |
17 |
18 |
19 |
20 |
21 |
22 | org.apache.maven.plugins
23 | maven-compiler-plugin
24 | 3.8.1
25 |
26 |
27 |
28 | org.apache.maven.plugins
29 | maven-surefire-plugin
30 | 3.0.0-M3
31 |
32 |
33 | src/main/resources/testng.xml
34 |
35 |
36 |
37 |
38 |
39 |
40 | org.apache.maven.plugins
41 | maven-source-plugin
42 | 3.1.0
43 |
44 |
45 | attach-sources
46 | verify
47 |
48 | jar-no-fork
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | org.seleniumhq.selenium
62 | selenium-java
63 | 3.141.59
64 |
65 |
66 |
67 | org.testng
68 | testng
69 | 6.8
70 | compile
71 |
72 |
73 |
74 | org.apache.poi
75 | poi
76 | 4.1.1
77 |
78 |
79 | org.apache.poi
80 | poi-ooxml
81 | 4.1.0
82 |
83 |
84 | org.apache.poi
85 | poi-ooxml-schemas
86 | 4.1.0
87 |
88 |
89 | org.apache.poi
90 | poi-scratchpad
91 | 5.2.1
92 |
93 |
94 | org.apache.poi
95 | ooxml-schemas
96 | 1.1
97 |
98 |
99 |
100 | org.apache.poi
101 | openxml4j
102 | 1.0-beta
103 |
104 |
105 |
106 | org.seleniumhq.selenium
107 | selenium-chrome-driver
108 | 3.141.59
109 |
110 |
111 | commons-io
112 | commons-io
113 | 2.7
114 |
115 |
116 | com.relevantcodes
117 | extentreports
118 | 2.41.2
119 |
120 |
121 |
123 |
124 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/src/drivers/IEDriverServer.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/src/drivers/IEDriverServer.exe
--------------------------------------------------------------------------------
/src/drivers/chromedriver.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/src/drivers/chromedriver.exe
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/config/config.properties:
--------------------------------------------------------------------------------
1 | url = https://www.cleartrip.com/
2 | browser = chrome
3 |
4 | FromCity = Mumbai
5 | ToCity = Goa
6 | Date = 28-Jul-2019
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/pages/FlightResultPage.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.pages;
2 |
3 | public class FlightResultPage {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/pages/HomePage.java:
--------------------------------------------------------------------------------
1 | package com.crm.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 |
8 | import com.crm.qa.base.TestBase;
9 |
10 | public class HomePage extends TestBase {
11 |
12 | public HomePage() {
13 | PageFactory.initElements(driver, this);
14 | }
15 |
16 | @FindBy(className = "cleartripLogo")
17 | WebElement logo;
18 |
19 | @FindBy(xpath = "//ul[contains(@class,'navGroup')]//li[@class='flightApp']")
20 | WebElement flightOption;
21 |
22 | @FindBy(className = "hotelApp")
23 | WebElement hotelOption;
24 |
25 | @FindBy(className = "trainsApp")
26 | @CacheLookup
27 | WebElement TrainOption;
28 |
29 | public boolean isLogoDisplayed() {
30 | return logo.isDisplayed();
31 | }
32 |
33 | public SearchFlightsPage selectFlightOption() {
34 | if (flightOption.isEnabled()) {
35 | flightOption.click();
36 | }
37 | return new SearchFlightsPage();
38 | }
39 |
40 | public SearchHotelPage selecthotelOption() {
41 | hotelOption.click();
42 | return new SearchHotelPage();
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/pages/SearchFlightsPage.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.pages;
2 |
3 | import org.openqa.selenium.WebElement;
4 | import org.openqa.selenium.support.FindBy;
5 | import org.openqa.selenium.support.PageFactory;
6 |
7 | import com.crm.qa.base.TestBase;
8 |
9 | public class SearchFlightsPage extends TestBase {
10 |
11 |
12 | public SearchFlightsPage() {
13 | PageFactory.initElements(driver, this);
14 | }
15 |
16 | @FindBy(xpath = "//form[@id='SearchForm']//h1")
17 | WebElement SearchFlighHeader;
18 |
19 | @FindBy(xpath = "//form[@id='SearchForm']//h2")
20 | WebElement searchFlightSubHeader;
21 |
22 | @FindBy(id = "OneWay")
23 | WebElement oneWayButton;
24 |
25 | @FindBy(id = "RoundTrip")
26 | WebElement roundTripButton;
27 |
28 | @FindBy(id = "FromTag")
29 | WebElement fromCity;
30 |
31 | @FindBy(id = "ToTag")
32 | WebElement toCity;
33 |
34 | @FindBy(id = "DepartDate")
35 | WebElement calender;
36 |
37 | @FindBy(id = "Adults")
38 | WebElement adultsCount;
39 |
40 | @FindBy(id = "Childrens")
41 | WebElement childrenCount;
42 |
43 | @FindBy(id = "Infants")
44 | WebElement infantsCount;
45 |
46 | @FindBy(id = "SearchBtn")
47 | WebElement submitButton;
48 |
49 | public String getPageHeader() {
50 | return SearchFlighHeader.getText();
51 | }
52 |
53 | public FlightResultPage SearchFlight(String from, String to, String date) {
54 | fromCity.sendKeys(from);
55 | toCity.sendKeys(to);
56 | calender.click();
57 | sele_Actions.selectbyValue(adultsCount, "2");
58 | sele_Actions.selectbyValue(childrenCount, "0");
59 | sele_Actions.selectbyValue(infantsCount, "0");
60 | submitButton.click();
61 | return new FlightResultPage();
62 |
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/pages/SearchHotelPage.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.pages;
2 |
3 | public class SearchHotelPage {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/reports/ExtentReporterNG.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.reports;
2 |
3 | import java.io.File;
4 | import java.util.Calendar;
5 | import java.util.Date;
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | import org.testng.IReporter;
10 | import org.testng.IResultMap;
11 | import org.testng.ISuite;
12 | import org.testng.ISuiteResult;
13 | import org.testng.ITestContext;
14 | import org.testng.ITestResult;
15 | import org.testng.xml.XmlSuite;
16 |
17 | import com.relevantcodes.extentreports.ExtentReports;
18 | import com.relevantcodes.extentreports.ExtentTest;
19 | import com.relevantcodes.extentreports.LogStatus;
20 |
21 | public class ExtentReporterNG implements IReporter {
22 | private ExtentReports extent;
23 |
24 | public void generateReport(List xmlSuites, List suites,
25 | String outputDirectory) {
26 | extent = new ExtentReports(outputDirectory + File.separator
27 | + "Extent.html", true);
28 |
29 | for (ISuite suite : suites) {
30 | Map result = suite.getResults();
31 |
32 | for (ISuiteResult r : result.values()) {
33 | ITestContext context = r.getTestContext();
34 |
35 | buildTestNodes(context.getPassedTests(), LogStatus.PASS);
36 | buildTestNodes(context.getFailedTests(), LogStatus.FAIL);
37 | buildTestNodes(context.getSkippedTests(), LogStatus.SKIP);
38 | }
39 | }
40 |
41 | extent.flush();
42 | extent.close();
43 | }
44 |
45 | private void buildTestNodes(IResultMap tests, LogStatus status) {
46 | ExtentTest test;
47 |
48 | if (tests.size() > 0) {
49 | for (ITestResult result : tests.getAllResults()) {
50 | test = extent.startTest(result.getMethod().getMethodName());
51 |
52 | test.setStartedTime(getTime(result.getStartMillis()));
53 | test.setEndedTime(getTime(result.getEndMillis()));
54 |
55 | for (String group : result.getMethod().getGroups())
56 | test.assignCategory(group);
57 |
58 | if (result.getThrowable() != null) {
59 | test.log(status, result.getThrowable());
60 | } else {
61 | test.log(status, "Test " + status.toString().toLowerCase()
62 | + "ed");
63 | }
64 |
65 | extent.endTest(test);
66 | }
67 | }
68 | }
69 |
70 | private Date getTime(long millis) {
71 | Calendar calendar = Calendar.getInstance();
72 | calendar.setTimeInMillis(millis);
73 | return calendar.getTime();
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/testdata/ExcelDataProvider.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.testdata;
2 |
3 | import java.io.BufferedReader;
4 | import java.io.File;
5 | import java.io.FileInputStream;
6 | import java.io.FileNotFoundException;
7 | import java.io.FileReader;
8 | import java.io.IOException;
9 | import java.io.InputStreamReader;
10 | import java.util.ArrayList;
11 | import java.util.List;
12 |
13 | import org.apache.poi.ss.usermodel.Row;
14 | import org.apache.poi.ss.usermodel.Sheet;
15 | import org.apache.poi.ss.usermodel.Workbook;
16 | import org.apache.poi.xssf.usermodel.XSSFWorkbook;
17 |
18 | public class ExcelDataProvider {
19 |
20 | static File file = null;
21 | static FileInputStream input = null;
22 | static Workbook workbook = null;
23 | static Sheet sheet = null;
24 | static Row row = null;
25 |
26 | public static void readexcelData() {
27 | try {
28 | file = new File("\\test.xlsx");
29 | input = new FileInputStream(file);
30 | workbook = new XSSFWorkbook(input);
31 | sheet = workbook.getSheet("test");
32 | int totalRows = sheet.getLastRowNum() - sheet.getFirstRowNum();
33 | for (int i = 0; i < totalRows; i++) {
34 | row = sheet.getRow(i);
35 | System.out.println();
36 | for (int j = 0; j < row.getLastCellNum(); j++) {
37 | try {
38 | System.out.print(row.getCell(j).toString() + "||");
39 | } catch (NullPointerException e) {
40 | System.out.print("");
41 | }
42 | }
43 | }
44 | input.close();
45 | } catch (FileNotFoundException f) {
46 | f.printStackTrace();
47 | } catch (IOException e) {
48 | // TODO Auto-generated catch block
49 | e.printStackTrace();
50 | }
51 | }
52 |
53 | public static void main(String args[]) throws IOException {
54 |
55 | BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
56 | String line = br.readLine();
57 | System.out.println(line);
58 | StringBuffer sb = new StringBuffer(line);
59 | String line1 =line.concat("Krishna");
60 | System.out.println(line1);
61 | System.out.println(sb.reverse().toString());
62 | readexcelData();
63 | readcsvData();
64 | }
65 |
66 | private static void readcsvData() throws IOException {
67 | String line = "";
68 | List list = new ArrayList();
69 | BufferedReader br = new BufferedReader(new FileReader("\\test.csv"));
70 | while ((line = br.readLine()) != null) {
71 | list.add(line);
72 | }
73 | for (int i = 0; i < list.size(); i++) {
74 | System.out.println(list.get(i));
75 | }
76 |
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/utilities/AnnotationTransformer.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import java.lang.reflect.Constructor;
4 | import java.lang.reflect.Method;
5 |
6 | import org.testng.IAnnotationTransformer;
7 | import org.testng.annotations.ITestAnnotation;
8 |
9 | public class AnnotationTransformer implements IAnnotationTransformer {
10 |
11 | /**
12 | * @author krishna
13 | *
14 | */
15 |
16 | @Override
17 | public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) {
18 | annotation.setRetryAnalyzer(RetryAnalyzer.class);
19 |
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/utilities/RetryAnalyzer.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import org.testng.IRetryAnalyzer;
4 | import org.testng.ITestResult;
5 |
6 | public class RetryAnalyzer implements IRetryAnalyzer {
7 |
8 | int counter = 0, attempt = 2;
9 |
10 | /**
11 | * @author krishna
12 | *
13 | * this method decides how many time should test should run TestNG will
14 | * call this method every time a test is failed
15 | *
16 | * this method will return true every time when test needs to be retried
17 | * and false when it not
18 | */
19 |
20 | @Override
21 | public boolean retry(ITestResult result) {
22 |
23 | if (counter < attempt) {
24 | counter++;
25 | return true;
26 | } else
27 | return false;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/utilities/SeleniumActions.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import org.openqa.selenium.WebElement;
4 | import org.openqa.selenium.support.ui.Select;
5 |
6 | import com.crm.qa.base.TestBase;
7 |
8 | public class SeleniumActions extends TestBase {
9 |
10 | public void selectbyText(WebElement element, String text) {
11 | Select select = new Select(element);
12 | select.selectByVisibleText(text);
13 | }
14 |
15 | public void selectbyValue(WebElement element, String value) {
16 | Select select = new Select(element);
17 | select.selectByValue(value);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/utilities/TestListner.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import org.testng.ITestContext;
4 | import org.testng.ITestListener;
5 | import org.testng.ITestResult;
6 |
7 | public class TestListner implements ITestListener {
8 |
9 | @Override
10 | public void onTestStart(ITestResult result) {
11 | // TODO Auto-generated method stub
12 |
13 | }
14 |
15 | @Override
16 | public void onTestSuccess(ITestResult result) {
17 | // TODO Auto-generated method stub
18 |
19 | }
20 |
21 | @Override
22 | public void onTestFailure(ITestResult result) {
23 | // TODO Auto-generated method stub
24 |
25 | }
26 |
27 | @Override
28 | public void onTestSkipped(ITestResult result) {
29 | // TODO Auto-generated method stub
30 |
31 | }
32 |
33 | @Override
34 | public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
35 | // TODO Auto-generated method stub
36 |
37 | }
38 |
39 | @Override
40 | public void onStart(ITestContext context) {
41 | // TODO Auto-generated method stub
42 |
43 | }
44 |
45 | @Override
46 | public void onFinish(ITestContext context) {
47 | // TODO Auto-generated method stub
48 |
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/com/crm/qa/utilities/TestUtils.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.utilities;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.text.DateFormat;
6 | import java.text.SimpleDateFormat;
7 | import java.util.Date;
8 |
9 | import org.apache.commons.io.FileUtils;
10 | import org.openqa.selenium.OutputType;
11 | import org.openqa.selenium.TakesScreenshot;
12 | import org.openqa.selenium.WebDriver;
13 |
14 | public class TestUtils {
15 |
16 | static DateFormat dateFormat;
17 | static Date date;
18 |
19 | public static final long PAGE_LOAD_TIMEOUT = 100;
20 |
21 | public static final long IMPLICIT_WAIT = 10;
22 |
23 | public static final String WORKSAPCE_PATH = "C://Users//Workspace//FressCRMAutomation"; // provide path of workspace from your local machine
24 |
25 | public static final String SCREENSHOT_PATH = WORKSAPCE_PATH + "//Screenshot//";
26 |
27 | public static final String DateFormat = "yyyyMMddHH:mm:ss";
28 |
29 | public static String getDate(String format) {
30 | dateFormat = new SimpleDateFormat(format);
31 | date = new Date();
32 | return dateFormat.format(date);
33 | }
34 |
35 | public static void takeScreenShot(WebDriver driver) {
36 | File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
37 | try {
38 | FileUtils.copyFile(src, new File(SCREENSHOT_PATH + "//screenshot//" + getDate(DateFormat) + ".png"));
39 | } catch (IOException e) {
40 | // TODO Auto-generated catch block
41 | e.printStackTrace();
42 | }
43 |
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/resources/testng.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/test/java/com/crm/qa/testcases/FlightTestCases.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.testcases;
2 |
3 | import org.testng.Assert;
4 | import org.testng.annotations.*;
5 |
6 | import com.crm.qa.base.TestBase;
7 | import com.crm.qa.pages.HomePage;
8 | import com.google.common.base.Verify;
9 |
10 | public class FlightTestCases extends TestBase {
11 |
12 | HomePage homepage;
13 |
14 | public FlightTestCases() {
15 | super();
16 | }
17 |
18 | /*
19 | * @BeforeTest public void setExtentReport() { setExtend(); }
20 | */
21 |
22 | @BeforeSuite(alwaysRun = true)
23 | public void setUp() {
24 | initializaton();
25 | homepage = new HomePage();
26 | }
27 |
28 | @Test(groups = { "Simple", "UI" })
29 | public void TC001_CheckifLogoisPresent() {
30 | boolean flag = homepage.isLogoDisplayed();
31 | Assert.assertTrue(flag);
32 | }
33 |
34 | @Test(groups = { "Functionality" })
35 | public void TC002_SelectFlightOption() {
36 | homepage.selectFlightOption();
37 | }
38 |
39 | @Test(groups = { "Simple", "UI" })
40 | public void TC003_CheckifLogoisPresent() {
41 | boolean flag = homepage.isLogoDisplayed();
42 | Assert.assertTrue(flag);
43 | }
44 |
45 | @Test
46 | public void TC004_SelectFlightOption() {
47 | homepage.selectFlightOption();
48 | }
49 |
50 | @AfterSuite(alwaysRun = true)
51 | public void tearDown() {
52 | // FormatResult();
53 | tearDownMain();
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/test/java/com/crm/qa/testcases/SearchFlightTestCases.java:
--------------------------------------------------------------------------------
1 | package com.crm.qa.testcases;
2 |
3 | import org.testng.Assert;
4 | import org.testng.annotations.AfterMethod;
5 | import org.testng.annotations.BeforeMethod;
6 | import org.testng.annotations.Test;
7 |
8 | import com.crm.qa.base.TestBase;
9 | import com.crm.qa.pages.FlightResultPage;
10 | import com.crm.qa.pages.HomePage;
11 | import com.crm.qa.pages.SearchFlightsPage;
12 |
13 | public class SearchFlightTestCases extends TestBase {
14 |
15 | SearchFlightsPage searchFlightsPage;
16 | HomePage homePage;
17 | FlightResultPage flightResultPage;
18 |
19 | public SearchFlightTestCases() {
20 | super();
21 | }
22 |
23 | @BeforeMethod(alwaysRun = true)
24 | public void setUp() {
25 | // initializaton();
26 | homePage = new HomePage();
27 | searchFlightsPage = homePage.selectFlightOption();
28 | }
29 |
30 | @Test(groups = { "Simple", "UI" })
31 | public void TC001_VerifyHeaderContent() {
32 | Assert.assertEquals(searchFlightsPage.getPageHeader(), "Search flights");
33 | }
34 |
35 | @Test
36 | public void TC002_SearchFligh() {
37 | searchFlightsPage.SearchFlight(properties.getProperty("FromCity"), properties.getProperty("ToCity"),
38 | properties.getProperty("Date"));
39 | Assert.assertEquals(searchFlightsPage.getPageHeader(), "Search flights", "Mandatory data is missing");
40 | }
41 |
42 | @Test(groups = { "Simple", "UI" })
43 | public void TC003_VerifyHeaderContent() {
44 | Assert.assertEquals(searchFlightsPage.getPageHeader(), "Search flights");
45 | }
46 |
47 | @Test(groups = { "Simple", "UI" })
48 | public void TC005_VerifyHeaderContent() {
49 | Assert.assertEquals(searchFlightsPage.getPageHeader(), "Search flights");
50 | }
51 |
52 | /*
53 | * @AfterMethod public void tearDown() { // FormatResult(); tearDownMain(); }
54 | */
55 | }
56 |
--------------------------------------------------------------------------------
/target/classes/log4j.properties:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | log4j.rootCategory=DEBUG, Appender1, Appneder2
3 | log4j.appneder.Appender1 = org.apache.log4j.ConsoleAppender
4 | log4j.appender.Appneder1.layout=org.apache.log4j.PatternLayout
5 | log4j.appender.Appender1.layout.ConversionPattern = %-7p %d [%t] %c %x - %m%n
6 | log4j.appneder.Appender2 = org.apache.log4j.FileAppender
7 | log4j.appender.Appneder2.File = "C:\\Users\\Gorya\\Desktop\\Krishna_study\\Workspace\\FressCRMAutomation\\applog.txt"
8 | log4j.appender.Appneder2.layout=org.apache.log4j.PatternLayout
9 | log4j.appender.Appender2.layout.ConversionPattern = %-7p %d [%t] %c %x - %m%n
10 |
11 |
--------------------------------------------------------------------------------
/target/classes/testng.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst:
--------------------------------------------------------------------------------
1 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/testdata/ExcelDataProvider.java
2 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/WebDriverListener.java
3 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/base/TestBase.java
4 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/SeleniumActions.java
5 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/LoggerClass.java
6 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/AnnotationTransformer.java
7 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/pages/HomePage.java
8 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/reports/ExtentReporterNG.java
9 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/pages/FlightResultPage.java
10 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/TestListner.java
11 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/TestUtils.java
12 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/utilities/RetryAnalyzer.java
13 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/pages/SearchHotelPage.java
14 | /Users/krishh/IdeaProjects/Selenium-POM-TestNG-Maven/src/main/java/com/crm/qa/pages/SearchFlightsPage.java
15 |
--------------------------------------------------------------------------------
/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 | Tests passed/Failed/Skipped: 2/0/0
59 |
60 | Started on: Fri Jun 07 01:10:06 PDT 2019
61 |
62 | Total time: 78 seconds (78586 ms)
63 |
64 | Included groups:
65 |
66 | Excluded groups:
67 |
68 |
69 | (Hover the method name to see the test class name)
70 |
71 | PASSED TESTS
72 | Test method
73 | Exception
74 | Time (seconds)
75 | Instance
76 |
77 |
78 | TC001_CheckifLogoisPresent Test class: com.crm.qa.testcases.FlightTestCases
79 |
80 | 0
81 | com.crm.qa.testcases.FlightTestCases@5e5792a0
82 |
83 | TC002_SelectFlightOption Test class: com.crm.qa.testcases.FlightTestCases
84 |
85 | 17
86 | com.crm.qa.testcases.FlightTestCases@5e5792a0
87 |
88 |
89 |
--------------------------------------------------------------------------------
/test-output/Default suite/Default test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/test-output/Default suite/testng-failed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test-output/Failed suite [Suite]/Testing(failed).xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test-output/Failed suite [Suite]/testng-failed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/test-output/RegressionSuite/testng-failed.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 |
--------------------------------------------------------------------------------
/test-output/Suite/Testing.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/test-output/Suite/testng-failed.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 |
--------------------------------------------------------------------------------
/test-output/bullet_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/test-output/bullet_point.png
--------------------------------------------------------------------------------
/test-output/collapseall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/test-output/collapseall.gif
--------------------------------------------------------------------------------
/test-output/failed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/test-output/failed.png
--------------------------------------------------------------------------------
/test-output/junitreports/TEST-com.crm.qa.test.Testing.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/test-output/navigator-bullet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/test-output/navigator-bullet.png
--------------------------------------------------------------------------------
/test-output/old/Default suite/Default test.properties:
--------------------------------------------------------------------------------
1 | [SuiteResult context=Default test]
--------------------------------------------------------------------------------
/test-output/old/Default suite/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Class name
4 | Method name
5 | Groups
6 |
7 | com.crm.qa.testcases.FlightTestCases
8 |
9 |
10 | @Test
11 |
12 |
13 |
14 | TC001_CheckifLogoisPresent
15 |
16 |
17 |
18 | TC002_SelectFlightOption
19 |
20 |
21 | @BeforeClass
22 |
23 |
24 | @BeforeMethod
25 |
26 |
27 |
28 | setUp
29 |
30 |
31 | @AfterMethod
32 |
33 |
34 |
35 | tearDown
36 |
37 |
38 | @AfterClass
39 |
40 |
41 |
--------------------------------------------------------------------------------
/test-output/old/Default suite/groups.html:
--------------------------------------------------------------------------------
1 | Groups used for this test run
--------------------------------------------------------------------------------
/test-output/old/Default suite/index.html:
--------------------------------------------------------------------------------
1 | Results for Default suite
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/test-output/old/Default suite/main.html:
--------------------------------------------------------------------------------
1 | Results for Default suite
2 | Select a result on the left-hand pane.
3 |
--------------------------------------------------------------------------------
/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 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/07 01:10:25 0 TC001_CheckifLogoisPresent
5 | main@1458540918
6 | 19/06/07 01:11:04 39112 TC002_SelectFlightOption
7 | main@1458540918
8 | 19/06/07 01:10:06 -19041 >>setUp
9 | main@1458540918
10 | 19/06/07 01:10:29 4346 >>setUp
11 | main@1458540918
12 | 19/06/07 01:10:25 252 <<tearDown
13 | main@1458540918
14 | 19/06/07 01:11:22 56534 <<tearDown
15 | main@1458540918
16 |
17 |
--------------------------------------------------------------------------------
/test-output/old/Default suite/methods-not-run.html:
--------------------------------------------------------------------------------
1 | Methods that were not run
--------------------------------------------------------------------------------
/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 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/06/07 01:10:06 0 >>setUp
5 | main@1458540918
6 | 19/06/07 01:10:25 19041 TC001_CheckifLogoisPresent
7 | main@1458540918
8 | 19/06/07 01:10:25 19293 <<tearDown
9 | main@1458540918
10 | 19/06/07 01:10:29 23387 >>setUp
11 | main@1458540918
12 | 19/06/07 01:11:04 58153 TC002_SelectFlightOption
13 | main@1458540918
14 | 19/06/07 01:11:22 75575 <<tearDown
15 | main@1458540918
16 |
17 |
--------------------------------------------------------------------------------
/test-output/old/Default suite/reporter-output.html:
--------------------------------------------------------------------------------
1 | Reporter output
--------------------------------------------------------------------------------
/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 name="Default suite">
<test verbose="2" name="Default test">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases"/>
</classes>
</test> <!-- Default test -->
</suite> <!-- Default suite -->
--------------------------------------------------------------------------------
/test-output/old/Default suite/toc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Default suite
4 |
5 |
6 |
7 |
8 | Results forDefault suite
9 |
23 |
24 |
25 | Default test (2/0/0)
26 | Results
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/Testing(failed).properties:
--------------------------------------------------------------------------------
1 | [SuiteResult context=Testing(failed)]
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Class name
4 | Method name
5 | Groups
6 |
7 | com.crm.qa.testcases.SearchFlightTestCases
8 |
9 |
10 | @Test
11 |
12 |
13 |
14 | TC002_SearchFligh
15 |
16 |
17 |
18 | TC001_VerifyHeaderContent
19 |
20 |
21 | @BeforeClass
22 |
23 |
24 | @BeforeMethod
25 |
26 |
27 |
28 | setUp
29 |
30 |
31 | @AfterMethod
32 |
33 |
34 |
35 | tearDown
36 |
37 |
38 | @AfterClass
39 |
40 |
41 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/groups.html:
--------------------------------------------------------------------------------
1 | Groups used for this test run
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/index.html:
--------------------------------------------------------------------------------
1 | Results for Failed suite [Suite]
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/main.html:
--------------------------------------------------------------------------------
1 | Results for Failed suite [Suite]
2 | Select a result on the left-hand pane.
3 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/methods-alphabetical.html:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Failed suite [Suite]
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/07/21 06:46:12 0 TC002_SearchFligh
5 | main@1268066861
6 | 19/07/21 06:45:45 -27540 >>setUp
7 | main@1268066861
8 | 19/07/21 06:46:15 2729 <<tearDown
9 | main@1268066861
10 |
11 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/methods-not-run.html:
--------------------------------------------------------------------------------
1 | Methods that were not run
2 | com.crm.qa.testcases.FlightTestCases.TC002_SelectFlightOption
3 | com.crm.qa.testcases.FlightTestCases.TC001_CheckifLogoisPresent
4 | com.crm.qa.testcases.SearchFlightTestCases.TC001_VerifyHeaderContent
5 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/methods.html:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Failed suite [Suite]
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/07/21 06:45:45 0 >>setUp
5 | main@1268066861
6 | 19/07/21 06:46:12 27540 TC002_SearchFligh
7 | main@1268066861
8 | 19/07/21 06:46:15 30269 <<tearDown
9 | main@1268066861
10 |
11 |
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/reporter-output.html:
--------------------------------------------------------------------------------
1 | Reporter output
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/testng.xml.html:
--------------------------------------------------------------------------------
1 | testng.xml for Failed suite [Suite] <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Failed suite [Suite]">
<listeners>
<listener class-name="com.crm.qa.reports.ExtentReporterNG"/>
</listeners>
<test name="Testing(failed)">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases">
<methods>
<include name="setUp"/>
<include name="tearDown"/>
</methods>
</class> <!-- com.crm.qa.testcases.FlightTestCases -->
<class name="com.crm.qa.testcases.SearchFlightTestCases">
<methods>
<include name="tearDown"/>
<include name="TC002_SearchFligh"/>
<include name="setUp"/>
</methods>
</class> <!-- com.crm.qa.testcases.SearchFlightTestCases -->
</classes>
</test> <!-- Testing(failed) -->
</suite> <!-- Failed suite [Suite] -->
--------------------------------------------------------------------------------
/test-output/old/Failed suite [Suite]/toc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Failed suite [Suite]
4 |
5 |
6 |
7 |
8 | Results forFailed suite [Suite]
9 |
23 |
24 |
25 | Testing(failed) (0/1/0)
26 | Results
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/Testing.properties:
--------------------------------------------------------------------------------
1 | [SuiteResult context=Testing]
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Class name
4 | Method name
5 | Groups
6 |
7 | com.crm.qa.testcases.SearchFlightTestCases
8 |
9 |
10 | @Test
11 |
12 |
13 |
14 | TC003_VerifyHeaderContent
15 | UI Simple
16 |
17 |
18 |
19 | TC005_VerifyHeaderContent
20 | UI Simple
21 |
22 |
23 |
24 | TC002_SearchFligh
25 |
26 |
27 |
28 | TC001_VerifyHeaderContent
29 | UI Simple
30 |
31 |
32 | @BeforeClass
33 |
34 |
35 | @BeforeMethod
36 |
37 |
38 |
39 | setUp
40 |
41 |
42 | @AfterMethod
43 |
44 |
45 | @AfterClass
46 |
47 |
48 | com.crm.qa.testcases.FlightTestCases
49 |
50 |
51 | @Test
52 |
53 |
54 |
55 | TC004_SelectFlightOption
56 |
57 |
58 |
59 | TC001_CheckifLogoisPresent
60 | UI Simple
61 |
62 |
63 |
64 | TC003_CheckifLogoisPresent
65 | UI Simple
66 |
67 |
68 |
69 | TC002_SelectFlightOption
70 | Functionality
71 |
72 |
73 | @BeforeClass
74 |
75 |
76 | @BeforeMethod
77 |
78 |
79 | @AfterMethod
80 |
81 |
82 | @AfterClass
83 |
84 |
85 |
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/groups.html:
--------------------------------------------------------------------------------
1 | Groups used for this test run
2 | Group name Methods Functionality FlightTestCases.TC002_SelectFlightOption()[pri:0, instance:com.crm.qa.testcases.FlightTestCases@5b275dab]
3 | Simple FlightTestCases.TC003_CheckifLogoisPresent()[pri:0, instance:com.crm.qa.testcases.FlightTestCases@5b275dab] SearchFlightTestCases.TC003_VerifyHeaderContent()[pri:0, instance:com.crm.qa.testcases.SearchFlightTestCases@5c3bd550] SearchFlightTestCases.TC005_VerifyHeaderContent()[pri:0, instance:com.crm.qa.testcases.SearchFlightTestCases@5c3bd550] FlightTestCases.TC001_CheckifLogoisPresent()[pri:0, instance:com.crm.qa.testcases.FlightTestCases@5b275dab] SearchFlightTestCases.TC001_VerifyHeaderContent()[pri:0, instance:com.crm.qa.testcases.SearchFlightTestCases@5c3bd550]
4 | UI FlightTestCases.TC003_CheckifLogoisPresent()[pri:0, instance:com.crm.qa.testcases.FlightTestCases@5b275dab] SearchFlightTestCases.TC003_VerifyHeaderContent()[pri:0, instance:com.crm.qa.testcases.SearchFlightTestCases@5c3bd550] SearchFlightTestCases.TC005_VerifyHeaderContent()[pri:0, instance:com.crm.qa.testcases.SearchFlightTestCases@5c3bd550] FlightTestCases.TC001_CheckifLogoisPresent()[pri:0, instance:com.crm.qa.testcases.FlightTestCases@5b275dab] SearchFlightTestCases.TC001_VerifyHeaderContent()[pri:0, instance:com.crm.qa.testcases.SearchFlightTestCases@5c3bd550]
5 |
6 |
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/index.html:
--------------------------------------------------------------------------------
1 | Results for RegressionSuite
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/main.html:
--------------------------------------------------------------------------------
1 | Results for RegressionSuite
2 | Select a result on the left-hand pane.
3 |
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/methods-not-run.html:
--------------------------------------------------------------------------------
1 | Methods that were not run
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/reporter-output.html:
--------------------------------------------------------------------------------
1 | Reporter output
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/testng.xml.html:
--------------------------------------------------------------------------------
1 | testng.xml for RegressionSuite <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" name="RegressionSuite" parallel="classes">
<listeners>
<listener class-name="com.crm.qa.reports.ExtentReporterNG"/>
<listener class-name="com.crm.qa.utilities.AnnotationTransformer"/>
</listeners>
<test name="Testing">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases"/>
<class name="com.crm.qa.testcases.SearchFlightTestCases"/>
</classes>
</test> <!-- Testing -->
</suite> <!-- RegressionSuite -->
--------------------------------------------------------------------------------
/test-output/old/RegressionSuite/toc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for RegressionSuite
4 |
5 |
6 |
7 |
8 | Results forRegressionSuite
9 |
23 |
30 |
--------------------------------------------------------------------------------
/test-output/old/Suite/Testing.properties:
--------------------------------------------------------------------------------
1 | [SuiteResult context=Testing]
--------------------------------------------------------------------------------
/test-output/old/Suite/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Class name
4 | Method name
5 | Groups
6 |
7 | com.crm.qa.testcases.SearchFlightTestCases
8 |
9 |
10 | @Test
11 |
12 |
13 |
14 | TC002_SearchFligh
15 |
16 |
17 |
18 | TC001_VerifyHeaderContent
19 |
20 |
21 | @BeforeClass
22 |
23 |
24 | @BeforeMethod
25 |
26 |
27 |
28 | setUp
29 |
30 |
31 | @AfterMethod
32 |
33 |
34 | @AfterClass
35 |
36 |
37 | com.crm.qa.testcases.FlightTestCases
38 |
39 |
40 | @Test
41 |
42 |
43 |
44 | TC001_CheckifLogoisPresent
45 |
46 |
47 |
48 | TC002_SelectFlightOption
49 |
50 |
51 | @BeforeClass
52 |
53 |
54 | @BeforeMethod
55 |
56 |
57 | @AfterMethod
58 |
59 |
60 | @AfterClass
61 |
62 |
63 |
--------------------------------------------------------------------------------
/test-output/old/Suite/groups.html:
--------------------------------------------------------------------------------
1 | Groups used for this test run
--------------------------------------------------------------------------------
/test-output/old/Suite/index.html:
--------------------------------------------------------------------------------
1 | Results for Suite
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/test-output/old/Suite/main.html:
--------------------------------------------------------------------------------
1 | Results for Suite
2 | Select a result on the left-hand pane.
3 |
--------------------------------------------------------------------------------
/test-output/old/Suite/methods-alphabetical.html:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/07/26 18:34:24 0 TC001_CheckifLogoisPresent
5 | main@1540011289
6 | 19/07/26 18:34:24 271 TC001_CheckifLogoisPresent
7 | main@1540011289
8 | 19/07/26 18:34:24 330 TC001_CheckifLogoisPresent
9 | main@1540011289
10 | 19/07/26 18:34:42 17974 TC001_VerifyHeaderContent
11 | main@1540011289
12 | 19/07/26 18:34:49 25378 TC002_SearchFligh
13 | main@1540011289
14 | 19/07/26 18:34:24 405 TC002_SelectFlightOption
15 | main@1540011289
16 | 19/07/26 18:33:13 -71456 >>setUp
17 | main@1540011289
18 | 19/07/26 18:34:34 10310 >>setUp
19 | main@1540011289
20 | 19/07/26 18:34:42 18076 >>setUp
21 | main@1540011289
22 | 19/07/26 18:34:52 28363 <<tearDown
23 | main@1540011289
24 |
25 |
--------------------------------------------------------------------------------
/test-output/old/Suite/methods-not-run.html:
--------------------------------------------------------------------------------
1 | Methods that were not run
--------------------------------------------------------------------------------
/test-output/old/Suite/methods.html:
--------------------------------------------------------------------------------
1 | Methods run, sorted chronologically >> means before, << means after
Suite
(Hover the method name to see the test class name)
2 |
3 | Time Delta (ms) Suite configuration Test configuration Class configuration Groups configuration Method configuration Test method Thread Instances
4 | 19/07/26 18:33:13 0 >>setUp
5 | main@1540011289
6 | 19/07/26 18:34:24 71456 TC001_CheckifLogoisPresent
7 | main@1540011289
8 | 19/07/26 18:34:24 71727 TC001_CheckifLogoisPresent
9 | main@1540011289
10 | 19/07/26 18:34:24 71786 TC001_CheckifLogoisPresent
11 | main@1540011289
12 | 19/07/26 18:34:24 71861 TC002_SelectFlightOption
13 | main@1540011289
14 | 19/07/26 18:34:34 81766 >>setUp
15 | main@1540011289
16 | 19/07/26 18:34:42 89430 TC001_VerifyHeaderContent
17 | main@1540011289
18 | 19/07/26 18:34:42 89532 >>setUp
19 | main@1540011289
20 | 19/07/26 18:34:49 96834 TC002_SearchFligh
21 | main@1540011289
22 | 19/07/26 18:34:52 99819 <<tearDown
23 | main@1540011289
24 |
25 |
--------------------------------------------------------------------------------
/test-output/old/Suite/reporter-output.html:
--------------------------------------------------------------------------------
1 | Reporter output
--------------------------------------------------------------------------------
/test-output/old/Suite/testng.xml.html:
--------------------------------------------------------------------------------
1 | testng.xml for Suite <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<listeners>
<listener class-name="com.crm.qa.reports.ExtentReporterNG"/>
<listener class-name="com.crm.qa.utilities.AnnotationTransformer"/>
</listeners>
<test name="Testing">
<classes>
<class name="com.crm.qa.testcases.FlightTestCases"/>
<class name="com.crm.qa.testcases.SearchFlightTestCases"/>
</classes>
</test> <!-- Testing -->
</suite> <!-- Suite -->
--------------------------------------------------------------------------------
/test-output/old/Suite/toc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Results for Suite
4 |
5 |
6 |
7 |
8 | Results forSuite
9 |
23 |
30 |
--------------------------------------------------------------------------------
/test-output/old/index.html:
--------------------------------------------------------------------------------
1 |
2 | Test results
3 |
4 |
5 | Test results
6 | Suite Passed Failed Skipped testng.xml
7 | Total 8 4 0
8 | RegressionSuite
9 | 8 4 0 Link
10 |
--------------------------------------------------------------------------------
/test-output/passed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/test-output/passed.png
--------------------------------------------------------------------------------
/test-output/skipped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishhna123/Selenium-POM-TestNG-Maven/8e5eb416342178896806c1b71ba595fe397a41fd/test-output/skipped.png
--------------------------------------------------------------------------------
/test-output/testng-failed.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 |
--------------------------------------------------------------------------------
/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 | // Keep the navigator div always visible
38 | var $scrollingDiv = $(".navigator-root");
39 | $(window).scroll(function() {
40 | $scrollingDiv.css('height', $(window).height() - 65);
41 | $scrollingDiv.stop()
42 | .animate({"marginTop": ($(window).scrollTop() + 60) + "px"} );
43 | });
44 | });
45 |
46 | // The handlers that take care of showing/hiding the methods
47 | function installMethodHandlers(name, hide) {
48 | function getContent(t) {
49 | return $('.method-list-content.' + name + "." + t.attr('panel-name'));
50 | }
51 |
52 | function getHideLink(t, name) {
53 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name');
54 | return $(s);
55 | }
56 |
57 | function getShowLink(t, name) {
58 | return $('a.show-methods.' + name + "." + t.attr('panel-name'));
59 | }
60 |
61 | function getMethodPanelClassSel(element, name) {
62 | var panelName = getPanelName(element);
63 | var sel = '.' + panelName + "-class-" + name;
64 | return $(sel);
65 | }
66 |
67 | $('a.hide-methods.' + name).click(function() {
68 | var w = getContent($(this));
69 | w.hide();
70 | getHideLink($(this), name).hide();
71 | getShowLink($(this), name).show();
72 | getMethodPanelClassSel($(this), name).hide();
73 | });
74 |
75 | $('a.show-methods.' + name).click(function() {
76 | var w = getContent($(this));
77 | w.show();
78 | getHideLink($(this), name).show();
79 | getShowLink($(this), name).hide();
80 | showPanel(getPanelName($(this)));
81 | getMethodPanelClassSel($(this), name).show();
82 | });
83 |
84 | if (hide) {
85 | $('a.hide-methods.' + name).click();
86 | } else {
87 | $('a.show-methods.' + name).click();
88 | }
89 | }
90 |
91 | function getHashForMethod(element) {
92 | return element.attr('hash-for-method');
93 | }
94 |
95 | function getPanelName(element) {
96 | return element.attr('panel-name');
97 | }
98 |
99 | function showPanel(panelName) {
100 | $('.panel').hide();
101 | var panel = $('.panel[panel-name="' + panelName + '"]');
102 | panel.show();
103 | }
104 |
105 | function showMethod(element) {
106 | var hashTag = getHashForMethod(element);
107 | var panelName = getPanelName(element);
108 | showPanel(panelName);
109 | var current = document.location.href;
110 | var base = current.substring(0, current.indexOf('#'))
111 | document.location.href = base + '#' + hashTag;
112 | var newPosition = $(document).scrollTop() - 65;
113 | $(document).scrollTop(newPosition);
114 | }
115 |
116 | function drawTable() {
117 | for (var i = 0; i < suiteTableInitFunctions.length; i++) {
118 | window[suiteTableInitFunctions[i]]();
119 | }
120 |
121 | for (var k in window.suiteTableData) {
122 | var v = window.suiteTableData[k];
123 | var div = v.tableDiv;
124 | var data = v.tableData
125 | var table = new google.visualization.Table(document.getElementById(div));
126 | table.draw(data, {
127 | showRowNumber : false
128 | });
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------