├── .classpath ├── .gitattributes ├── .gitignore ├── .project ├── .project~ ├── .settings └── org.eclipse.jdt.core.prefs ├── LICENSE ├── LogFile.txt ├── LogFile.txt~ ├── README.md ├── README.md~ ├── images ├── image1.png ├── image12.png ├── image13.png ├── image14.png ├── image2.png ├── image3.png ├── image4.png ├── image5.png ├── image6.png ├── image7.png ├── image8.png └── image9.png ├── libs ├── chromedriver └── phantomjs ├── phantomjsdriver.log ├── phantomjsdriver.log~ ├── pom.xml ├── src └── test │ └── java │ ├── features │ ├── scenario1.feature │ └── scenario2.feature │ ├── framework │ ├── Assertions.java │ ├── CommonMethods.java │ ├── CreateSession.java │ └── TestRunner.java │ ├── log4j.properties │ ├── logger │ └── Log.java │ ├── logic │ └── HomePageHelper.java │ ├── outputFiles │ └── searchResults.csv │ └── pages │ └── Homepage.java ├── test-output ├── Suite │ ├── assignment.html │ ├── assignment.xml │ ├── selenium-bdd-framework.html │ ├── selenium-bdd-framework.xml │ └── testng-failed.xml ├── bullet_point.png ├── collapseall.gif ├── emailable-report.html ├── failed.png ├── index.html ├── jquery-1.7.1.min.js ├── junitreports │ ├── TEST-logic.CukesRunnerTest.xml │ └── TEST-logic.TestRunner.xml ├── navigator-bullet.png ├── old │ ├── Suite │ │ ├── assignment.properties │ │ ├── classes.html │ │ ├── groups.html │ │ ├── index.html │ │ ├── main.html │ │ ├── methods-alphabetical.html │ │ ├── methods-not-run.html │ │ ├── methods.html │ │ ├── reporter-output.html │ │ ├── selenium-bdd-framework.properties │ │ ├── testng.xml.html │ │ └── toc.html │ └── index.html ├── passed.png ├── skipped.png ├── testng-failed.xml ├── testng-reports.css ├── testng-reports.js ├── testng-results.xml └── testng.css └── testng.xml /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.java linguist-vendored=false 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Selenium-BDD-Framework 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | 7 | 8 | org.eclipse.jdt.core.javabuilder 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javanature 13 | 14 | 15 | -------------------------------------------------------------------------------- /.project~: -------------------------------------------------------------------------------- 1 | 2 | 3 | test 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | 7 | 8 | org.eclipse.jdt.core.javabuilder 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javanature 13 | 14 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Nov 13 21:30:45 IST 2016 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 3 | eclipse.preferences.version=1 4 | org.eclipse.jdt.core.compiler.source=1.8 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LogFile.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/LogFile.txt -------------------------------------------------------------------------------- /LogFile.txt~: -------------------------------------------------------------------------------- 1 | 22 Nov 2016 11:52:07 INFO logger - . 2 | 22 Nov 2016 11:52:07 INFO logger - Google page loaded successfully 3 | 22 Nov 2016 11:52:52 INFO logger - Scenario failed and screenshot saved in outputFiles folder 4 | 22 Nov 2016 11:52:52 INFO logger - Shutting down driver 5 | ---------------------------------------------- 6 | 22 Nov 2016 11:55:29 INFO logger - . 7 | 22 Nov 2016 11:55:29 INFO logger - Google page loaded successfully 8 | 22 Nov 2016 11:55:30 INFO logger - Scenario failed and screenshot saved in outputFiles folder 9 | 22 Nov 2016 11:55:30 INFO logger - Shutting down driver 10 | ---------------------------------------------- 11 | 22 Nov 2016 11:57:30 INFO logger - . 12 | 22 Nov 2016 11:57:30 INFO logger - Google page loaded successfully 13 | 22 Nov 2016 11:57:31 INFO logger - Shutting down driver 14 | ---------------------------------------------- 15 | 22 Nov 2016 11:58:58 INFO logger - . 16 | 22 Nov 2016 11:58:58 INFO logger - Google page loaded successfully 17 | 22 Nov 2016 11:58:58 INFO logger - . 18 | 22 Nov 2016 11:58:58 INFO logger - Google page loaded successfully 19 | 22 Nov 2016 11:58:58 INFO logger - Shutting down driver 20 | ---------------------------------------------- 21 | 22 Nov 2016 12:05:43 INFO logger - . 22 | 22 Nov 2016 12:05:43 INFO logger - Google page loaded successfully 23 | 22 Nov 2016 12:05:43 INFO logger - . 24 | 22 Nov 2016 12:05:43 INFO logger - Google page loaded successfully 25 | 22 Nov 2016 12:05:43 INFO logger - Shutting down driver 26 | ---------------------------------------------- 27 | 22 Nov 2016 12:12:32 INFO logger - . 28 | 22 Nov 2016 12:12:32 INFO logger - Google page loaded successfully 29 | 22 Nov 2016 12:12:32 INFO logger - . 30 | 22 Nov 2016 12:12:32 INFO logger - Google page loaded successfully 31 | 22 Nov 2016 12:12:32 INFO logger - Shutting down driver 32 | ---------------------------------------------- 33 | 22 Nov 2016 12:13:59 INFO logger - . 34 | 22 Nov 2016 12:13:59 INFO logger - Google page loaded successfully 35 | 22 Nov 2016 12:13:59 INFO logger - . 36 | 22 Nov 2016 12:13:59 INFO logger - Google page loaded successfully 37 | 22 Nov 2016 12:13:59 INFO logger - Shutting down driver 38 | ---------------------------------------------- 39 | 22 Nov 2016 12:19:26 INFO logger - . 40 | 22 Nov 2016 12:19:26 INFO logger - Google page loaded successfully 41 | 22 Nov 2016 12:19:26 INFO logger - . 42 | 22 Nov 2016 12:19:26 INFO logger - Google page loaded successfully 43 | 22 Nov 2016 12:19:55 INFO logger - Shutting down driver 44 | ---------------------------------------------- 45 | 22 Nov 2016 12:23:28 INFO logger - . 46 | 22 Nov 2016 12:23:28 INFO logger - Google page loaded successfully 47 | 22 Nov 2016 12:23:28 INFO logger - . 48 | 22 Nov 2016 12:23:28 INFO logger - Google page loaded successfully 49 | 22 Nov 2016 12:24:04 INFO logger - . 50 | 22 Nov 2016 12:24:04 INFO logger - Google page loaded successfully 51 | 22 Nov 2016 12:24:05 INFO logger - . 52 | 22 Nov 2016 12:24:05 INFO logger - Google page loaded successfully 53 | 22 Nov 2016 12:24:06 INFO logger - Shutting down driver 54 | ---------------------------------------------- 55 | 22 Nov 2016 12:36:15 INFO logger - . 56 | 22 Nov 2016 12:36:15 INFO logger - Google page loaded successfully 57 | 22 Nov 2016 12:36:15 INFO logger - . 58 | 22 Nov 2016 12:36:15 INFO logger - Google page loaded successfully 59 | 22 Nov 2016 12:36:17 INFO logger - Shutting down driver 60 | ---------------------------------------------- 61 | 22 Nov 2016 12:36:49 INFO logger - . 62 | 22 Nov 2016 12:36:49 INFO logger - Google page loaded successfully 63 | 22 Nov 2016 12:36:49 INFO logger - . 64 | 22 Nov 2016 12:36:49 INFO logger - Google page loaded successfully 65 | 22 Nov 2016 12:36:51 INFO logger - Shutting down driver 66 | ---------------------------------------------- 67 | 22 Nov 2016 12:40:24 INFO logger - . 68 | 22 Nov 2016 12:40:24 INFO logger - Google page loaded successfully 69 | 22 Nov 2016 12:40:48 INFO logger - Exception while taking screenshot chrome not reachable 70 | (Session info: chrome=54.0.2840.71) 71 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 72 | Command duration or timeout: 4 milliseconds 73 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 74 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 75 | Driver info: org.openqa.selenium.chrome.ChromeDriver 76 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.Jomo6K}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 77 | Session ID: 7b6e67e13d20fb4fbf03d6d8617b8a74 78 | 22 Nov 2016 12:40:48 INFO logger - Shutting down driver 79 | ---------------------------------------------- 80 | 22 Nov 2016 12:40:59 INFO logger - . 81 | 22 Nov 2016 12:40:59 INFO logger - Google page loaded successfully 82 | 22 Nov 2016 12:41:45 INFO logger - Scenario failed and screenshot saved in outputFiles folder 83 | 22 Nov 2016 12:41:45 INFO logger - Shutting down driver 84 | ---------------------------------------------- 85 | 22 Nov 2016 12:42:38 INFO logger - . 86 | 22 Nov 2016 12:42:38 INFO logger - Google page loaded successfully 87 | 22 Nov 2016 12:42:38 INFO logger - . 88 | 22 Nov 2016 12:42:38 INFO logger - Google page loaded successfully 89 | 22 Nov 2016 12:42:39 INFO logger - Shutting down driver 90 | ---------------------------------------------- 91 | 22 Nov 2016 12:43:05 INFO logger - . 92 | 22 Nov 2016 12:43:05 INFO logger - Google page loaded successfully 93 | 22 Nov 2016 12:43:05 INFO logger - . 94 | 22 Nov 2016 12:43:05 INFO logger - Google page loaded successfully 95 | 22 Nov 2016 12:43:07 INFO logger - Shutting down driver 96 | ---------------------------------------------- 97 | 22 Nov 2016 12:56:22 INFO logger - . 98 | 22 Nov 2016 12:56:22 INFO logger - Google page loaded successfully 99 | 22 Nov 2016 12:56:24 INFO logger - Scenario failed and screenshot saved in outputFiles folder 100 | 22 Nov 2016 12:56:24 INFO logger - Shutting down driver 101 | ---------------------------------------------- 102 | 22 Nov 2016 12:57:07 INFO logger - . 103 | 22 Nov 2016 12:57:07 INFO logger - Google page loaded successfully 104 | 22 Nov 2016 12:57:08 INFO logger - Scenario failed and screenshot saved in outputFiles folder 105 | 22 Nov 2016 12:57:08 INFO logger - Shutting down driver 106 | ---------------------------------------------- 107 | 22 Nov 2016 12:57:15 INFO logger - . 108 | 22 Nov 2016 12:57:15 INFO logger - Google page loaded successfully 109 | 22 Nov 2016 12:57:16 INFO logger - Scenario failed and screenshot saved in outputFiles folder 110 | 22 Nov 2016 12:57:16 INFO logger - Shutting down driver 111 | ---------------------------------------------- 112 | 22 Nov 2016 12:58:31 INFO logger - . 113 | 22 Nov 2016 12:58:31 INFO logger - Google page loaded successfully 114 | 22 Nov 2016 12:59:16 INFO logger - Scenario failed and screenshot saved in outputFiles folder 115 | 22 Nov 2016 12:59:16 INFO logger - Shutting down driver 116 | ---------------------------------------------- 117 | 22 Nov 2016 13:00:05 INFO logger - . 118 | 22 Nov 2016 13:00:05 INFO logger - Google page loaded successfully 119 | 22 Nov 2016 13:00:07 INFO logger - . 120 | 22 Nov 2016 13:00:07 INFO logger - selenium bdd framework - Google Search page loaded successfully 121 | 22 Nov 2016 13:00:07 INFO logger - Shutting down driver 122 | ---------------------------------------------- 123 | 22 Nov 2016 13:00:21 INFO logger - . 124 | 22 Nov 2016 13:00:21 INFO logger - Google page loaded successfully 125 | 22 Nov 2016 13:00:24 INFO logger - . 126 | 22 Nov 2016 13:00:24 INFO logger - selenium bdd framework - Google Search page loaded successfully 127 | 22 Nov 2016 13:00:24 INFO logger - Shutting down driver 128 | ---------------------------------------------- 129 | 22 Nov 2016 13:00:48 INFO logger - . 130 | 22 Nov 2016 13:00:48 INFO logger - Google page loaded successfully 131 | 22 Nov 2016 13:00:48 INFO logger - . 132 | 22 Nov 2016 13:00:48 INFO logger - Google page loaded successfully 133 | 22 Nov 2016 13:00:50 INFO logger - Shutting down driver 134 | ---------------------------------------------- 135 | 22 Nov 2016 13:00:53 INFO logger - . 136 | 22 Nov 2016 13:00:53 INFO logger - Google page loaded successfully 137 | 22 Nov 2016 13:00:55 INFO logger - . 138 | 22 Nov 2016 13:00:55 INFO logger - selenium bdd framework - Google Search page loaded successfully 139 | 22 Nov 2016 13:00:55 INFO logger - Shutting down driver 140 | ---------------------------------------------- 141 | 22 Nov 2016 13:00:56 INFO logger - Shutting down driver 142 | ---------------------------------------------- 143 | 22 Nov 2016 13:01:36 INFO logger - . 144 | 22 Nov 2016 13:01:36 INFO logger - Google page loaded successfully 145 | 22 Nov 2016 13:02:21 INFO logger - Scenario failed and screenshot saved in outputFiles folder 146 | 22 Nov 2016 13:02:21 INFO logger - Shutting down driver 147 | ---------------------------------------------- 148 | 22 Nov 2016 13:02:47 INFO logger - . 149 | 22 Nov 2016 13:02:47 INFO logger - Google page loaded successfully 150 | 22 Nov 2016 13:02:50 INFO logger - . 151 | 22 Nov 2016 13:02:50 INFO logger - selenium bdd framework - Google Search page loaded successfully 152 | 22 Nov 2016 13:02:50 INFO logger - Shutting down driver 153 | ---------------------------------------------- 154 | 22 Nov 2016 13:03:02 INFO logger - . 155 | 22 Nov 2016 13:03:02 INFO logger - Google page loaded successfully 156 | 22 Nov 2016 13:03:03 INFO logger - . 157 | 22 Nov 2016 13:03:03 INFO logger - Google page loaded successfully 158 | 22 Nov 2016 13:03:04 INFO logger - Shutting down driver 159 | ---------------------------------------------- 160 | 22 Nov 2016 13:11:38 INFO logger - . 161 | 22 Nov 2016 13:11:38 INFO logger - Google page loaded successfully 162 | 22 Nov 2016 13:11:39 INFO logger - . 163 | 22 Nov 2016 13:11:39 INFO logger - Google page loaded successfully 164 | 22 Nov 2016 13:11:40 INFO logger - Shutting down driver 165 | ---------------------------------------------- 166 | 22 Nov 2016 13:27:30 INFO logger - . 167 | 22 Nov 2016 13:27:30 INFO logger - Google page loaded successfully 168 | 22 Nov 2016 13:27:31 INFO logger - . 169 | 22 Nov 2016 13:27:31 INFO logger - Google page loaded successfully 170 | 22 Nov 2016 13:27:32 INFO logger - Shutting down driver 171 | ---------------------------------------------- 172 | 22 Nov 2016 13:28:43 INFO logger - . 173 | 22 Nov 2016 13:28:43 INFO logger - Google page loaded successfully 174 | 22 Nov 2016 13:33:30 INFO logger - . 175 | 22 Nov 2016 13:33:30 INFO logger - Google page loaded successfully 176 | 22 Nov 2016 13:34:39 INFO logger - . 177 | 22 Nov 2016 13:34:39 INFO logger - Google page loaded successfully 178 | 22 Nov 2016 13:34:39 INFO logger - . 179 | 22 Nov 2016 13:34:39 INFO logger - Google page loaded successfully 180 | 22 Nov 2016 13:34:40 INFO logger - Shutting down driver 181 | ---------------------------------------------- 182 | 22 Nov 2016 13:34:48 INFO logger - . 183 | 22 Nov 2016 13:34:48 INFO logger - Google page loaded successfully 184 | 22 Nov 2016 13:34:51 INFO logger - . 185 | 22 Nov 2016 13:34:51 INFO logger - selenium bdd framework - Google Search page loaded successfully 186 | 22 Nov 2016 13:34:51 INFO logger - Shutting down driver 187 | ---------------------------------------------- 188 | 22 Nov 2016 13:35:14 INFO logger - . 189 | 22 Nov 2016 13:35:14 INFO logger - Google page loaded successfully 190 | 22 Nov 2016 13:35:14 INFO logger - . 191 | 22 Nov 2016 13:35:14 INFO logger - Google page loaded successfully 192 | 22 Nov 2016 13:35:16 INFO logger - Shutting down driver 193 | ---------------------------------------------- 194 | 22 Nov 2016 13:35:23 INFO logger - . 195 | 22 Nov 2016 13:35:23 INFO logger - Google page loaded successfully 196 | 22 Nov 2016 13:35:27 INFO logger - . 197 | 22 Nov 2016 13:35:27 INFO logger - selenium bdd framework - Google Search page loaded successfully 198 | 22 Nov 2016 13:35:27 INFO logger - Shutting down driver 199 | ---------------------------------------------- 200 | 22 Nov 2016 13:36:02 INFO logger - . 201 | 22 Nov 2016 13:36:02 INFO logger - Google page loaded successfully 202 | 22 Nov 2016 13:36:02 INFO logger - . 203 | 22 Nov 2016 13:36:02 INFO logger - Google page loaded successfully 204 | 22 Nov 2016 13:36:03 INFO logger - Shutting down driver 205 | ---------------------------------------------- 206 | 22 Nov 2016 13:36:06 INFO logger - . 207 | 22 Nov 2016 13:36:06 INFO logger - Google page loaded successfully 208 | 22 Nov 2016 13:36:09 INFO logger - . 209 | 22 Nov 2016 13:36:09 INFO logger - selenium bdd framework - Google Search page loaded successfully 210 | 22 Nov 2016 13:36:09 INFO logger - Shutting down driver 211 | ---------------------------------------------- 212 | 22 Nov 2016 13:36:20 INFO logger - . 213 | 22 Nov 2016 13:36:20 INFO logger - Google page loaded successfully 214 | 22 Nov 2016 13:36:20 INFO logger - ClassName :pages.Homepage 215 | 22 Nov 2016 13:36:20 INFO logger - MethodName :findElement 216 | 22 Nov 2016 13:36:20 INFO logger - Exception :Element not found By.cssSelector: #sblsbb > button > span 217 | 22 Nov 2016 13:36:20 INFO logger - ----------------------------------------------------------------------------------- 218 | 22 Nov 2016 13:36:20 INFO logger - Scenario failed and screenshot saved in outputFiles folder 219 | 22 Nov 2016 13:36:20 INFO logger - Shutting down driver 220 | ---------------------------------------------- 221 | 22 Nov 2016 13:36:24 INFO logger - . 222 | 22 Nov 2016 13:36:24 INFO logger - Google page loaded successfully 223 | 22 Nov 2016 13:36:26 INFO logger - . 224 | 22 Nov 2016 13:36:26 INFO logger - selenium bdd framework - Google Search page loaded successfully 225 | 22 Nov 2016 13:36:26 INFO logger - Shutting down driver 226 | ---------------------------------------------- 227 | 22 Nov 2016 13:36:46 INFO logger - . 228 | 22 Nov 2016 13:36:46 INFO logger - Google page loaded successfully 229 | 22 Nov 2016 13:36:46 INFO logger - . 230 | 22 Nov 2016 13:36:46 INFO logger - Google page loaded successfully 231 | 22 Nov 2016 13:36:47 INFO logger - Shutting down driver 232 | ---------------------------------------------- 233 | 22 Nov 2016 13:36:51 INFO logger - . 234 | 22 Nov 2016 13:36:51 INFO logger - Google page loaded successfully 235 | 22 Nov 2016 13:36:54 INFO logger - . 236 | 22 Nov 2016 13:36:54 INFO logger - selenium bdd framework - Google Search page loaded successfully 237 | 22 Nov 2016 13:36:54 INFO logger - Shutting down driver 238 | ---------------------------------------------- 239 | 22 Nov 2016 13:37:06 INFO logger - . 240 | 22 Nov 2016 13:37:06 INFO logger - Google page loaded successfully 241 | 22 Nov 2016 13:37:06 INFO logger - . 242 | 22 Nov 2016 13:37:06 INFO logger - Google page loaded successfully 243 | 22 Nov 2016 13:37:07 INFO logger - Shutting down driver 244 | ---------------------------------------------- 245 | 22 Nov 2016 13:37:10 INFO logger - . 246 | 22 Nov 2016 13:37:10 INFO logger - Google page loaded successfully 247 | 22 Nov 2016 13:37:10 INFO logger - ClassName :pages.Homepage 248 | 22 Nov 2016 13:37:10 INFO logger - MethodName :findElement 249 | 22 Nov 2016 13:37:10 INFO logger - Exception :Element not found By.cssSelector: #sblsbb > button > span 250 | 22 Nov 2016 13:37:10 INFO logger - ----------------------------------------------------------------------------------- 251 | 22 Nov 2016 13:37:10 INFO logger - Scenario failed and screenshot saved in outputFiles folder 252 | 22 Nov 2016 13:37:10 INFO logger - Shutting down driver 253 | ---------------------------------------------- 254 | 22 Nov 2016 13:40:39 INFO logger - . 255 | 22 Nov 2016 13:40:39 INFO logger - Google page loaded successfully 256 | 22 Nov 2016 13:40:39 INFO logger - . 257 | 22 Nov 2016 13:40:39 INFO logger - Google page loaded successfully 258 | 22 Nov 2016 13:40:40 INFO logger - Shutting down driver 259 | ---------------------------------------------- 260 | 22 Nov 2016 13:40:43 INFO logger - . 261 | 22 Nov 2016 13:40:43 INFO logger - Google page loaded successfully 262 | 22 Nov 2016 13:41:14 INFO logger - Exception while taking screenshot chrome not reachable 263 | (Session info: chrome=54.0.2840.71) 264 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 265 | Command duration or timeout: 11 milliseconds 266 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 267 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 268 | Driver info: org.openqa.selenium.chrome.ChromeDriver 269 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.ppoTz4}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 270 | Session ID: 674b8d7edf355e2098214f96ab26e29b 271 | 22 Nov 2016 13:41:14 INFO logger - Shutting down driver 272 | ---------------------------------------------- 273 | 22 Nov 2016 13:41:26 INFO logger - . 274 | 22 Nov 2016 13:41:26 INFO logger - Google page loaded successfully 275 | 22 Nov 2016 13:41:26 INFO logger - . 276 | 22 Nov 2016 13:41:26 INFO logger - Google page loaded successfully 277 | 22 Nov 2016 13:41:28 INFO logger - Shutting down driver 278 | ---------------------------------------------- 279 | 22 Nov 2016 13:41:32 INFO logger - . 280 | 22 Nov 2016 13:41:32 INFO logger - Google page loaded successfully 281 | 22 Nov 2016 13:41:34 INFO logger - . 282 | 22 Nov 2016 13:41:34 INFO logger - selenium bdd framework - Google Search page loaded successfully 283 | 22 Nov 2016 13:41:34 INFO logger - Shutting down driver 284 | ---------------------------------------------- 285 | 22 Nov 2016 13:52:20 INFO logger - . 286 | 22 Nov 2016 13:52:20 INFO logger - Google page loaded successfully 287 | 22 Nov 2016 13:53:06 INFO logger - Scenario failed and screenshot saved in outputFiles folder 288 | 22 Nov 2016 13:53:06 INFO logger - Shutting down driver 289 | ---------------------------------------------- 290 | 22 Nov 2016 13:53:09 INFO logger - . 291 | 22 Nov 2016 13:53:09 INFO logger - Google page loaded successfully 292 | 22 Nov 2016 13:53:09 INFO logger - Scenario failed and screenshot saved in outputFiles folder 293 | 22 Nov 2016 13:53:09 INFO logger - Shutting down driver 294 | ---------------------------------------------- 295 | 22 Nov 2016 13:54:05 INFO logger - . 296 | 22 Nov 2016 13:54:05 INFO logger - Google page loaded successfully 297 | 22 Nov 2016 13:54:05 INFO logger - . 298 | 22 Nov 2016 13:54:05 INFO logger - Google page loaded successfully 299 | 22 Nov 2016 13:54:07 INFO logger - Shutting down driver 300 | ---------------------------------------------- 301 | 22 Nov 2016 13:54:10 INFO logger - . 302 | 22 Nov 2016 13:54:10 INFO logger - Google page loaded successfully 303 | 22 Nov 2016 13:54:11 INFO logger - Scenario failed and screenshot saved in outputFiles folder 304 | 22 Nov 2016 13:54:11 INFO logger - Shutting down driver 305 | ---------------------------------------------- 306 | 22 Nov 2016 13:55:19 INFO logger - . 307 | 22 Nov 2016 13:55:19 INFO logger - Google page loaded successfully 308 | 22 Nov 2016 13:55:20 INFO logger - . 309 | 22 Nov 2016 13:55:20 INFO logger - Google page loaded successfully 310 | 22 Nov 2016 13:55:21 INFO logger - Shutting down driver 311 | ---------------------------------------------- 312 | 22 Nov 2016 13:55:24 INFO logger - . 313 | 22 Nov 2016 13:55:24 INFO logger - Google page loaded successfully 314 | 22 Nov 2016 13:55:27 INFO logger - . 315 | 22 Nov 2016 13:55:27 INFO logger - selenium bdd framework - Google Search page loaded successfully 316 | 22 Nov 2016 13:55:27 INFO logger - Shutting down driver 317 | ---------------------------------------------- 318 | 22 Nov 2016 13:58:38 INFO logger - . 319 | 22 Nov 2016 13:58:38 INFO logger - Google page loaded successfully 320 | 22 Nov 2016 13:58:38 INFO logger - . 321 | 22 Nov 2016 13:58:38 INFO logger - Google page loaded successfully 322 | 22 Nov 2016 13:58:39 INFO logger - Shutting down driver 323 | ---------------------------------------------- 324 | 22 Nov 2016 13:58:42 INFO logger - . 325 | 22 Nov 2016 13:58:42 INFO logger - Google page loaded successfully 326 | 22 Nov 2016 13:58:45 INFO logger - . 327 | 22 Nov 2016 13:58:45 INFO logger - selenium bdd framework - Google Search page loaded successfully 328 | 22 Nov 2016 13:58:45 INFO logger - Shutting down driver 329 | ---------------------------------------------- 330 | 22 Nov 2016 14:33:59 INFO logger - . 331 | 22 Nov 2016 14:33:59 INFO logger - Google page loaded successfully 332 | 22 Nov 2016 14:34:40 INFO logger - . 333 | 22 Nov 2016 14:34:40 INFO logger - . 334 | 22 Nov 2016 14:34:40 INFO logger - . 335 | 22 Nov 2016 14:34:40 INFO logger - . 336 | 22 Nov 2016 14:34:40 INFO logger - . 337 | 22 Nov 2016 14:34:40 INFO logger - . 338 | 22 Nov 2016 14:34:40 INFO logger - Google page loaded successfully 339 | 22 Nov 2016 14:35:25 INFO logger - Scenario failed and screenshot saved in outputFiles folder 340 | 22 Nov 2016 14:35:25 INFO logger - Shutting down driver 341 | ---------------------------------------------- 342 | 22 Nov 2016 14:35:27 INFO logger - . 343 | 22 Nov 2016 14:35:27 INFO logger - Google page loaded successfully 344 | 22 Nov 2016 14:38:06 INFO logger - . 345 | 22 Nov 2016 14:38:06 INFO logger - Google page loaded successfully 346 | 22 Nov 2016 14:38:51 INFO logger - Scenario failed and screenshot saved in outputFiles folder 347 | 22 Nov 2016 14:38:51 INFO logger - Shutting down driver 348 | ---------------------------------------------- 349 | 22 Nov 2016 14:38:53 INFO logger - . 350 | 22 Nov 2016 14:38:53 INFO logger - Google page loaded successfully 351 | 22 Nov 2016 14:39:39 INFO logger - Scenario failed and screenshot saved in outputFiles folder 352 | 22 Nov 2016 14:39:39 INFO logger - Shutting down driver 353 | ---------------------------------------------- 354 | 22 Nov 2016 14:42:50 INFO logger - . 355 | 22 Nov 2016 14:42:50 INFO logger - . 356 | 22 Nov 2016 14:42:50 INFO logger - . 357 | 22 Nov 2016 14:42:50 INFO logger - . 358 | 22 Nov 2016 14:42:50 INFO logger - . 359 | 22 Nov 2016 14:42:50 INFO logger - . 360 | 22 Nov 2016 14:42:50 INFO logger - . 361 | 22 Nov 2016 14:42:50 INFO logger - . 362 | 22 Nov 2016 14:42:50 INFO logger - . 363 | 22 Nov 2016 14:42:50 INFO logger - . 364 | 22 Nov 2016 14:42:50 INFO logger - . 365 | 22 Nov 2016 14:42:50 INFO logger - Google page loaded successfully 366 | 22 Nov 2016 14:44:15 INFO logger - . 367 | 22 Nov 2016 14:44:15 INFO logger - . 368 | 22 Nov 2016 14:44:15 INFO logger - . 369 | 22 Nov 2016 14:44:15 INFO logger - . 370 | 22 Nov 2016 14:44:15 INFO logger - . 371 | 22 Nov 2016 14:44:15 INFO logger - . 372 | 22 Nov 2016 14:44:15 INFO logger - . 373 | 22 Nov 2016 14:44:15 INFO logger - Google page loaded successfully 374 | 22 Nov 2016 14:44:16 INFO logger - . 375 | 22 Nov 2016 14:44:16 INFO logger - Google page loaded successfully 376 | 22 Nov 2016 14:44:18 INFO logger - Shutting down driver 377 | ---------------------------------------------- 378 | 22 Nov 2016 14:44:20 INFO logger - . 379 | 22 Nov 2016 14:44:20 INFO logger - Google page loaded successfully 380 | 22 Nov 2016 14:44:23 INFO logger - . 381 | 22 Nov 2016 14:44:23 INFO logger - . 382 | 22 Nov 2016 14:44:23 INFO logger - . 383 | 22 Nov 2016 14:44:23 INFO logger - . 384 | 22 Nov 2016 14:44:23 INFO logger - . 385 | 22 Nov 2016 14:44:23 INFO logger - . 386 | 22 Nov 2016 14:44:23 INFO logger - . 387 | 22 Nov 2016 14:44:23 INFO logger - . 388 | 22 Nov 2016 14:44:23 INFO logger - . 389 | 22 Nov 2016 14:44:23 INFO logger - . 390 | 22 Nov 2016 14:44:23 INFO logger - . 391 | 22 Nov 2016 14:44:23 INFO logger - . 392 | 22 Nov 2016 14:44:23 INFO logger - . 393 | 22 Nov 2016 14:44:23 INFO logger - . 394 | 22 Nov 2016 14:44:23 INFO logger - . 395 | 22 Nov 2016 14:44:23 INFO logger - . 396 | 22 Nov 2016 14:44:23 INFO logger - . 397 | 22 Nov 2016 14:44:23 INFO logger - . 398 | 22 Nov 2016 14:44:24 INFO logger - . 399 | 22 Nov 2016 14:44:24 INFO logger - . 400 | 22 Nov 2016 14:44:24 INFO logger - . 401 | 22 Nov 2016 14:44:24 INFO logger - . 402 | 22 Nov 2016 14:44:24 INFO logger - . 403 | 22 Nov 2016 14:44:24 INFO logger - . 404 | 22 Nov 2016 14:44:24 INFO logger - . 405 | 22 Nov 2016 14:44:24 INFO logger - . 406 | 22 Nov 2016 14:44:24 INFO logger - . 407 | 22 Nov 2016 14:44:24 INFO logger - . 408 | 22 Nov 2016 14:44:24 INFO logger - . 409 | 22 Nov 2016 14:44:24 INFO logger - . 410 | 22 Nov 2016 14:44:24 INFO logger - . 411 | 22 Nov 2016 14:44:24 INFO logger - . 412 | 22 Nov 2016 14:44:24 INFO logger - . 413 | 22 Nov 2016 14:44:24 INFO logger - . 414 | 22 Nov 2016 14:44:24 INFO logger - . 415 | 22 Nov 2016 14:44:24 INFO logger - . 416 | 22 Nov 2016 14:44:24 INFO logger - . 417 | 22 Nov 2016 14:44:24 INFO logger - . 418 | 22 Nov 2016 14:44:24 INFO logger - . 419 | 22 Nov 2016 14:44:24 INFO logger - . 420 | 22 Nov 2016 14:44:24 INFO logger - . 421 | 22 Nov 2016 14:44:25 INFO logger - . 422 | 22 Nov 2016 14:44:25 INFO logger - . 423 | 22 Nov 2016 14:44:25 INFO logger - . 424 | 22 Nov 2016 14:44:25 INFO logger - . 425 | 22 Nov 2016 14:44:25 INFO logger - . 426 | 22 Nov 2016 14:44:25 INFO logger - . 427 | 22 Nov 2016 14:44:25 INFO logger - . 428 | 22 Nov 2016 14:44:25 INFO logger - . 429 | 22 Nov 2016 14:44:25 INFO logger - . 430 | 22 Nov 2016 14:44:25 INFO logger - . 431 | 22 Nov 2016 14:44:25 INFO logger - . 432 | 22 Nov 2016 14:44:25 INFO logger - . 433 | 22 Nov 2016 14:44:25 INFO logger - . 434 | 22 Nov 2016 14:44:25 INFO logger - . 435 | 22 Nov 2016 14:44:25 INFO logger - . 436 | 22 Nov 2016 14:44:25 INFO logger - . 437 | 22 Nov 2016 14:44:25 INFO logger - . 438 | 22 Nov 2016 14:44:25 INFO logger - . 439 | 22 Nov 2016 14:44:25 INFO logger - . 440 | 22 Nov 2016 14:44:25 INFO logger - . 441 | 22 Nov 2016 14:44:25 INFO logger - . 442 | 22 Nov 2016 14:44:25 INFO logger - . 443 | 22 Nov 2016 14:44:25 INFO logger - selenium bdd framework - Google Search page loaded successfully 444 | 22 Nov 2016 14:44:26 INFO logger - Shutting down driver 445 | ---------------------------------------------- 446 | 22 Nov 2016 14:45:04 INFO logger - . 447 | 22 Nov 2016 14:45:04 INFO logger - . 448 | 22 Nov 2016 14:45:04 INFO logger - . 449 | 22 Nov 2016 14:45:04 INFO logger - . 450 | 22 Nov 2016 14:45:04 INFO logger - . 451 | 22 Nov 2016 14:45:04 INFO logger - . 452 | 22 Nov 2016 14:45:04 INFO logger - . 453 | 22 Nov 2016 14:45:04 INFO logger - . 454 | 22 Nov 2016 14:45:04 INFO logger - . 455 | 22 Nov 2016 14:45:04 INFO logger - . 456 | 22 Nov 2016 14:45:04 INFO logger - . 457 | 22 Nov 2016 14:45:04 INFO logger - . 458 | 22 Nov 2016 14:45:05 INFO logger - . 459 | 22 Nov 2016 14:45:05 INFO logger - . 460 | 22 Nov 2016 14:45:05 INFO logger - Google page loaded successfully 461 | 22 Nov 2016 14:45:05 INFO logger - . 462 | 22 Nov 2016 14:45:05 INFO logger - Google page loaded successfully 463 | 22 Nov 2016 14:45:07 INFO logger - Shutting down driver 464 | ---------------------------------------------- 465 | 22 Nov 2016 14:45:09 INFO logger - . 466 | 22 Nov 2016 14:45:09 INFO logger - . 467 | 22 Nov 2016 14:45:09 INFO logger - . 468 | 22 Nov 2016 14:45:09 INFO logger - . 469 | 22 Nov 2016 14:45:09 INFO logger - . 470 | 22 Nov 2016 14:45:09 INFO logger - . 471 | 22 Nov 2016 14:45:09 INFO logger - . 472 | 22 Nov 2016 14:45:09 INFO logger - . 473 | 22 Nov 2016 14:45:09 INFO logger - . 474 | 22 Nov 2016 14:45:09 INFO logger - . 475 | 22 Nov 2016 14:45:10 INFO logger - . 476 | 22 Nov 2016 14:45:10 INFO logger - . 477 | 22 Nov 2016 14:45:10 INFO logger - . 478 | 22 Nov 2016 14:45:10 INFO logger - Google page loaded successfully 479 | 22 Nov 2016 14:45:12 INFO logger - . 480 | 22 Nov 2016 14:45:12 INFO logger - . 481 | 22 Nov 2016 14:45:12 INFO logger - . 482 | 22 Nov 2016 14:45:12 INFO logger - . 483 | 22 Nov 2016 14:45:12 INFO logger - . 484 | 22 Nov 2016 14:45:12 INFO logger - . 485 | 22 Nov 2016 14:45:12 INFO logger - . 486 | 22 Nov 2016 14:45:12 INFO logger - . 487 | 22 Nov 2016 14:45:12 INFO logger - . 488 | 22 Nov 2016 14:45:12 INFO logger - . 489 | 22 Nov 2016 14:45:12 INFO logger - . 490 | 22 Nov 2016 14:45:12 INFO logger - . 491 | 22 Nov 2016 14:45:13 INFO logger - . 492 | 22 Nov 2016 14:45:13 INFO logger - . 493 | 22 Nov 2016 14:45:13 INFO logger - . 494 | 22 Nov 2016 14:45:13 INFO logger - . 495 | 22 Nov 2016 14:45:13 INFO logger - . 496 | 22 Nov 2016 14:45:13 INFO logger - . 497 | 22 Nov 2016 14:45:13 INFO logger - . 498 | 22 Nov 2016 14:45:13 INFO logger - . 499 | 22 Nov 2016 14:45:13 INFO logger - selenium bdd framework - Google Search page loaded successfully 500 | 22 Nov 2016 14:45:13 INFO logger - Shutting down driver 501 | ---------------------------------------------- 502 | 22 Nov 2016 14:51:35 INFO logger - . 503 | 22 Nov 2016 14:51:35 INFO logger - . 504 | 22 Nov 2016 14:51:35 INFO logger - . 505 | 22 Nov 2016 14:51:35 INFO logger - . 506 | 22 Nov 2016 14:51:35 INFO logger - . 507 | 22 Nov 2016 14:51:35 INFO logger - . 508 | 22 Nov 2016 14:51:35 INFO logger - . 509 | 22 Nov 2016 14:51:35 INFO logger - . 510 | 22 Nov 2016 14:51:35 INFO logger - Google page loaded successfully 511 | 22 Nov 2016 14:51:36 INFO logger - . 512 | 22 Nov 2016 14:51:36 INFO logger - Google page loaded successfully 513 | 22 Nov 2016 14:51:38 INFO logger - Shutting down driver 514 | ---------------------------------------------- 515 | 22 Nov 2016 14:51:40 INFO logger - . 516 | 22 Nov 2016 14:51:40 INFO logger - Google page loaded successfully 517 | 22 Nov 2016 14:51:43 INFO logger - . 518 | 22 Nov 2016 14:51:43 INFO logger - . 519 | 22 Nov 2016 14:51:43 INFO logger - . 520 | 22 Nov 2016 14:51:43 INFO logger - . 521 | 22 Nov 2016 14:51:43 INFO logger - . 522 | 22 Nov 2016 14:51:43 INFO logger - . 523 | 22 Nov 2016 14:51:43 INFO logger - . 524 | 22 Nov 2016 14:51:43 INFO logger - . 525 | 22 Nov 2016 14:51:43 INFO logger - . 526 | 22 Nov 2016 14:51:43 INFO logger - . 527 | 22 Nov 2016 14:51:43 INFO logger - . 528 | 22 Nov 2016 14:51:43 INFO logger - . 529 | 22 Nov 2016 14:51:43 INFO logger - . 530 | 22 Nov 2016 14:51:43 INFO logger - . 531 | 22 Nov 2016 14:51:43 INFO logger - . 532 | 22 Nov 2016 14:51:43 INFO logger - . 533 | 22 Nov 2016 14:51:43 INFO logger - . 534 | 22 Nov 2016 14:51:43 INFO logger - . 535 | 22 Nov 2016 14:51:43 INFO logger - . 536 | 22 Nov 2016 14:51:43 INFO logger - selenium bdd framework - Google Search page loaded successfully 537 | 22 Nov 2016 14:51:44 INFO logger - Shutting down driver 538 | ---------------------------------------------- 539 | 22 Nov 2016 14:54:17 INFO logger - . 540 | 22 Nov 2016 14:54:17 INFO logger - Google page loaded successfully 541 | 22 Nov 2016 14:54:17 INFO logger - . 542 | 22 Nov 2016 14:54:17 INFO logger - Google page loaded successfully 543 | 22 Nov 2016 14:54:18 INFO logger - Shutting down driver 544 | ---------------------------------------------- 545 | 22 Nov 2016 14:54:22 INFO logger - . 546 | 22 Nov 2016 14:54:22 INFO logger - Google page loaded successfully 547 | 22 Nov 2016 14:54:24 INFO logger - . 548 | 22 Nov 2016 14:54:24 INFO logger - selenium bdd framework - Google Search page loaded successfully 549 | 22 Nov 2016 14:54:25 INFO logger - Shutting down driver 550 | ---------------------------------------------- 551 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # selenium_BDD_framework 2 | 3 | Behavioural driven development automation framework using selenium, cucumber-java, testng, maven, phantomjs 4 | 5 | 6 | ## Tools and technologies used: 7 | 8 | 1. Language: Java 8 9 | 2. Testing framework: Testng 10 | 3. BDD framework: Cucumber jvm 11 | 4. Automation tool: Selenium webdriver 12 | 5. Build tool: maven 13 | 6. Logging: log4j 14 | 7. Headless browser: Phantomjs 15 | 8. Reporting: [cucumber reporting](https://github.com/damianszczepanik/cucumber-reporting) 16 | 17 | 18 | ## Features of the framework 19 | 1. BDD framework using Cucumber-jvm. Feature files can be written easily using Given,When, Then etc. 20 | 2. Browser(chrome/firefox) can be configured at run time from command line (or Continuous integration tool, if configured). 21 | 3. Tests can run in headless browser (Phantomjs) by passing a parameter at run time. 22 | 4. Screenshot would be taken if any scenario failed and saved under /outputFiles folder. 23 | 5. Html report gets generated after each test run and can be found /target/cucumber-html-report/index.html 24 | 25 | 26 | **package: libs** : It has exe of chromedriver and phantomjs. This is required while creating the webdriver session. 27 | 28 | ![image](images/image2.png) 29 | 30 | 31 | **package: features** : It contains all different features (tests) files. 32 | 33 | ![image](images/image3.png) 34 | 35 | **package: framework** : It includes the common classes (and methods) which are required by each test to perform actions. Below are classes in this package: 36 | 37 | ![image](images/image4.png) 38 | 39 | **Assertions.java** : It contains assertion methods like verifyEquals,screenshot etc. These can be used in any of the helper files to verify the actual result with expected result. 40 | 41 | **CommonMethods.java** : It is a common repository for all the webdriver methods which are used in every class present under logic package to perform actions like click, findElement etc. Every new method which is being used in logic classes should be added in this class as well. It is to reduce the duplicate code. Each page class extends this class. 42 | 43 | **CreateSession.java** : All the methods to create a new session and destroy the session after the test(s) execution is over. 44 | 45 | **TestRunner.java** : Features/tests to be executed are defined in this class. Other test configurations are also defined here. 46 | 47 | 48 | **package: logger** : It contains Log.java class which contains methods to show the logs on console and save the logs in LogFile.txt of each run. 49 | 50 | ![image](images/image5.png) 51 | 52 | **package: logic :** contains all the classes where actions and assertions happens. 53 | 54 | ![image](images/image6.png) 55 | 56 | **pakage: outputFiles :** All the output files will be stored here (screenshots/csv/txt files) 57 | 58 | ![image](images/image7.png) 59 | 60 | **package: pages :** It has web elements corresponding to the specific page which is used by corressponding logic classes. 61 | 62 | ![image](images/image8.png) 63 | 64 | 65 | 66 | ## Test report ## 67 | 68 | Once test execution is completed, go to target/cucumber-report folder and open feature-overview.html file 69 | 70 | ![image](images/image14.png) 71 | 72 | You can see the test results at different level 73 | 74 | ![image](images/image13.png) 75 | 76 | 77 | 78 | # Setting up the project 79 | 80 | Install the maven and clone the build then: 81 | 82 | **$ cd selenium_BDD_framework** 83 | 84 | **$ mvn clean install** 85 | 86 | 87 | 88 | ## Execution of tests 89 | There are 2 scenarios named as @scenario1 and @scenario2. Ran the tests on chrome54.0, firefox46 on ubuntu 14.04 64 bit 90 | 91 | To run both scenarios (@scenario1 and @scenario2) (by default browser would be chrome): 92 | 93 | **$ mvn test** 94 | 95 | To run test with configurable browser (for firefox, use -Dbrowser=firefox) 96 | 97 | **$ mvn test -Dbrowser=chrome** 98 | 99 | To run tests headlessly 100 | 101 | **$ mvn test -Dheadless=yes** 102 | 103 | To run specific scenario: 104 | 105 | **$ mvn test -Dcucumber.options="--tags @scenario2"** 106 | 107 | To run multiple mentioned scenarios: 108 | 109 | **$ mvn test -Dcucumber.options="--tags @scenario1,@scenario2"** 110 | -------------------------------------------------------------------------------- /README.md~: -------------------------------------------------------------------------------- 1 | # selenium_BDD_framework 2 | 3 | 4 | Behavioural driven development automation framework using selenium, cucumber-java, testng, maven, phantomjs 5 | 6 | 7 | 8 | Tools and technologies used: 9 | 10 | 1. Language: Java 8 11 | 2. Testing framework: Testng 12 | 3. BDD framework: Cucumber jvm 13 | 4. Automation tool: Selenium webdriver 14 | 5. Build tool: maven 15 | 6. Logging: log4j 16 | 7. Headless browser: Phantomjs 17 | 18 | Setting up the project: 19 | $ cd selenium_BDD_framework 20 | $ mvn clean install 21 | 22 | 23 | Running the tests: There are 2 scenarios named as @scenario1 and @scenario2. Ran the tests on chrome54.0, firefox46 on ubuntu 14.04 64 bit 24 | 25 | To run both scenarios (@scenario1 and @scenario2) (by default browser would be chrome): 26 | $ mvn test 27 | 28 | To run test with configurable browser (for firefox, use -Dbrowser=firefox) 29 | $ mvn test -Dbrowser=chrome 30 | 31 | To run tests headlessly 32 | $ mvn test -Dheadless=yes 33 | 34 | To run specific scenario: 35 | $ mvn test -Dcucumber.options="--tags @scenario3" 36 | 37 | To run multiple mentioned scenarios: 38 | $ mvn test -Dcucumber.options="--tags @scenario3,@scenario2" 39 | 40 | 41 | Features of the framework: 42 | 1. BDD framework using Cucumber-jvm. Features can be written easily using Given,When, Then etc. 43 | 2. Browser(chrome/firefox) can be configured at run time from command line. 44 | 3. Test can run in headless browser (Phantomjs), if required. 45 | 4. Screenshot would be taken if any scenario failed and saved under /outputFiles folder. 46 | 5. Html report gets generated after each test run and can be found /target/cucumber-html-report/index.html 47 | 48 | 49 | 50 | 51 | Features package: It contains all different scenarios (tests) files 52 | 53 | Framework: Contains framework level code which can be reused 54 | 55 | Package: logger : It contains Log.java class which contains methods to show the logs on console and save the logs in LogFile.txt of each run. 56 | 57 | Logic: contains all the classes where actions and assertions happens. Also, has class to start the execution. 58 | 59 | 60 | 61 | OutputFiles: All the output files will be stored here (screenshots/csv/txt files) 62 | 63 | 64 | Pages: It has web elements corresponding to the specific page. 65 | 66 | 67 | 68 | Index.html will have execution report as follows: 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image1.png -------------------------------------------------------------------------------- /images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image12.png -------------------------------------------------------------------------------- /images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image13.png -------------------------------------------------------------------------------- /images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image14.png -------------------------------------------------------------------------------- /images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image2.png -------------------------------------------------------------------------------- /images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image3.png -------------------------------------------------------------------------------- /images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image4.png -------------------------------------------------------------------------------- /images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image5.png -------------------------------------------------------------------------------- /images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image6.png -------------------------------------------------------------------------------- /images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image7.png -------------------------------------------------------------------------------- /images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image8.png -------------------------------------------------------------------------------- /images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/images/image9.png -------------------------------------------------------------------------------- /libs/chromedriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/libs/chromedriver -------------------------------------------------------------------------------- /libs/phantomjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/libs/phantomjs -------------------------------------------------------------------------------- /phantomjsdriver.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/phantomjsdriver.log -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | bdd-framework 6 | test 7 | 0.0.1-SNAPSHOT 8 | jar 9 | 10 | selenium-bdd-framework 11 | http://maven.apache.org 12 | 13 | 14 | UTF-8 15 | 16 | 17 | 18 | 19 | 20 | org.apache.httpcomponents 21 | httpclient 22 | 4.5.13 23 | 24 | 25 | 26 | 27 | 28 | com.codeborne 29 | phantomjsdriver 30 | 1.3.0 31 | 32 | 33 | 34 | 35 | log4j 36 | log4j 37 | 1.2.17 38 | 39 | 40 | 41 | org.seleniumhq.selenium 42 | selenium-java 43 | 3.141.59 44 | 45 | 46 | 47 | info.cukes 48 | cucumber-java 49 | 1.2.4 50 | test 51 | 52 | 53 | info.cukes 54 | cucumber-junit 55 | 1.2.4 56 | test 57 | 58 | 59 | info.cukes 60 | cucumber-picocontainer 61 | 1.2.4 62 | test 63 | 64 | 65 | 66 | io.github.bonigarcia 67 | webdrivermanager 68 | 4.2.2 69 | test 70 | 71 | 72 | 73 | 74 | info.cukes 75 | cucumber-testng 76 | 1.2.2 77 | 78 | 79 | org.seleniumhq.selenium 80 | selenium-remote-driver 81 | 3.141.59 82 | 83 | 84 | org.testng 85 | testng 86 | 6.9.9 87 | 88 | 89 | 90 | 91 | 92 | 93 | org.apache.maven.plugins 94 | maven-surefire-plugin 95 | 2.19 96 | 97 | 98 | ./testng.xml 99 | 100 | 101 | 102 | 103 | org.apache.maven.plugins 104 | maven-compiler-plugin 105 | 3.2 106 | 107 | 1.8 108 | 1.8 109 | 110 | 111 | 112 | browser 113 | ${browser} 114 | 115 | 116 | 117 | 118 | 119 | headless 120 | ${headless} 121 | 122 | 123 | 124 | 125 | 126 | net.masterthought 127 | maven-cucumber-reporting 128 | 2.8.0 129 | 130 | 131 | execution 132 | test 133 | 134 | generate 135 | 136 | 137 | Cucumber-Reporting 138 | ${project.build.directory}/cucumber-report 139 | ${project.build.directory}/cucumber.json 140 | true 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /src/test/java/features/scenario1.feature: -------------------------------------------------------------------------------- 1 | @scenario1 2 | 3 | 4 | Feature: search for selenium bdd frameworks on google and save the title and url of the results in CSV file 5 | 6 | 7 | Scenario: search selenium bdd frameworks on google 8 | 9 | Given user is on google search page "https://www.google.co.in" 10 | And searches for "selenium bdd framework" 11 | When user clicks on search button 12 | Then the results should be displayed and saved in csv file -------------------------------------------------------------------------------- /src/test/java/features/scenario2.feature: -------------------------------------------------------------------------------- 1 | @scenario2 2 | 3 | 4 | Feature: selenium bdd frameworks images on google 5 | 6 | 7 | Scenario: search selenium bdd frameworks images on google search 8 | 9 | Given user is on google search page "https://www.google.co.in" 10 | And searches for "selenium bdd framework" 11 | And user clicks on search button 12 | When user clicks on image tab 13 | Then the results images should be displayed -------------------------------------------------------------------------------- /src/test/java/framework/Assertions.java: -------------------------------------------------------------------------------- 1 | package framework; 2 | import java.io.File; 3 | import java.io.IOException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.GregorianCalendar; 6 | 7 | import logger.Log; 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 | import org.testng.Assert; 14 | import org.testng.Reporter; 15 | 16 | /** 17 | * All the validation methods and method to take screenshot 18 | * are defined in this class. 19 | */ 20 | public class Assertions { 21 | public boolean testCaseStatus = true; 22 | private WebDriver driver; 23 | private File file; 24 | private String testScreenshotDir; 25 | boolean testStatus; 26 | 27 | public Assertions(WebDriver driver) { 28 | file = new File(""); 29 | testScreenshotDir = file.getAbsoluteFile() 30 | + "//src//test//java//outputFiles//"; 31 | this.driver = driver; 32 | 33 | } 34 | 35 | /** 36 | * method to take screenshot 37 | * @return path where screenshot has been saved 38 | */ 39 | public String screenShot() { 40 | String screenshotPath = "screenshot" + new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss") 41 | .format(new GregorianCalendar().getTime()) 42 | + ".png"; 43 | 44 | System.out.println(screenshotPath); 45 | File scrFile = ((TakesScreenshot) driver) 46 | .getScreenshotAs(OutputType.FILE); 47 | try { 48 | FileUtils.copyFile(scrFile, new File( testScreenshotDir + screenshotPath)); 49 | } catch (IOException e) { 50 | // TODO Auto-generated catch block 51 | e.printStackTrace(); 52 | screenshotPath = ""; 53 | } 54 | return screenshotPath; 55 | } 56 | 57 | /** 58 | * overloaded method to take screenshot with desired screenshot name passed 59 | * @param message string passed to save as name of a screenshot 60 | */ 61 | public void screenShot(String message) { 62 | String screenshotPath = message+ "screenshot" + new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss") 63 | .format(new GregorianCalendar().getTime())+ 64 | ".png"; 65 | 66 | System.out.println(screenshotPath); 67 | File scrFile = ((TakesScreenshot) driver) 68 | .getScreenshotAs(OutputType.FILE); 69 | try { 70 | FileUtils.copyFile(scrFile, new File( testScreenshotDir + screenshotPath)); 71 | } catch (IOException e) { 72 | // TODO Auto-generated catch block 73 | e.printStackTrace(); 74 | screenshotPath = ""; 75 | } 76 | } 77 | 78 | 79 | /** 80 | * method to verify the actual value with expected value 81 | * @param actual actual text displayed 82 | * @param expected expected text to be displayed 83 | * @param message message should be displayed on failure of assertion 84 | */ 85 | public boolean verifyEquals(Object actual, Object expected, String message, boolean screenshotOnFailure, boolean exitOnFailure) { 86 | testStatus=true; 87 | Reporter.log("
"); 88 | try { 89 | Assert.assertEquals(actual, expected, message); 90 | Reporter.log(" PASS " + message); 91 | 92 | } catch (AssertionError e) { 93 | 94 | testStatus = false; 95 | 96 | if (screenshotOnFailure) { 97 | 98 | Reporter.log( " FAIL " + message + " Actual: "+ actual + " Expected: " + expected 99 | + " Please check the screenshot " +" here " ); 101 | 102 | } 103 | 104 | if (exitOnFailure) { 105 | Reporter.log("
"); 106 | Reporter.log("Exiting this function as exitOnFail flag is set to True. Will move to next test."); 107 | throw e; 108 | } 109 | 110 | Reporter.log( " FAIL " + message + " Actual: "+ actual + " Expected: " + expected); 111 | 112 | } 113 | return testStatus; 114 | } 115 | 116 | 117 | /** 118 | * method to verify if the condition is true 119 | * @param condition statement to verify 120 | * @param message message should be displayed on failure of assertion 121 | * @param screenshotOnFailure true if screenshot has to be taken in case of failure 122 | * @param exitOnFailure true if execution to be stopped in case of failure 123 | * @return true if assertion passes, false if fails 124 | */ 125 | public boolean verifyTrue(boolean condition, String message, 126 | boolean screenshotOnFailure, boolean exitOnFailure) { 127 | 128 | Reporter.log("
"); 129 | 130 | try { 131 | 132 | Assert.assertTrue(condition, message); 133 | Reporter.log(" PASS " + message); 134 | 135 | } catch (AssertionError e) { 136 | Log.info(message); 137 | this.testCaseStatus = false; 138 | 139 | 140 | if (screenshotOnFailure) { 141 | Reporter.log( " FAIL " + message + " Actual: FALSE Expected: TRUE." 142 | + " Please check the screenshot " +" here " ); 144 | 145 | } else { 146 | 147 | Reporter.log(" FAIL " + message); 148 | 149 | } 150 | 151 | if (exitOnFailure) { 152 | Reporter.log("
"); 153 | 154 | Reporter.log("Exiting this function as exitOnFail flag is set to True."); 155 | 156 | throw e; 157 | 158 | } 159 | 160 | } 161 | 162 | return this.testCaseStatus; 163 | } 164 | 165 | 166 | } 167 | 168 | 169 | -------------------------------------------------------------------------------- /src/test/java/framework/CommonMethods.java: -------------------------------------------------------------------------------- 1 | package framework; 2 | 3 | 4 | import java.io.BufferedReader; 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.IOException; 8 | import java.io.InputStreamReader; 9 | import java.util.List; 10 | import java.util.Properties; 11 | import java.util.regex.Matcher; 12 | import java.util.regex.Pattern; 13 | import org.openqa.selenium.Alert; 14 | import org.openqa.selenium.By; 15 | import org.openqa.selenium.JavascriptExecutor; 16 | import org.openqa.selenium.NoAlertPresentException; 17 | import org.openqa.selenium.NoSuchElementException; 18 | import org.openqa.selenium.TimeoutException; 19 | import org.openqa.selenium.WebDriver; 20 | import org.openqa.selenium.WebElement; 21 | import org.openqa.selenium.interactions.Actions; 22 | import org.openqa.selenium.support.ui.ExpectedConditions; 23 | import org.openqa.selenium.support.ui.Select; 24 | import org.openqa.selenium.support.ui.WebDriverWait; 25 | import logger.Log; 26 | 27 | 28 | /** 29 | * This class contains all the methods required by selenium 30 | * to perform actions on webelement. It is a repository so 31 | * that same code need not to be written again. 32 | * @author shanky 33 | * 34 | */ 35 | public class CommonMethods extends Assertions { 36 | 37 | WebDriver driver = null; 38 | public final int timeOut = 45; 39 | Properties configProp = new Properties(); 40 | protected FileInputStream configFis; 41 | protected File file = new File(""); 42 | 43 | public CommonMethods(WebDriver driver) throws IOException{ 44 | super(driver); 45 | this.driver = driver; 46 | } 47 | 48 | 49 | 50 | /** 51 | * method to open specified url 52 | * @param url to open 53 | */ 54 | //Step to navigate to specified URL 55 | public void get(String url){ 56 | driver.get(url); 57 | } 58 | 59 | 60 | /** 61 | * method to navigate to specified page 62 | * @param url navigation url 63 | */ 64 | public void navigate(String url){ 65 | driver.navigate().to(url); 66 | } 67 | 68 | /** 69 | * method to click on an element with action class 70 | * @param element to be clicked 71 | */ 72 | public void clickOnElementUsingActions(By element){ 73 | Actions actions = new Actions(driver); 74 | actions.moveToElement(driver.findElement(element)); 75 | actions.click().perform(); 76 | } 77 | 78 | 79 | /** 80 | * method to click on an element using javascript 81 | * @param element to be clicked 82 | */ 83 | public void clickOnElementUsingJs(By element){ 84 | JavascriptExecutor js = (JavascriptExecutor) driver; 85 | WebElement webElement = driver.findElement(element); 86 | js.executeScript("arguments[0].click();", webElement); 87 | } 88 | 89 | 90 | 91 | /** 92 | * method to get int part from a string 93 | * @param getInt string passed 94 | * @return 95 | */ 96 | public int getIntValue(String getInt){ 97 | Pattern intsOnly = Pattern.compile("\\d+"); 98 | Matcher makeMatch = intsOnly.matcher(getInt); 99 | makeMatch.find(); 100 | String inputInt = makeMatch.group(); 101 | return Integer.parseInt(inputInt); 102 | } 103 | 104 | 105 | /** 106 | * method to get title of current webpage 107 | * @return String name of a webpage 108 | */ 109 | public String getTitle(){ 110 | return driver.getTitle(); 111 | } 112 | 113 | /** 114 | * method to wait until page is loaded completely 115 | * @param PageName String name of current webpage 116 | */ 117 | public void waitForPageToLoad(String PageName) { 118 | String pageLoadStatus; 119 | JavascriptExecutor js; 120 | 121 | do { 122 | js = (JavascriptExecutor) driver; 123 | pageLoadStatus = (String)js.executeScript("return document.readyState"); 124 | Log.info("."); 125 | } while ( !pageLoadStatus.equals("complete") ); 126 | Log.info(PageName + " page loaded successfully"); 127 | } 128 | 129 | 130 | /** 131 | * method verify whether element is present on screen 132 | * @param targetElement element to be present 133 | * @return true if element is present else throws exception 134 | * @throws InterruptedException Thrown when a thread is waiting, sleeping, 135 | * or otherwise occupied, and the thread is interrupted, either before 136 | * or during the activity. 137 | */ 138 | public Boolean isElementPresent(By targetElement) throws InterruptedException{ 139 | Boolean isPresent = driver.findElements(targetElement).size() > 0; 140 | return isPresent; 141 | } 142 | 143 | 144 | /** 145 | * method verify whether element is not present on screen 146 | * @param targetElement element not to be present 147 | * @return true if element is not present else throws exception 148 | * @throws InterruptedException Thrown when a thread is waiting, sleeping, 149 | * or otherwise occupied, and the thread is interrupted, either before 150 | * or during the activity. 151 | */ 152 | public Boolean isElementNotPresent(By targetElement) throws InterruptedException{ 153 | Boolean isPresent = (driver.findElements(targetElement).size() == 0); 154 | return isPresent; 155 | } 156 | 157 | 158 | /** 159 | * method to wait for an element to be visible 160 | * @param targetElement element to be visible 161 | * @return true if element is visible else throws TimeoutException 162 | */ 163 | public boolean waitForVisibility(By targetElement) { 164 | try{ 165 | WebDriverWait wait = new WebDriverWait(driver, timeOut); 166 | wait.until(ExpectedConditions.visibilityOfElementLocated(targetElement)); 167 | return true; 168 | } 169 | catch(TimeoutException e ){ 170 | System.out.println("Element is not visible: " + targetElement ); 171 | System.out.println(); 172 | System.out.println(e.getMessage()); 173 | throw new TimeoutException(); 174 | 175 | } 176 | } 177 | 178 | /** 179 | * method to wait for an element to be clickable 180 | * @param targetElement element to be clickable 181 | * @return true if element is clickable else throws TimeoutException 182 | */ 183 | public boolean waitForElementToBeClickable(By targetElement) { 184 | try{ 185 | WebDriverWait wait = new WebDriverWait(driver, timeOut); 186 | wait.until(ExpectedConditions.elementToBeClickable(targetElement)); 187 | return true; 188 | } 189 | catch(TimeoutException e ){ 190 | System.out.println("Element is not clickable: " + targetElement ); 191 | System.out.println(); 192 | System.out.println(e.getMessage()); 193 | throw new TimeoutException(); 194 | 195 | } 196 | } 197 | 198 | 199 | /** 200 | * method to wait for an element until it is invisible 201 | * @param targetElement element to be invisible 202 | * @return true if element gets invisible else throws TimeoutException 203 | */ 204 | public boolean waitForInvisibility(By targetElement) { 205 | try{ 206 | WebDriverWait wait = new WebDriverWait(driver, timeOut); 207 | wait.until(ExpectedConditions.invisibilityOfElementLocated(targetElement)); 208 | return true; 209 | } 210 | catch(TimeoutException e ){ 211 | System.out.println("Element is still visible: " + targetElement ); 212 | System.out.println(); 213 | System.out.println(e.getMessage()); 214 | throw new TimeoutException(); 215 | 216 | } 217 | } 218 | 219 | 220 | /** 221 | * method to find an element 222 | * @param locator element to be found 223 | * @return WebElement if found else throws NoSuchElementException 224 | */ 225 | public WebElement findElement(By locator){ 226 | try { 227 | WebElement element = driver.findElement(locator); 228 | return element; 229 | } 230 | catch (NoSuchElementException e){ 231 | Log.logError(this.getClass().getName(), "findElement", "Element not found " + locator); 232 | throw new NoSuchElementException(e.getMessage()); 233 | } 234 | } 235 | 236 | /** 237 | * method to find all the elements of specific locator 238 | * @param locator element to be found 239 | * @return return the list of elements if found else throws NoSuchElementException 240 | */ 241 | public List findElements(By locator){ 242 | try { 243 | List element = driver.findElements(locator); 244 | return element; 245 | } 246 | catch (NoSuchElementException e){ 247 | Log.logError(this.getClass().getName(), "findElements", "element not found" + locator); 248 | throw new NoSuchElementException(e.getMessage()); 249 | } 250 | } 251 | 252 | /** 253 | * method to match value with list elements and click on it 254 | * @param fetchedListElements List of fetched value 255 | * @param valueToBeMatched value to be matched with list elements 256 | */ 257 | public void clickOnMatchingValue(List fetchedListElements, String valueToBeMatched){ 258 | 259 | for (WebElement element : fetchedListElements) { 260 | if (element.getText().equalsIgnoreCase(valueToBeMatched)) { 261 | element.click(); 262 | return; 263 | } 264 | //System.out.println(element.getText() ); 265 | } 266 | } 267 | 268 | 269 | /** 270 | * method to check value contained in list elements and click on it 271 | * @param fetchedListElements List of fetched value 272 | * @param valueToBeContained value to be contained in list elements 273 | */ 274 | public void clickOnContainingValue(List fetchedListElements, String valueToBeContained){ 275 | 276 | for (WebElement element : fetchedListElements) { 277 | if (element.getText().toLowerCase().contains(valueToBeContained.toLowerCase())) { 278 | element.click(); 279 | //System.out.println("Trying to select: "+valueToBeContained ); 280 | return; 281 | } 282 | // System.out.println(element.getText() ); 283 | } 284 | } 285 | 286 | 287 | 288 | public static void runningShellCommand(String command) throws IOException, InterruptedException{ 289 | Runtime run = Runtime.getRuntime(); 290 | Process pr = run.exec(command); 291 | pr.waitFor(); 292 | BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream())); 293 | String line = ""; 294 | while ((line=buf.readLine())!=null) { 295 | Log.info(line); 296 | } 297 | } 298 | /** 299 | * method to accept alert, 300 | * exception is thrown if no alert is present 301 | */ 302 | public void acceptAlert(){ 303 | try { 304 | Alert alert = driver.switchTo().alert(); 305 | alert.accept(); 306 | 307 | 308 | } catch (NoAlertPresentException e){ 309 | throw new NoAlertPresentException(); 310 | } 311 | } 312 | 313 | 314 | /** 315 | * method to get message test of alert 316 | * @return message text which is displayed 317 | */ 318 | public String getAlertText() 319 | { 320 | try { 321 | Alert alert = driver.switchTo().alert(); 322 | String alertText = alert.getText(); 323 | return alertText; 324 | } catch (NoAlertPresentException e){ 325 | throw new NoAlertPresentException(); 326 | } 327 | } 328 | 329 | /** 330 | * method to verify if alert is present 331 | * @return returns true if alert is present else false 332 | */ 333 | public boolean isAlertPresent() 334 | { 335 | try 336 | { 337 | WebDriverWait wait = new WebDriverWait(driver, timeOut); 338 | wait.until(ExpectedConditions.alertIsPresent()); 339 | driver.switchTo().alert(); 340 | return true; 341 | } 342 | catch (NoAlertPresentException e) 343 | { 344 | throw new NoAlertPresentException(); 345 | } 346 | } 347 | 348 | 349 | /** 350 | * method to select a value from dropdown with index 351 | * @param selectLocator element with select tag 352 | * @param valueToBeSelectedindex index to be selected 353 | */ 354 | public void selectValuefromDropdownviaIndex(By selectLocator, int valueToBeSelectedindex){ 355 | Select selectFromDropdown = new Select(findElement(selectLocator)); 356 | selectFromDropdown.selectByIndex(valueToBeSelectedindex); 357 | 358 | } 359 | 360 | 361 | 362 | 363 | } 364 | 365 | -------------------------------------------------------------------------------- /src/test/java/framework/CreateSession.java: -------------------------------------------------------------------------------- 1 | package framework; 2 | 3 | import cucumber.api.Scenario; 4 | import cucumber.api.java.After; 5 | import cucumber.api.java.Before; 6 | import io.github.bonigarcia.wdm.WebDriverManager; 7 | import logger.Log; 8 | import org.apache.commons.io.FileUtils; 9 | import org.openqa.selenium.OutputType; 10 | import org.openqa.selenium.Platform; 11 | import org.openqa.selenium.TakesScreenshot; 12 | import org.openqa.selenium.WebDriver; 13 | import org.openqa.selenium.chrome.ChromeDriver; 14 | import org.openqa.selenium.firefox.FirefoxDriver; 15 | import org.openqa.selenium.phantomjs.PhantomJSDriver; 16 | import org.openqa.selenium.phantomjs.PhantomJSDriverService; 17 | import org.openqa.selenium.remote.DesiredCapabilities; 18 | import java.io.File; 19 | import java.text.SimpleDateFormat; 20 | import java.util.GregorianCalendar; 21 | 22 | 23 | /** 24 | * This class contains wedriver creation and quitting methods. These are required while 25 | * running each and every scenario. Methods are defined under @Before and @After hooks 26 | * to get initialized at start and end of the test. 27 | * @author shanky 28 | * 29 | */ 30 | public class CreateSession { 31 | 32 | /** 33 | * ThreadLocal variable which contains the webdriver instance which is used to perform browser interactions with. 34 | */ 35 | private static ThreadLocal webDriver = new ThreadLocal(); 36 | 37 | /** 38 | * method to create webdriver instance. 39 | * @throws InterruptedException 40 | */ 41 | @Before 42 | public static void createDriver() { 43 | 44 | // browser name value passed from command line 45 | String browserName = System.getProperty("browser"); 46 | 47 | // headless value passed from command line 48 | String headless =System.getProperty("headless"); 49 | 50 | DesiredCapabilities capability = new DesiredCapabilities(); 51 | 52 | // if browser name value is not passed from commandline then by default test would run on chrome 53 | if (browserName == null) 54 | browserName = "chrome"; 55 | 56 | // initializing the browser if headless paramter sent as yes, initialize phantomjs 57 | if( headless != null && headless.equalsIgnoreCase("yes")){ 58 | 59 | System.setProperty("phantomjs.binary.path", "libs//phantomjs"); 60 | String user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"; 61 | DesiredCapabilities cap = DesiredCapabilities.phantomjs(); 62 | cap.setCapability(PhantomJSDriverService.PHANTOMJS_PAGE_SETTINGS_PREFIX + "userAgent", user_agent); 63 | cap.setCapability(PhantomJSDriverService.PHANTOMJS_PAGE_SETTINGS_PREFIX + "loadImages", true); 64 | cap.setCapability(PhantomJSDriverService.PHANTOMJS_PAGE_SETTINGS_PREFIX + "javascriptEnabled", true); 65 | 66 | // Start phantomjs driver 67 | webDriver.set(new PhantomJSDriver(cap)); 68 | 69 | 70 | } 71 | // if browser name passed as firefox 72 | else if(browserName.equalsIgnoreCase("Firefox")){ 73 | WebDriverManager.firefoxdriver().setup(); 74 | capability.setBrowserName("Firefox"); 75 | webDriver.set(new FirefoxDriver()); 76 | 77 | } 78 | // if browser name passed as chrome 79 | else if(browserName.equalsIgnoreCase("chrome")){ 80 | String OS = System.getProperty("os.name"); 81 | if(OS.contains("Windows")) 82 | { 83 | WebDriverManager.chromedriver().setup(); 84 | capability.setBrowserName("Chrome"); 85 | capability.setPlatform(Platform.WIN8_1); 86 | webDriver.set(new ChromeDriver()); 87 | } 88 | else if(OS.contains("Linux")) 89 | { 90 | WebDriverManager.chromedriver().setup(); 91 | capability.setBrowserName("Chrome"); 92 | capability.setPlatform(Platform.LINUX); 93 | webDriver.set(new ChromeDriver()); 94 | } 95 | else if(OS.contains("Mac")) 96 | { 97 | WebDriverManager.chromedriver().setup(); 98 | capability.setBrowserName("Chrome"); 99 | capability.setPlatform(Platform.MAC); 100 | webDriver.set(new ChromeDriver()); 101 | } 102 | } 103 | getWebDriver().manage().window().maximize(); 104 | 105 | } 106 | 107 | 108 | 109 | 110 | /** 111 | * @return the webdriver for the current thread 112 | */ 113 | public static WebDriver getWebDriver() { 114 | System.out.println("WebDriver: " + webDriver.get()); 115 | return webDriver.get(); 116 | } 117 | 118 | /** 119 | * method executes at the end of each scenario and takes screenshot in case of scenario failure. 120 | * Also, quit the webdriver 121 | * @param scenario to verify if scenarios has passed or failed 122 | */ 123 | @After 124 | public void teardown(Scenario scenario){ 125 | 126 | // Here will compare if test is failing then only it will enter into if condition 127 | 128 | if(scenario.isFailed()) 129 | { 130 | try 131 | { 132 | // Create reference of TakesScreenshot 133 | TakesScreenshot ts=(TakesScreenshot) getWebDriver(); 134 | 135 | // Call method to capture screenshot 136 | File source=ts.getScreenshotAs(OutputType.FILE); 137 | 138 | FileUtils.copyFile(source, new File(".//src//test//java//outputFiles//"+ "FailScreenshot" + 139 | new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss") 140 | .format(new GregorianCalendar().getTime()) 141 | + ".png")); 142 | Log.info("Scenario failed and screenshot saved in outputFiles folder"); 143 | } 144 | catch (Exception e) 145 | { 146 | 147 | Log.info("Exception while taking screenshot "+e.getMessage()); 148 | 149 | } 150 | } 151 | 152 | 153 | 154 | Log.info("Shutting down driver" + "\n" + "----------------------------------------------"); 155 | System.out.println("\n"); 156 | // quitting the webdriver 157 | getWebDriver().quit(); 158 | } 159 | 160 | 161 | 162 | } 163 | -------------------------------------------------------------------------------- /src/test/java/framework/TestRunner.java: -------------------------------------------------------------------------------- 1 | package framework; 2 | 3 | 4 | import org.junit.runner.RunWith; 5 | 6 | import cucumber.api.CucumberOptions; 7 | import cucumber.api.junit.Cucumber; 8 | import cucumber.api.testng.AbstractTestNGCucumberTests; 9 | 10 | 11 | @RunWith(Cucumber.class) 12 | @CucumberOptions ( 13 | monochrome = true, 14 | features = "src/test/java/features", 15 | glue = {"logic","framework"}, 16 | plugin = {"pretty","json:target/cucumber.json", "html:target/cucumber-html-report"}, 17 | tags = {"~@Ignore"} 18 | ) 19 | public class TestRunner extends AbstractTestNGCucumberTests { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger= INFO 2 | #log4j.appender.Console =org.apache.log4j.ConsoleAppender 3 | #log4j.appender.Console.layout=org.apache.log4j.PatternLayout -------------------------------------------------------------------------------- /src/test/java/logger/Log.java: -------------------------------------------------------------------------------- 1 | package logger; 2 | 3 | import java.io.IOException; 4 | import org.apache.log4j.ConsoleAppender; 5 | import org.apache.log4j.FileAppender; 6 | import org.apache.log4j.Level; 7 | import org.apache.log4j.Logger; 8 | import org.apache.log4j.PatternLayout; 9 | 10 | /** 11 | * contains all the methods to show the logs on console 12 | * and save the logs in LogFile.txt of each run. 13 | 14 | */ 15 | public class Log 16 | { 17 | 18 | private static final Logger LOGGER = Logger.getLogger("logger"); 19 | private static PatternLayout layout = new PatternLayout("%d{dd MMM yyyy HH:mm:ss} %5p %c{1} - %m%n"); 20 | private static FileAppender appender; 21 | private static ConsoleAppender consoleAppender; 22 | 23 | static 24 | { 25 | try 26 | { 27 | consoleAppender = new ConsoleAppender(layout, "System.out"); 28 | appender= new FileAppender(layout,"LogFile.txt",true); 29 | } 30 | catch (IOException exception) 31 | { 32 | exception.printStackTrace(); 33 | } 34 | } 35 | 36 | /** 37 | * method to display errors in log. 38 | * @param className name of class in which error occurred. 39 | * @param methodName name of method in which error occurred. 40 | * @param exception stack trace of exception 41 | */ 42 | public static void logError (String className,String methodName,String exception) 43 | { 44 | LOGGER.addAppender(appender); 45 | LOGGER.setLevel((Level) Level.INFO); 46 | LOGGER.info("ClassName :"+className); 47 | LOGGER.info("MethodName :"+methodName ); 48 | LOGGER.info("Exception :" +exception); 49 | LOGGER.info("-----------------------------------------------------------------------------------"); 50 | } 51 | 52 | /** 53 | * method to display information in logs 54 | * @param message message to be displayed 55 | */ 56 | public static void info(String message){ 57 | consoleAppender.setName("Console"); 58 | LOGGER.addAppender(consoleAppender); 59 | LOGGER.addAppender(appender); 60 | LOGGER.setLevel((Level) Level.INFO); 61 | LOGGER.info(message); 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /src/test/java/logic/HomePageHelper.java: -------------------------------------------------------------------------------- 1 | package logic; 2 | 3 | import cucumber.api.java.en.And; 4 | import cucumber.api.java.en.Given; 5 | import cucumber.api.java.en.Then; 6 | import cucumber.api.java.en.When; 7 | import framework.CreateSession; 8 | import org.openqa.selenium.WebDriver; 9 | import org.openqa.selenium.WebElement; 10 | import pages.Homepage; 11 | 12 | import java.io.File; 13 | import java.io.FileWriter; 14 | import java.io.IOException; 15 | import java.io.PrintWriter; 16 | import java.util.List; 17 | 18 | /** 19 | * This class contains methods to perform action on home page. 20 | * @author shanky 21 | * 22 | */ 23 | public class HomePageHelper { 24 | 25 | Homepage homepage; 26 | WebDriver driver ; 27 | String url; 28 | String csvFilePath; 29 | FileWriter writer; 30 | File file; 31 | PrintWriter pw; 32 | 33 | 34 | public HomePageHelper() throws IOException{ 35 | driver = CreateSession.getWebDriver(); 36 | homepage = new Homepage(driver); 37 | csvFilePath = ".//src//test//java//outputFiles//searchResults.csv"; 38 | } 39 | 40 | 41 | /** 42 | * method to open the mentioned url 43 | */ 44 | @Given("^user is on google search page \"([^\"]*)\"$") 45 | public void user_is_on_google_search_page_something(String url) throws Throwable { 46 | homepage.get(url); 47 | } 48 | 49 | /** 50 | * method to search the required string on google search 51 | * @param stringtoBeSearched value to be searched 52 | * @throws Throwable 53 | */ 54 | @And("^searches for \"([^\"]*)\"$") 55 | public void searches_for_something(String stringtoBeSearched) throws Throwable { 56 | homepage.waitForPageToLoad(homepage.getTitle()); 57 | homepage.waitForVisibility(homepage.searchbox); 58 | homepage.findElement(homepage.searchbox).sendKeys(stringtoBeSearched); 59 | } 60 | 61 | 62 | /** 63 | * method to click on search button 64 | * @throws Throwable 65 | */ 66 | @When("^user clicks on search button$") 67 | public void user_clicks_on_search_button() throws Throwable { 68 | homepage.waitForPageToLoad("Google"); 69 | homepage.waitForElementToBeClickable(homepage.searchButton); 70 | homepage.clickOnElementUsingJs(homepage.searchButton); 71 | } 72 | 73 | 74 | 75 | /** 76 | * saving the results title and link in the csv file present under outputFiles folder 77 | * @throws Throwable 78 | */ 79 | @Then("^the results should be displayed and saved in csv file$") 80 | public void the_results_should_be_displayed_and_saved_in_csv_file() throws Throwable { 81 | homepage.waitForPageToLoad(homepage.getTitle()); 82 | homepage.waitForVisibility(homepage.searchResults); 83 | List allSearchResults = homepage.findElements(homepage.searchResults); 84 | 85 | try{ 86 | 87 | file = new File(csvFilePath); 88 | 89 | if (!file.exists()) 90 | file.createNewFile(); 91 | pw = new PrintWriter(new File(csvFilePath)); 92 | StringBuilder sb = new StringBuilder(); 93 | 94 | 95 | //for header 96 | sb.append("Title"); 97 | sb.append(" , "); 98 | sb.append("Link"); 99 | sb.append('\n'); 100 | 101 | // writing the required data to CSV file 102 | for (WebElement result : allSearchResults){ 103 | 104 | sb.append(result.getText()); 105 | sb.append(" , "); 106 | sb.append(result.getAttribute("href")); 107 | sb.append('\n'); 108 | } 109 | 110 | pw.write(sb.toString()); 111 | 112 | } 113 | catch(Exception e) { 114 | System.out.println("Error while writing to csv file !!!"); 115 | e.printStackTrace(); 116 | } finally { 117 | try { 118 | pw.flush(); 119 | pw.close(); 120 | } catch (Exception e) { 121 | 122 | System.out.println("Error while flushing/closing fileWriter !!!"); 123 | 124 | e.printStackTrace(); 125 | } 126 | } 127 | } 128 | 129 | /** 130 | * method to click on image button on google search page 131 | * @throws Throwable 132 | */ 133 | @When("^user clicks on image tab$") 134 | public void user_clicks_on_image_tab() throws Throwable { 135 | homepage.waitForPageToLoad("Google Images"); 136 | homepage.waitForElementToBeClickable(homepage.imagesButton); 137 | homepage.clickOnElementUsingJs(homepage.imagesButton); 138 | } 139 | 140 | /** 141 | * method to verify if images are displayed in result 142 | * @throws Throwable 143 | */ 144 | @Then("^the results images should be displayed$") 145 | public void the_results_images_should_be_displayed() throws Throwable { 146 | homepage.waitForPageToLoad(homepage.getTitle()); 147 | homepage.waitForVisibility(homepage.imageContainer); 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /src/test/java/outputFiles/searchResults.csv: -------------------------------------------------------------------------------- 1 | Title , Link 2 | Selenium Framework | ATDD, BDD & TDD , http://www.seleniumframework.com/cucumber-2/make-a-case/atdd-tdd-bdd/ 3 | Behavior Driven Development - ToolsQA , http://toolsqa.com/cucumber/behavior-driven-development/ 4 | Behavior-driven Development with Selenium WebDriver | PACKT Books , https://www.packtpub.com/books/content/behavior-driven-development-selenium-webdriver 5 | Automation Testing Using Cucumber Tool and Selenium – Selenium ... , http://www.softwaretestinghelp.com/cucumber-bdd-tool-selenium-tutorial-30/ 6 | What is TDD, BDD & ATDD ? – Assert Selenium , http://www.assertselenium.com/atdd/difference-between-tdd-bdd-atdd/ 7 | Road To Automation: Java WebDriver BDD framework using ... , http://roadtoautomation.blogspot.com/2013/11/java-webdriver-bdd-framework-using.html 8 | BDD Cucumber & Selenium - YouTube , https://www.youtube.com/watch?v=CfkbkCnIvIQ 9 | Brief comparison of BDD frameworks - DZone DevOps , https://dzone.com/articles/brief-comparison-bdd 10 | Automated testing with Selenium and Cucumber - IBM , https://www.ibm.com/developerworks/library/a-automating-ria/ 11 | On Test Automation | Writing BDD tests using Selenium and Cucumber , http://www.ontestautomation.com/writing-bdd-tests-using-selenium-and-cucumber/ 12 | -------------------------------------------------------------------------------- /src/test/java/pages/Homepage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebDriver; 7 | import framework.CommonMethods; 8 | 9 | /** 10 | * class to interact with page 11 | * @author shanky 12 | * 13 | * This class has web elements of homepage which are used by HomePageHelper 14 | */ 15 | public class Homepage extends CommonMethods { 16 | 17 | 18 | public Homepage(WebDriver driver) throws IOException { 19 | super(driver); 20 | // TODO Auto-generated constructor stub 21 | } 22 | 23 | 24 | public By searchbox = By.name("q"); 25 | public By searchButton = By.xpath("(//input[@value='Google Search'])[2]"); 26 | public By searchResults = By.xpath("//div[@id='tvcap']//div//div//a"); 27 | public By imagesButton = By.xpath("//a[@data-sc='I']"); 28 | public By imageContainer = By.id("islmp"); 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /test-output/Suite/assignment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: assignment 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

assignment

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/1/0
Started on:Sun Nov 13 20:12:04 IST 2016
Total time:0 seconds (607 ms)
Included groups:
Excluded groups:

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

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 93 | 179 | 180 | 181 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
run_cukes
Test class: logic.TestRunner
Test method: Runs Cucumber Features
79 | Show output 80 | 81 | Show all outputs 82 |
83 |
Feature File: scenario2.feature

84 |
Feature: Get total count of agents from India who can speak "HINDI, ENGLISH, ARABIC"

85 |
Scenario: Agents from India speaking "HINDI, ENGLISH, ARABIC"

86 |
Given user is on property finder site of UAE (skipped)

87 |
And user clicks on "FIND AGENTS" tab (skipped)

88 |
And user searches for agents who can speak "HINDI" , "ENGLISH", "ARABIC" and note down the agents count (skipped)

89 |
And note down count after filtering out agents from "India" (skipped)

90 |
Then count of agents should be less than previous count (skipped)

91 |
92 |
cucumber.runtime.CucumberException: java.lang.NoClassDefFoundError: org/openqa/selenium/browserlaunchers/Proxies
 94 | 	at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48)
 95 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14)
 96 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19)
 97 | Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/browserlaunchers/Proxies
 98 | 	at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:178)
 99 | 	at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:99)
100 | 	at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:89)
101 | 	at logic.CreateSession.webDriver(CreateSession.java:64)
102 | 	at cucumber.runtime.Utils$1.call(Utils.java:37)
103 | 	at cucumber.runtime.Timeout.timeout(Timeout.java:13)
104 | 	at cucumber.runtime.Utils.invoke(Utils.java:31)
105 | 	at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
106 | 	at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:223)
107 | 	at cucumber.runtime.Runtime.runHooks(Runtime.java:211)
108 | 	at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:201)
109 | 	at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
110 | 	at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
111 | 	at cucumber.runtime.Runtime.run(Runtime.java:121)
112 | 	at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:43)
113 | 	... 28 more
114 | Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.browserlaunchers.Proxies
115 | 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
116 | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
117 | 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
118 | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
119 | 	... 47 more
120 | ... Removed 30 stack frames
Click to show all stack frames 121 |
cucumber.runtime.CucumberException: java.lang.NoClassDefFoundError: org/openqa/selenium/browserlaunchers/Proxies
122 | 	at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48)
123 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14)
124 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
125 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
126 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
127 | 	at java.lang.reflect.Method.invoke(Method.java:498)
128 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
129 | 	at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:196)
130 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19)
131 | 	at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:208)
132 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:635)
133 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
134 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
135 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
136 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
137 | 	at org.testng.TestRunner.privateRun(TestRunner.java:774)
138 | 	at org.testng.TestRunner.run(TestRunner.java:624)
139 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
140 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
141 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
142 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:261)
143 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
144 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
145 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
146 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
147 | 	at org.testng.TestNG.run(TestNG.java:1048)
148 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
149 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
150 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
151 | Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/browserlaunchers/Proxies
152 | 	at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:178)
153 | 	at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:99)
154 | 	at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:89)
155 | 	at logic.CreateSession.webDriver(CreateSession.java:64)
156 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
157 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
158 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
159 | 	at java.lang.reflect.Method.invoke(Method.java:498)
160 | 	at cucumber.runtime.Utils$1.call(Utils.java:37)
161 | 	at cucumber.runtime.Timeout.timeout(Timeout.java:13)
162 | 	at cucumber.runtime.Utils.invoke(Utils.java:31)
163 | 	at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
164 | 	at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:223)
165 | 	at cucumber.runtime.Runtime.runHooks(Runtime.java:211)
166 | 	at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:201)
167 | 	at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
168 | 	at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
169 | 	at cucumber.runtime.Runtime.run(Runtime.java:121)
170 | 	at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:43)
171 | 	... 28 more
172 | Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.browserlaunchers.Proxies
173 | 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
174 | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
175 | 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
176 | 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
177 | 	... 47 more
178 | 
0logic.TestRunner@6dc17b83

182 | 183 | -------------------------------------------------------------------------------- /test-output/Suite/assignment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | (PhantomJSDriver.java:99) 13 | at org.openqa.selenium.phantomjs.PhantomJSDriver.(PhantomJSDriver.java:89) 14 | at logic.CreateSession.webDriver(CreateSession.java:64) 15 | at cucumber.runtime.Utils$1.call(Utils.java:37) 16 | at cucumber.runtime.Timeout.timeout(Timeout.java:13) 17 | at cucumber.runtime.Utils.invoke(Utils.java:31) 18 | at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60) 19 | at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:223) 20 | at cucumber.runtime.Runtime.runHooks(Runtime.java:211) 21 | at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:201) 22 | at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40) 23 | at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165) 24 | at cucumber.runtime.Runtime.run(Runtime.java:121) 25 | at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:43) 26 | ... 28 more 27 | Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.browserlaunchers.Proxies 28 | at java.net.URLClassLoader.findClass(URLClassLoader.java:381) 29 | at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 30 | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) 31 | at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 32 | ... 47 more 33 | ... Removed 30 stack frames]]> 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /test-output/Suite/selenium-bdd-framework.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: selenium-bdd-framework 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

selenium-bdd-framework

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/1/0
Started on:Tue Nov 22 12:57:10 IST 2016
Total time:5 seconds (5604 ms)
Included groups:
Excluded groups:

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

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 92 | 180 | 181 | 182 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
run_cukes
Test class: logic.TestRunner
Test method: Runs Cucumber Features
79 | Show output 80 | 81 | Show all outputs 82 |
83 |
Feature File: scenario2.feature

84 |
Feature: selenium bdd frameworks images on google

85 |
Scenario: search selenium bdd frameworks images on google search

86 |
Given user is on google search page "https://www.google.co.in" (passed : 2s)

87 |
And searches for "selenium bdd framework" (passed : 0s)

88 |
When user clicks on image tab (failed : 1s)

89 |
Then the results images should be displayed (skipped)

90 |
91 |
cucumber.runtime.CucumberException: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b>
 93 |   (Session info: chrome=54.0.2840.71)
 94 |   (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
 95 | Command duration or timeout: 32 milliseconds
 96 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
 97 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91'
 98 | Driver info: org.openqa.selenium.chrome.ChromeDriver
 99 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
100 | Session ID: 3563e211dac74102d5ded7e1d5177bb9
101 | 	at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48)
102 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14)
103 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19)
104 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b>
105 |   (Session info: chrome=54.0.2840.71)
106 |   (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
107 | Command duration or timeout: 32 milliseconds
108 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
109 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91'
110 | Driver info: org.openqa.selenium.chrome.ChromeDriver
111 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
112 | Session ID: 3563e211dac74102d5ded7e1d5177bb9
113 | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
114 | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
115 | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
116 | 	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327)
117 | 	at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85)
118 | 	at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123)
119 | 	at ✽.When user clicks on image tab(scenario2.feature:11)
120 | ... Removed 30 stack frames
Click to show all stack frames 121 |
cucumber.runtime.CucumberException: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b>
122 |   (Session info: chrome=54.0.2840.71)
123 |   (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
124 | Command duration or timeout: 32 milliseconds
125 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
126 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91'
127 | Driver info: org.openqa.selenium.chrome.ChromeDriver
128 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
129 | Session ID: 3563e211dac74102d5ded7e1d5177bb9
130 | 	at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48)
131 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14)
132 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
133 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
134 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
135 | 	at java.lang.reflect.Method.invoke(Method.java:498)
136 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
137 | 	at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:196)
138 | 	at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19)
139 | 	at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:208)
140 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:635)
141 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
142 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
143 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
144 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
145 | 	at org.testng.TestRunner.privateRun(TestRunner.java:774)
146 | 	at org.testng.TestRunner.run(TestRunner.java:624)
147 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
148 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
149 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
150 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:261)
151 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
152 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
153 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
154 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
155 | 	at org.testng.TestNG.run(TestNG.java:1048)
156 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
157 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
158 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
159 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b>
160 |   (Session info: chrome=54.0.2840.71)
161 |   (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
162 | Command duration or timeout: 32 milliseconds
163 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
164 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91'
165 | Driver info: org.openqa.selenium.chrome.ChromeDriver
166 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
167 | Session ID: 3563e211dac74102d5ded7e1d5177bb9
168 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
169 | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
170 | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
171 | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
172 | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
173 | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
174 | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
175 | 	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327)
176 | 	at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85)
177 | 	at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123)
178 | 	at ✽.When user clicks on image tab(scenario2.feature:11)
179 | 
5logic.TestRunner@18eed359

183 | 184 | -------------------------------------------------------------------------------- /test-output/Suite/selenium-bdd-framework.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | ... 15 | (Session info: chrome=54.0.2840.71) 16 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 17 | Command duration or timeout: 32 milliseconds 18 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 19 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 20 | Driver info: org.openqa.selenium.chrome.ChromeDriver 21 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 22 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 23 | at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48) 24 | at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14) 25 | at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19) 26 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: ... 27 | (Session info: chrome=54.0.2840.71) 28 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 29 | Command duration or timeout: 32 milliseconds 30 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 31 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 32 | Driver info: org.openqa.selenium.chrome.ChromeDriver 33 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 34 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 35 | at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 36 | at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 37 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 38 | at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) 39 | at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) 40 | at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123) 41 | at ✽.When user clicks on image tab(scenario2.feature:11) 42 | ... Removed 30 stack frames]]> 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /test-output/Suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test-output/bullet_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/test-output/bullet_point.png -------------------------------------------------------------------------------- /test-output/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/test-output/collapseall.gif -------------------------------------------------------------------------------- /test-output/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | TestNG Report
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Suite
selenium-bdd-framework0015,604
ClassMethodStartTime (ms)
Suite
selenium-bdd-framework — failed
logic.TestRunnerrun_cukes14797996310105583

selenium-bdd-framework

logic.TestRunner#run_cukes

Messages
<div "featureFile">Feature File: scenario2.feature</div>
<div "feature">Feature: selenium bdd frameworks images on google</div>
<div "scenario">Scenario: search selenium bdd frameworks images on google search</div>
<div "result">Given user is on google search page &quot;https:&#x2F;&#x2F;www.google.co.in&quot; (passed : 2s)</div>
<div "result">And searches for &quot;selenium bdd framework&quot; (passed : 0s)</div>
<div "result">When user clicks on image tab (failed : 1s)</div>
<div "result">Then the results images should be displayed (skipped)</div>
Exception
cucumber.runtime.CucumberException: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b> 3 | (Session info: chrome=54.0.2840.71) 4 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 5 | Command duration or timeout: 32 milliseconds 6 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 7 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 8 | Driver info: org.openqa.selenium.chrome.ChromeDriver 9 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 10 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 11 | at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48) 12 | at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14) 13 | at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19) 14 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b> 15 | (Session info: chrome=54.0.2840.71) 16 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 17 | Command duration or timeout: 32 milliseconds 18 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 19 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 20 | Driver info: org.openqa.selenium.chrome.ChromeDriver 21 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 22 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 23 | at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 24 | at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 25 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 26 | at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) 27 | at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) 28 | at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123) 29 | at ✽.When user clicks on image tab(scenario2.feature:11) 30 | ... Removed 30 stack frames

back to summary

-------------------------------------------------------------------------------- /test-output/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/test-output/failed.png -------------------------------------------------------------------------------- /test-output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG reports 6 | 7 | 8 | 9 | 10 | 11 | 17 | 20 | 21 | 22 | 23 |
24 | Test results 25 |
26 | 1 suite, 1 failed test 27 |
28 | 116 |
117 |
118 |
119 |
120 |
121 | 122 | logic.TestRunner 123 |
124 |
125 |
126 |
127 | 128 | 129 | run_cukes 130 |
cucumber.runtime.CucumberException: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b> 131 | (Session info: chrome=54.0.2840.71) 132 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 133 | Command duration or timeout: 32 milliseconds 134 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 135 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 136 | Driver info: org.openqa.selenium.chrome.ChromeDriver 137 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 138 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 139 | at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48) 140 | at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14) 141 | at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19) 142 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: <b>...</b> 143 | (Session info: chrome=54.0.2840.71) 144 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 145 | Command duration or timeout: 32 milliseconds 146 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 147 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 148 | Driver info: org.openqa.selenium.chrome.ChromeDriver 149 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 150 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 151 | at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 152 | at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 153 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 154 | at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) 155 | at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) 156 | at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123) 157 | at ✽.When user clicks on image tab(scenario2.feature:11) 158 | ... Removed 30 stack frames 159 |
160 | 161 | (Runs Cucumber Features) 162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 | /home/shanky/workspace/Selenium-BDD-framework/bdd_UIFramework/testng.xml 170 |
171 |
172 |
173 | <?xml version="1.0" encoding="UTF-8"?>
174 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
175 | <suite guice-stage="DEVELOPMENT" name="Suite">
176 |   <test name="selenium-bdd-framework">
177 |     <packages>
178 |       <package name="logic"/>
179 |     </packages>
180 |     <classes>
181 |       <class name="logic.HomePageHelper"/>
182 |       <class name="logic.TestRunner"/>
183 |       <class name="logic.CreateSession"/>
184 |     </classes>
185 |   </test> <!-- selenium-bdd-framework -->
186 | </suite> <!-- Suite -->
187 |             
188 |
189 |
190 |
191 |
192 | Tests for Suite 193 |
194 |
195 |
    196 |
  • 197 | selenium-bdd-framework (3 classes) 198 |
  • 199 |
200 |
201 |
202 |
203 |
204 | Groups for Suite 205 |
206 |
207 |
208 | cucumber 209 |
210 |
211 | run_cukes 212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 | Times for Suite 220 |
221 |
222 |
223 | 240 | Total running time: 5 seconds 241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 | Reporter output for Suite 249 |
250 |
251 |
252 | run_cukes 253 |
254 |
Feature File: scenario2.feature
255 |
Feature: selenium bdd frameworks images on google
256 |
Scenario: search selenium bdd frameworks images on google search
257 |
Given user is on google search page "https://www.google.co.in" (passed : 2s)
258 |
And searches for "selenium bdd framework" (passed : 0s)
259 |
When user clicks on image tab (failed : 1s)
260 |
Then the results images should be displayed (skipped)
261 |
262 |
263 |
264 |
265 |
266 |
267 | 0 ignored methods 268 |
269 |
270 |
271 |
272 |
273 |
274 | Methods in chronological order 275 |
276 |
277 |
278 |
logic.TestRunner
279 |
280 | 281 | 282 | run_cukes 283 | 0 ms 284 |
285 |
286 |
287 |
288 |
289 | 290 | 291 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-logic.CukesRunnerTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-logic.TestRunner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | ... 15 | (Session info: chrome=54.0.2840.71) 16 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 17 | Command duration or timeout: 32 milliseconds 18 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 19 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 20 | Driver info: org.openqa.selenium.chrome.ChromeDriver 21 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 22 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 23 | at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48) 24 | at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14) 25 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 26 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 27 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 28 | at java.lang.reflect.Method.invoke(Method.java:498) 29 | at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) 30 | at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:196) 31 | at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19) 32 | at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:208) 33 | at org.testng.internal.Invoker.invokeMethod(Invoker.java:635) 34 | at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816) 35 | at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124) 36 | at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) 37 | at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) 38 | at org.testng.TestRunner.privateRun(TestRunner.java:774) 39 | at org.testng.TestRunner.run(TestRunner.java:624) 40 | at org.testng.SuiteRunner.runTest(SuiteRunner.java:359) 41 | at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354) 42 | at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312) 43 | at org.testng.SuiteRunner.run(SuiteRunner.java:261) 44 | at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 45 | at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) 46 | at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215) 47 | at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) 48 | at org.testng.TestNG.run(TestNG.java:1048) 49 | at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126) 50 | at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137) 51 | at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58) 52 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: ... 53 | (Session info: chrome=54.0.2840.71) 54 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 55 | Command duration or timeout: 32 milliseconds 56 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 57 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 58 | Driver info: org.openqa.selenium.chrome.ChromeDriver 59 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 60 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 61 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 62 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 63 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 64 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 65 | at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 66 | at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 67 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 68 | at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) 69 | at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) 70 | at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123) 71 | at ✽.When user clicks on image tab(scenario2.feature:11) 72 | ]]> 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /test-output/navigator-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/test-output/navigator-bullet.png -------------------------------------------------------------------------------- /test-output/old/Suite/assignment.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=assignment] -------------------------------------------------------------------------------- /test-output/old/Suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
Class nameMethod nameGroups
logic.TestRunner  
@Test
 run_cukescucumber
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
30 | -------------------------------------------------------------------------------- /test-output/old/Suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

2 | 3 |
Group nameMethods
cucumberAbstractTestNGCucumberTests.run_cukes()[pri:0, instance:logic.TestRunner@18eed359]
4 | -------------------------------------------------------------------------------- /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 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
16/11/22 12:57:11 0      run_cukesmain@1568059495
7 | -------------------------------------------------------------------------------- /test-output/old/Suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

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

Methods run, sorted chronologically

>> means before, << means after


Suite

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

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
16/11/22 12:57:11 0      run_cukesmain@1568059495
7 | -------------------------------------------------------------------------------- /test-output/old/Suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

2 | 3 | 4 | 5 | 6 | 7 | 8 |
Feature File: scenario2.feature
Feature: selenium bdd frameworks images on google
Scenario: search selenium bdd frameworks images on google search
Given user is on google search page "https://www.google.co.in" (passed : 2s)
And searches for "selenium bdd framework" (passed : 0s)
When user clicks on image tab (failed : 1s)
Then the results images should be displayed (skipped)
-------------------------------------------------------------------------------- /test-output/old/Suite/selenium-bdd-framework.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=selenium-bdd-framework] -------------------------------------------------------------------------------- /test-output/old/Suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Suite">
  <test name="selenium-bdd-framework">
    <packages>
      <package name="logic"/>
    </packages>
    <classes>
      <class name="logic.HomePageHelper"/>
      <class name="logic.TestRunner"/>
      <class name="logic.CreateSession"/>
    </classes>
  </test> <!-- selenium-bdd-framework -->
</suite> <!-- Suite -->
-------------------------------------------------------------------------------- /test-output/old/Suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Suite 4 | 5 | 6 | 7 | 8 |

Results for
Suite

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

29 |

25 |
selenium-bdd-framework (0/1/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /test-output/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | Test results 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total010 
Suite010Link
10 | -------------------------------------------------------------------------------- /test-output/passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/test-output/passed.png -------------------------------------------------------------------------------- /test-output/skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shankybnl/selenium_BDD_framework/ce5e3e5db255b64fa9005ab20392618d1c0b1c2f/test-output/skipped.png -------------------------------------------------------------------------------- /test-output/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test-output/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px 0px 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0px; 7 | } 8 | 9 | li { 10 | list-style-type: none; 11 | } 12 | 13 | a { 14 | text-decoration: none; 15 | } 16 | 17 | a:hover { 18 | text-decoration: underline; 19 | } 20 | 21 | .navigator-selected { 22 | background: #ffa500; 23 | } 24 | 25 | .wrapper { 26 | position: absolute; 27 | top: 60px; 28 | bottom: 0; 29 | left: 400px; 30 | right: 0; 31 | overflow: auto; 32 | } 33 | 34 | .navigator-root { 35 | position: absolute; 36 | top: 60px; 37 | bottom: 0; 38 | left: 0; 39 | width: 400px; 40 | overflow-y: auto; 41 | } 42 | 43 | .suite { 44 | margin: 0px 10px 10px 0px; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times; 52 | } 53 | 54 | .main-panel-header { 55 | padding: 5px; 56 | background-color: #9FB4D9; //afeeee; 57 | font-family: monospace; 58 | font-size: 18px; 59 | } 60 | 61 | .main-panel-content { 62 | padding: 5px; 63 | margin-bottom: 10px; 64 | background-color: #DEE8FC; //d0ffff; 65 | } 66 | 67 | .rounded-window { 68 | border-radius: 10px; 69 | border-style: solid; 70 | border-width: 1px; 71 | } 72 | 73 | .rounded-window-top { 74 | border-top-right-radius: 10px 10px; 75 | border-top-left-radius: 10px 10px; 76 | border-style: solid; 77 | border-width: 1px; 78 | overflow: auto; 79 | } 80 | 81 | .light-rounded-window-top { 82 | border-top-right-radius: 10px 10px; 83 | border-top-left-radius: 10px 10px; 84 | } 85 | 86 | .rounded-window-bottom { 87 | border-style: solid; 88 | border-width: 0px 1px 1px 1px; 89 | border-bottom-right-radius: 10px 10px; 90 | border-bottom-left-radius: 10px 10px; 91 | overflow: auto; 92 | } 93 | 94 | .method-name { 95 | font-size: 12px; 96 | font-family: monospace; 97 | } 98 | 99 | .method-content { 100 | border-style: solid; 101 | border-width: 0px 0px 1px 0px; 102 | margin-bottom: 10; 103 | padding-bottom: 5px; 104 | width: 80%; 105 | } 106 | 107 | .parameters { 108 | font-size: 14px; 109 | font-family: monospace; 110 | } 111 | 112 | .stack-trace { 113 | white-space: pre; 114 | font-family: monospace; 115 | font-size: 12px; 116 | font-weight: bold; 117 | margin-top: 0px; 118 | margin-left: 20px; 119 | } 120 | 121 | .testng-xml { 122 | font-family: monospace; 123 | } 124 | 125 | .method-list-content { 126 | margin-left: 10px; 127 | } 128 | 129 | .navigator-suite-content { 130 | margin-left: 10px; 131 | font: 12px 'Lucida Grande'; 132 | } 133 | 134 | .suite-section-title { 135 | margin-top: 10px; 136 | width: 80%; 137 | border-style: solid; 138 | border-width: 1px 0px 0px 0px; 139 | font-family: Times; 140 | font-size: 18px; 141 | font-weight: bold; 142 | } 143 | 144 | .suite-section-content { 145 | list-style-image: url(bullet_point.png); 146 | } 147 | 148 | .top-banner-root { 149 | position: absolute; 150 | top: 0; 151 | height: 45px; 152 | left: 0; 153 | right: 0; 154 | padding: 5px; 155 | margin: 0px 0px 5px 0px; 156 | background-color: #0066ff; 157 | font-family: Times; 158 | color: #fff; 159 | text-align: center; 160 | } 161 | 162 | .top-banner-title-font { 163 | font-size: 25px; 164 | } 165 | 166 | .test-name { 167 | font-family: 'Lucida Grande'; 168 | font-size: 16px; 169 | } 170 | 171 | .suite-icon { 172 | padding: 5px; 173 | float: right; 174 | height: 20; 175 | } 176 | 177 | .test-group { 178 | font: 20px 'Lucida Grande'; 179 | margin: 5px 5px 10px 5px; 180 | border-width: 0px 0px 1px 0px; 181 | border-style: solid; 182 | padding: 5px; 183 | } 184 | 185 | .test-group-name { 186 | font-weight: bold; 187 | } 188 | 189 | .method-in-group { 190 | font-size: 16px; 191 | margin-left: 80px; 192 | } 193 | 194 | table.google-visualization-table-table { 195 | width: 100%; 196 | } 197 | 198 | .reporter-method-name { 199 | font-size: 14px; 200 | font-family: monospace; 201 | } 202 | 203 | .reporter-method-output-div { 204 | padding: 5px; 205 | margin: 0px 0px 5px 20px; 206 | font-size: 12px; 207 | font-family: monospace; 208 | border-width: 0px 0px 0px 1px; 209 | border-style: solid; 210 | } 211 | 212 | .ignored-class-div { 213 | font-size: 14px; 214 | font-family: monospace; 215 | } 216 | 217 | .ignored-methods-div { 218 | padding: 5px; 219 | margin: 0px 0px 5px 20px; 220 | font-size: 12px; 221 | font-family: monospace; 222 | border-width: 0px 0px 0px 1px; 223 | border-style: solid; 224 | } 225 | 226 | .border-failed { 227 | border-top-left-radius: 10px 10px; 228 | border-bottom-left-radius: 10px 10px; 229 | border-style: solid; 230 | border-width: 0px 0px 0px 10px; 231 | border-color: #f00; 232 | } 233 | 234 | .border-skipped { 235 | border-top-left-radius: 10px 10px; 236 | border-bottom-left-radius: 10px 10px; 237 | border-style: solid; 238 | border-width: 0px 0px 0px 10px; 239 | border-color: #edc600; 240 | } 241 | 242 | .border-passed { 243 | border-top-left-radius: 10px 10px; 244 | border-bottom-left-radius: 10px 10px; 245 | border-style: solid; 246 | border-width: 0px 0px 0px 10px; 247 | border-color: #19f52d; 248 | } 249 | 250 | .times-div { 251 | text-align: center; 252 | padding: 5px; 253 | } 254 | 255 | .suite-total-time { 256 | font: 16px 'Lucida Grande'; 257 | } 258 | 259 | .configuration-suite { 260 | margin-left: 20px; 261 | } 262 | 263 | .configuration-test { 264 | margin-left: 40px; 265 | } 266 | 267 | .configuration-class { 268 | margin-left: 60px; 269 | } 270 | 271 | .configuration-method { 272 | margin-left: 80px; 273 | } 274 | 275 | .test-method { 276 | margin-left: 100px; 277 | } 278 | 279 | .chronological-class { 280 | background-color: #0ccff; 281 | border-style: solid; 282 | border-width: 0px 0px 1px 1px; 283 | } 284 | 285 | .method-start { 286 | float: right; 287 | } 288 | 289 | .chronological-class-name { 290 | padding: 0px 0px 0px 5px; 291 | color: #008; 292 | } 293 | 294 | .after, .before, .test-method { 295 | font-family: monospace; 296 | font-size: 14px; 297 | } 298 | 299 | .navigator-suite-header { 300 | font-size: 22px; 301 | margin: 0px 10px 5px 0px; 302 | background-color: #deb887; 303 | text-align: center; 304 | } 305 | 306 | .collapse-all-icon { 307 | padding: 5px; 308 | float: right; 309 | } 310 | -------------------------------------------------------------------------------- /test-output/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').click(function() { 3 | // Extract the panel for this link 4 | var panel = getPanelName($(this)); 5 | 6 | // Mark this link as currently selected 7 | $('.navigator-link').parent().removeClass('navigator-selected'); 8 | $(this).parent().addClass('navigator-selected'); 9 | 10 | showPanel(panel); 11 | }); 12 | 13 | installMethodHandlers('failed'); 14 | installMethodHandlers('skipped'); 15 | installMethodHandlers('passed', true); // hide passed methods by default 16 | 17 | $('a.method').click(function() { 18 | showMethod($(this)); 19 | return false; 20 | }); 21 | 22 | // Hide all the panels and display the first one (do this last 23 | // to make sure the click() will invoke the listeners) 24 | $('.panel').hide(); 25 | $('.navigator-link').first().click(); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').click(function() { 29 | var contents = $('.navigator-suite-content'); 30 | if (contents.css('display') == 'none') { 31 | contents.show(); 32 | } else { 33 | contents.hide(); 34 | } 35 | }); 36 | }); 37 | 38 | // The handlers that take care of showing/hiding the methods 39 | function installMethodHandlers(name, hide) { 40 | function getContent(t) { 41 | return $('.method-list-content.' + name + "." + t.attr('panel-name')); 42 | } 43 | 44 | function getHideLink(t, name) { 45 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); 46 | return $(s); 47 | } 48 | 49 | function getShowLink(t, name) { 50 | return $('a.show-methods.' + name + "." + t.attr('panel-name')); 51 | } 52 | 53 | function getMethodPanelClassSel(element, name) { 54 | var panelName = getPanelName(element); 55 | var sel = '.' + panelName + "-class-" + name; 56 | return $(sel); 57 | } 58 | 59 | $('a.hide-methods.' + name).click(function() { 60 | var w = getContent($(this)); 61 | w.hide(); 62 | getHideLink($(this), name).hide(); 63 | getShowLink($(this), name).show(); 64 | getMethodPanelClassSel($(this), name).hide(); 65 | }); 66 | 67 | $('a.show-methods.' + name).click(function() { 68 | var w = getContent($(this)); 69 | w.show(); 70 | getHideLink($(this), name).show(); 71 | getShowLink($(this), name).hide(); 72 | showPanel(getPanelName($(this))); 73 | getMethodPanelClassSel($(this), name).show(); 74 | }); 75 | 76 | if (hide) { 77 | $('a.hide-methods.' + name).click(); 78 | } else { 79 | $('a.show-methods.' + name).click(); 80 | } 81 | } 82 | 83 | function getHashForMethod(element) { 84 | return element.attr('hash-for-method'); 85 | } 86 | 87 | function getPanelName(element) { 88 | return element.attr('panel-name'); 89 | } 90 | 91 | function showPanel(panelName) { 92 | $('.panel').hide(); 93 | var panel = $('.panel[panel-name="' + panelName + '"]'); 94 | panel.show(); 95 | } 96 | 97 | function showMethod(element) { 98 | var hashTag = getHashForMethod(element); 99 | var panelName = getPanelName(element); 100 | showPanel(panelName); 101 | var current = document.location.href; 102 | var base = current.substring(0, current.indexOf('#')) 103 | document.location.href = base + '#' + hashTag; 104 | var newPosition = $(document).scrollTop() - 65; 105 | $(document).scrollTop(newPosition); 106 | } 107 | 108 | function drawTable() { 109 | for (var i = 0; i < suiteTableInitFunctions.length; i++) { 110 | window[suiteTableInitFunctions[i]](); 111 | } 112 | 113 | for (var k in window.suiteTableData) { 114 | var v = window.suiteTableData[k]; 115 | var div = v.tableDiv; 116 | var data = v.tableData 117 | var table = new google.visualization.Table(document.getElementById(div)); 118 | table.draw(data, { 119 | showRowNumber : false 120 | }); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /test-output/testng-results.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Feature File: scenario2.feature
]]> 6 | 7 | 8 | Feature: selenium bdd frameworks images on google]]> 9 | 10 | 11 | Scenario: search selenium bdd frameworks images on google search]]> 12 | 13 | 14 | Given user is on google search page "https://www.google.co.in" (passed : 2s)]]> 15 | 16 | 17 | And searches for "selenium bdd framework" (passed : 0s)]]> 18 | 19 | 20 | When user clicks on image tab (failed : 1s)]]> 21 | 22 | 23 | Then the results images should be displayed (skipped)]]> 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | ... 38 | (Session info: chrome=54.0.2840.71) 39 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 40 | Command duration or timeout: 32 milliseconds 41 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 42 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 43 | Driver info: org.openqa.selenium.chrome.ChromeDriver 44 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 45 | Session ID: 3563e211dac74102d5ded7e1d5177bb9]]> 46 | 47 | 48 | ... 49 | (Session info: chrome=54.0.2840.71) 50 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 51 | Command duration or timeout: 32 milliseconds 52 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 53 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 54 | Driver info: org.openqa.selenium.chrome.ChromeDriver 55 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 56 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 57 | at cucumber.api.testng.TestNGCucumberRunner.runCukes(TestNGCucumberRunner.java:48) 58 | at cucumber.api.testng.AbstractTestNGCucumberTests.run_cukes(AbstractTestNGCucumberTests.java:14) 59 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 60 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 61 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 62 | at java.lang.reflect.Method.invoke(Method.java:498) 63 | at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) 64 | at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:196) 65 | at cucumber.api.testng.AbstractTestNGCucumberTests.run(AbstractTestNGCucumberTests.java:19) 66 | at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:208) 67 | at org.testng.internal.Invoker.invokeMethod(Invoker.java:635) 68 | at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816) 69 | at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124) 70 | at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) 71 | at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) 72 | at org.testng.TestRunner.privateRun(TestRunner.java:774) 73 | at org.testng.TestRunner.run(TestRunner.java:624) 74 | at org.testng.SuiteRunner.runTest(SuiteRunner.java:359) 75 | at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354) 76 | at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312) 77 | at org.testng.SuiteRunner.run(SuiteRunner.java:261) 78 | at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 79 | at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) 80 | at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215) 81 | at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) 82 | at org.testng.TestNG.run(TestNG.java:1048) 83 | at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126) 84 | at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137) 85 | at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58) 86 | Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (277, 89). Other element would receive the click: ... 87 | (Session info: chrome=54.0.2840.71) 88 | (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information) 89 | Command duration or timeout: 32 milliseconds 90 | Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' 91 | System info: host: 'shanky-Lenovo-B40-70', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_91' 92 | Driver info: org.openqa.selenium.chrome.ChromeDriver 93 | Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e), userDataDir=/tmp/.org.chromium.Chromium.s0Nn88}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] 94 | Session ID: 3563e211dac74102d5ded7e1d5177bb9 95 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 96 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 97 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 98 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 99 | at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 100 | at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 101 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 102 | at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) 103 | at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) 104 | at logic.HomePageHelper.user_clicks_on_image_tab(HomePageHelper.java:123) 105 | at ✽.When user clicks on image tab(scenario2.feature:11) 106 | ]]> 107 | 108 | 109 | 110 | 111 | Feature File: scenario2.feature]]> 112 | 113 | 114 | Feature: selenium bdd frameworks images on google]]> 115 | 116 | 117 | Scenario: search selenium bdd frameworks images on google search]]> 118 | 119 | 120 | Given user is on google search page "https://www.google.co.in" (passed : 2s)]]> 121 | 122 | 123 | And searches for "selenium bdd framework" (passed : 0s)]]> 124 | 125 | 126 | When user clicks on image tab (failed : 1s)]]> 127 | 128 | 129 | Then the results images should be displayed (skipped)]]> 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | --------------------------------------------------------------------------------