├── .gitignore ├── .travis.yml ├── README.md ├── publish-gh-pages.sh └── webdriver-reporting ├── LICENSE.txt ├── pom.xml ├── release-notes.txt └── src ├── main ├── java │ └── ch │ │ └── vorburger │ │ └── webdriver │ │ └── reporting │ │ ├── LoggingTestWatchman.java │ │ ├── LoggingWebDriverEventListener.java │ │ └── TestCaseReportWriter.java └── resources │ └── ch │ └── vorburger │ └── webdriver │ └── reporting │ ├── index.html │ ├── jquery-1.4.2.min.js │ ├── jquery-ui-1.8.5.custom.css │ ├── jquery-ui-1.8.5.custom.min.js │ ├── style.css │ └── util.js └── test └── java └── ch └── vorburger └── webdriver └── reporting └── tests └── SampleGoogleSearchReportTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .project 3 | .classpath 4 | .settings 5 | .checkstyle 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | before_script: cd webdriver-reporting 3 | script: mvn -DskipTests clean install 4 | jdk: 5 | - openjdk6 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a small library which produces "Test Execution Reports", with Screenshots, Summary and some bells and whistles, 2 | for functional UI front-end tests written using Selenium 2.0 (AKA WebDriver) and JUnit. 3 | 4 | See [SampleGoogleSearchReportTest.java](https://github.com/vorburger/webdriver-reporting/blob/master/webdriver-reporting/src/test/java/ch/vorburger/webdriver/reporting/tests/SampleGoogleSearchReportTest.java) 5 | for a usage example. After running a (suite of) tests, you'll find an index.html report home page 6 | in the module's target/surefire-reports/tests directory, which [looks like this](http://www.vorburger.ch/webdriver-reporting/). 7 | 8 | Get the binary of it from [my Maven repo](https://github.com/vorburger/m2p2-repository), like this: 9 | ``` 10 | 11 | ch.vorburger.webdriver 12 | webdriver-reporting 13 | 1.1.0-SNAPSHOT 14 | 15 | 16 | ... 17 | 18 | 19 | vorburger-releases 20 | http://vorburger.github.com/m2p2-repository/maven/releases 21 | 22 | 23 | vorburger-snapshots 24 | http://vorburger.github.com/m2p2-repository/maven/snapshots 25 | 26 | 27 | ``` 28 | Deployment to this Maven repo is currently manual (no continous integration set-up yet).. 29 | so to get latest SNAPSHOT, you better do a clone of this repo (src) and "mvn install" it locally if you can. 30 | 31 | Please fork it on GitHub, improve it massively, and send pull requests! ;-) 32 | 33 | 34 | [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/vorburger/webdriver-reporting/trend.png)](https://bitdeli.com/free "Bitdeli Badge") 35 | 36 | -------------------------------------------------------------------------------- /publish-gh-pages.sh: -------------------------------------------------------------------------------- 1 | cd webdriver-reporting/ 2 | mvn clean test 3 | rm -rf /tmp/webdriver-sample-report/ 4 | mkdir /tmp/webdriver-sample-report/ 5 | cp -R target/webdriver-reporting/* /tmp/webdriver-sample-report/ 6 | git checkout gh-pages 7 | cp -R /tmp/webdriver-sample-report/* .. 8 | git commit -a -m "Updated sample report on gh-pages" 9 | # git push origin gh-pages 10 | # git checkout master 11 | 12 | -------------------------------------------------------------------------------- /webdriver-reporting/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | 204 | Apache License 205 | Version 2.0, January 2004 206 | http://www.apache.org/licenses/ 207 | 208 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 209 | 210 | 1. Definitions. 211 | 212 | "License" shall mean the terms and conditions for use, reproduction, 213 | and distribution as defined by Sections 1 through 9 of this document. 214 | 215 | "Licensor" shall mean the copyright owner or entity authorized by 216 | the copyright owner that is granting the License. 217 | 218 | "Legal Entity" shall mean the union of the acting entity and all 219 | other entities that control, are controlled by, or are under common 220 | control with that entity. For the purposes of this definition, 221 | "control" means (i) the power, direct or indirect, to cause the 222 | direction or management of such entity, whether by contract or 223 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 224 | outstanding shares, or (iii) beneficial ownership of such entity. 225 | 226 | "You" (or "Your") shall mean an individual or Legal Entity 227 | exercising permissions granted by this License. 228 | 229 | "Source" form shall mean the preferred form for making modifications, 230 | including but not limited to software source code, documentation 231 | source, and configuration files. 232 | 233 | "Object" form shall mean any form resulting from mechanical 234 | transformation or translation of a Source form, including but 235 | not limited to compiled object code, generated documentation, 236 | and conversions to other media types. 237 | 238 | "Work" shall mean the work of authorship, whether in Source or 239 | Object form, made available under the License, as indicated by a 240 | copyright notice that is included in or attached to the work 241 | (an example is provided in the Appendix below). 242 | 243 | "Derivative Works" shall mean any work, whether in Source or Object 244 | form, that is based on (or derived from) the Work and for which the 245 | editorial revisions, annotations, elaborations, or other modifications 246 | represent, as a whole, an original work of authorship. For the purposes 247 | of this License, Derivative Works shall not include works that remain 248 | separable from, or merely link (or bind by name) to the interfaces of, 249 | the Work and Derivative Works thereof. 250 | 251 | "Contribution" shall mean any work of authorship, including 252 | the original version of the Work and any modifications or additions 253 | to that Work or Derivative Works thereof, that is intentionally 254 | submitted to Licensor for inclusion in the Work by the copyright owner 255 | or by an individual or Legal Entity authorized to submit on behalf of 256 | the copyright owner. For the purposes of this definition, "submitted" 257 | means any form of electronic, verbal, or written communication sent 258 | to the Licensor or its representatives, including but not limited to 259 | communication on electronic mailing lists, source code control systems, 260 | and issue tracking systems that are managed by, or on behalf of, the 261 | Licensor for the purpose of discussing and improving the Work, but 262 | excluding communication that is conspicuously marked or otherwise 263 | designated in writing by the copyright owner as "Not a Contribution." 264 | 265 | "Contributor" shall mean Licensor and any individual or Legal Entity 266 | on behalf of whom a Contribution has been received by Licensor and 267 | subsequently incorporated within the Work. 268 | 269 | 2. Grant of Copyright License. Subject to the terms and conditions of 270 | this License, each Contributor hereby grants to You a perpetual, 271 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 272 | copyright license to reproduce, prepare Derivative Works of, 273 | publicly display, publicly perform, sublicense, and distribute the 274 | Work and such Derivative Works in Source or Object form. 275 | 276 | 3. Grant of Patent License. Subject to the terms and conditions of 277 | this License, each Contributor hereby grants to You a perpetual, 278 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 279 | (except as stated in this section) patent license to make, have made, 280 | use, offer to sell, sell, import, and otherwise transfer the Work, 281 | where such license applies only to those patent claims licensable 282 | by such Contributor that are necessarily infringed by their 283 | Contribution(s) alone or by combination of their Contribution(s) 284 | with the Work to which such Contribution(s) was submitted. If You 285 | institute patent litigation against any entity (including a 286 | cross-claim or counterclaim in a lawsuit) alleging that the Work 287 | or a Contribution incorporated within the Work constitutes direct 288 | or contributory patent infringement, then any patent licenses 289 | granted to You under this License for that Work shall terminate 290 | as of the date such litigation is filed. 291 | 292 | 4. Redistribution. You may reproduce and distribute copies of the 293 | Work or Derivative Works thereof in any medium, with or without 294 | modifications, and in Source or Object form, provided that You 295 | meet the following conditions: 296 | 297 | (a) You must give any other recipients of the Work or 298 | Derivative Works a copy of this License; and 299 | 300 | (b) You must cause any modified files to carry prominent notices 301 | stating that You changed the files; and 302 | 303 | (c) You must retain, in the Source form of any Derivative Works 304 | that You distribute, all copyright, patent, trademark, and 305 | attribution notices from the Source form of the Work, 306 | excluding those notices that do not pertain to any part of 307 | the Derivative Works; and 308 | 309 | (d) If the Work includes a "NOTICE" text file as part of its 310 | distribution, then any Derivative Works that You distribute must 311 | include a readable copy of the attribution notices contained 312 | within such NOTICE file, excluding those notices that do not 313 | pertain to any part of the Derivative Works, in at least one 314 | of the following places: within a NOTICE text file distributed 315 | as part of the Derivative Works; within the Source form or 316 | documentation, if provided along with the Derivative Works; or, 317 | within a display generated by the Derivative Works, if and 318 | wherever such third-party notices normally appear. The contents 319 | of the NOTICE file are for informational purposes only and 320 | do not modify the License. You may add Your own attribution 321 | notices within Derivative Works that You distribute, alongside 322 | or as an addendum to the NOTICE text from the Work, provided 323 | that such additional attribution notices cannot be construed 324 | as modifying the License. 325 | 326 | You may add Your own copyright statement to Your modifications and 327 | may provide additional or different license terms and conditions 328 | for use, reproduction, or distribution of Your modifications, or 329 | for any such Derivative Works as a whole, provided Your use, 330 | reproduction, and distribution of the Work otherwise complies with 331 | the conditions stated in this License. 332 | 333 | 5. Submission of Contributions. Unless You explicitly state otherwise, 334 | any Contribution intentionally submitted for inclusion in the Work 335 | by You to the Licensor shall be under the terms and conditions of 336 | this License, without any additional terms or conditions. 337 | Notwithstanding the above, nothing herein shall supersede or modify 338 | the terms of any separate license agreement you may have executed 339 | with Licensor regarding such Contributions. 340 | 341 | 6. Trademarks. This License does not grant permission to use the trade 342 | names, trademarks, service marks, or product names of the Licensor, 343 | except as required for reasonable and customary use in describing the 344 | origin of the Work and reproducing the content of the NOTICE file. 345 | 346 | 7. Disclaimer of Warranty. Unless required by applicable law or 347 | agreed to in writing, Licensor provides the Work (and each 348 | Contributor provides its Contributions) on an "AS IS" BASIS, 349 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 350 | implied, including, without limitation, any warranties or conditions 351 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 352 | PARTICULAR PURPOSE. You are solely responsible for determining the 353 | appropriateness of using or redistributing the Work and assume any 354 | risks associated with Your exercise of permissions under this License. 355 | 356 | 8. Limitation of Liability. In no event and under no legal theory, 357 | whether in tort (including negligence), contract, or otherwise, 358 | unless required by applicable law (such as deliberate and grossly 359 | negligent acts) or agreed to in writing, shall any Contributor be 360 | liable to You for damages, including any direct, indirect, special, 361 | incidental, or consequential damages of any character arising as a 362 | result of this License or out of the use or inability to use the 363 | Work (including but not limited to damages for loss of goodwill, 364 | work stoppage, computer failure or malfunction, or any and all 365 | other commercial damages or losses), even if such Contributor 366 | has been advised of the possibility of such damages. 367 | 368 | 9. Accepting Warranty or Additional Liability. While redistributing 369 | the Work or Derivative Works thereof, You may choose to offer, 370 | and charge a fee for, acceptance of support, warranty, indemnity, 371 | or other liability obligations and/or rights consistent with this 372 | License. However, in accepting such obligations, You may act only 373 | on Your own behalf and on Your sole responsibility, not on behalf 374 | of any other Contributor, and only if You agree to indemnify, 375 | defend, and hold each Contributor harmless for any liability 376 | incurred by, or claims asserted against, such Contributor by reason 377 | of your accepting any such warranty or additional liability. 378 | 379 | END OF TERMS AND CONDITIONS 380 | 381 | APPENDIX: How to apply the Apache License to your work. 382 | 383 | To apply the Apache License to your work, attach the following 384 | boilerplate notice, with the fields enclosed by brackets "[]" 385 | replaced with your own identifying information. (Don't include 386 | the brackets!) The text should be enclosed in the appropriate 387 | comment syntax for the file format. We also recommend that a 388 | file or class name and description of purpose be included on the 389 | same "printed page" as the copyright notice for easier 390 | identification within third-party archives. 391 | 392 | Copyright [yyyy] [name of copyright owner] 393 | 394 | Licensed under the Apache License, Version 2.0 (the "License"); 395 | you may not use this file except in compliance with the License. 396 | You may obtain a copy of the License at 397 | 398 | http://www.apache.org/licenses/LICENSE-2.0 399 | 400 | Unless required by applicable law or agreed to in writing, software 401 | distributed under the License is distributed on an "AS IS" BASIS, 402 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 403 | See the License for the specific language governing permissions and 404 | limitations under the License. 405 | 406 | 407 | ====================================== 408 | LICENSES FOR INCLUDED DEPENDENCIES 409 | ====================================== 410 | 411 | All the source code for the OpenJPA project is released under the 412 | license above. Additionally, the OpenJPA binary distribution 413 | includes a number of third-party files that are required in 414 | order to the software to function. Unless noted below, these jars 415 | and resource files are also released under the ASF license above. 416 | 417 | The exceptions are as follows: 418 | 419 | =========================== 420 | orm-xsd.rsrc - included in the openjpa jar, taken from: 421 | http://java.sun.com/xml/ns/persistence/orm_1_0.xsd) 422 | orm_2_0-xsd.rsrc - included in the openjpa jar, taken from: 423 | http://java.sun.com/xml/ns/persistence/orm_2_0.xsd) 424 | persistence-xsd.rsrc - included in the openjpa jar, taken from: 425 | http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd) 426 | persistence_2_0-xsd.rsrc - included in the openjpa jar, taken from: 427 | http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd) 428 | websphere-uow-api.jar - this jar file contains WebSphere proprietary 429 | API code which is licensed for use when compiling OpenJPA. The 430 | jar is not distributed with OpenJPA and is only included with the 431 | source archive in order to resolve compilation dependencies. 432 | =========================== 433 | 434 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 435 | 436 | 1. Definitions. 437 | 438 | 1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. 439 | 440 | 1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. 441 | 442 | 1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. 443 | 444 | 1.4. Executable means the Covered Software in any form other than Source Code. 445 | 446 | 1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. 447 | 448 | 1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. 449 | 450 | 1.7. License means this document. 451 | 452 | 1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 453 | 454 | 1.9. Modifications means the Source Code and Executable form of any of the following: 455 | 456 | A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; 457 | 458 | B. Any new file that contains any part of the Original Software or previous Modification; or 459 | 460 | C. Any new file that is contributed or otherwise made available under the terms of this License. 461 | 462 | 1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. 463 | 464 | 1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 465 | 466 | 1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. 467 | 468 | 1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)�the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)�ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 469 | 470 | 2. License Grants. 471 | 472 | 2.1. The Initial Developer Grant. 473 | Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: 474 | (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and 475 | (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). 476 | (c) The licenses granted in Sections�2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. 477 | (d) Notwithstanding Section�2.1(b) above, no patent license is granted: (1)�for code that You delete from the Original Software, or (2)�for infringements caused by: (i)�the modification of the Original Software, or (ii)�the combination of the Original Software with other software or devices. 478 | 479 | 2.2. Contributor Grant. 480 | Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: 481 | (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and 482 | (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)�Modifications made by that Contributor (or portions thereof); and (2)�the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). 483 | (c) The licenses granted in Sections�2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. 484 | (d) Notwithstanding Section�2.2(b) above, no patent license is granted: (1)�for any code that Contributor has deleted from the Contributor Version; (2)�for infringements caused by: (i)�third party modifications of Contributor Version, or (ii)�the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)�under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. 485 | 486 | 3. Distribution Obligations. 487 | 488 | 3.1. Availability of Source Code. 489 | 490 | Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. 491 | 492 | 3.2. Modifications. 493 | 494 | The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. 495 | 496 | 3.3. Required Notices. 497 | You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. 498 | 499 | 3.4. Application of Additional Terms. 500 | You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 501 | 502 | 3.5. Distribution of Executable Versions. 503 | You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 504 | 505 | 3.6. Larger Works. 506 | You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. 507 | 508 | 4. Versions of the License. 509 | 510 | 4.1. New Versions. 511 | Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. 512 | 513 | 4.2. Effect of New Versions. 514 | 515 | You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. 516 | 4.3. Modified Versions. 517 | 518 | When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)�rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)�otherwise make it clear that the license contains terms which differ from this License. 519 | 520 | 5. DISCLAIMER OF WARRANTY. 521 | 522 | COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 523 | 524 | 6. TERMINATION. 525 | 526 | 6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 527 | 528 | 6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections�2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. 529 | 530 | 6.3. In the event of termination under Sections�6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. 531 | 532 | 7. LIMITATION OF LIABILITY. 533 | 534 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 535 | 536 | 8. U.S. GOVERNMENT END USERS. 537 | 538 | The Covered Software is a commercial item, as that term is defined in 48�C.F.R.�2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. �252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48�C.F.R.�12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. 539 | 540 | 9. MISCELLANEOUS. 541 | 542 | This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. 543 | 544 | 10. RESPONSIBILITY FOR CLAIMS. 545 | 546 | As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 547 | 548 | NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) 549 | The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. 550 | 551 | 552 | serp-1.13.1.jar - BSD License 553 | ============================= 554 | 555 | Copyright (c) 2002, A. Abram White 556 | All rights reserved. 557 | 558 | Redistribution and use in source and binary forms, with or without 559 | modification, are permitted provided that the following conditions are met: 560 | 561 | * Redistributions of source code must retain the above copyright notice, this 562 | list of conditions and the following disclaimer. 563 | * Redistributions in binary form must reproduce the above copyright notice, 564 | this list of conditions and the following disclaimer in the documentation 565 | and/or other materials provided with the distribution. 566 | * Neither the name of 'serp' nor the names of its contributors may 567 | be used to endorse or promote products derived from this software without 568 | specific prior written permission. 569 | 570 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 571 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 572 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 573 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 574 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 575 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 576 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 577 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 578 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 579 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 580 | 581 | -------------------------------------------------------------------------------- /webdriver-reporting/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | ch.vorburger.webdriver 6 | webdriver-reporting 7 | 1.1.0-SNAPSHOT 8 | WebDriver HTML Reports 9 | Mini Framework (Tool) which builds HTML Reports from JUnit WebDriver runs 10 | jar 11 | 12 | https://github.com/vorburger/webdriver-reporting 13 | 14 | 15 | Apache License 2.0 16 | http://www.apache.org/licenses/LICENSE-2.0 17 | 18 | 19 | 20 | scm:git:https://github.com/vorburger/webdriver-reporting.git 21 | scm:git:https://vorburger@github.com/vorburger/webdriver-reporting.git 22 | https://github.com/vorburger/webdriver-reporting 23 | 24 | 25 | 26 | vorburger 27 | Michael Vorburger 28 | http://www.vorburger.ch 29 | michael.vorburger+webdriver-reporting-pom@gmail.com 30 | 31 | 32 | 2011 33 | 34 | 35 | 2.42.2 36 | ${project.build.directory}/repo 37 | 38 | 39 | 40 | 41 | org.seleniumhq.selenium 42 | selenium-java 43 | ${webDriver.version} 44 | 45 | 46 | 47 | 48 | junit 49 | junit 50 | 4.8.1 51 | 52 | 53 | 54 | 55 | 56 | 57 | org.apache.maven.plugins 58 | maven-compiler-plugin 59 | 2.3.2 60 | 61 | 1.6 62 | 1.6 63 | 64 | 65 | 66 | org.apache.maven.plugins 67 | maven-source-plugin 68 | 2.1.2 69 | 70 | 71 | attach-sources 72 | 73 | jar-no-fork 74 | 75 | 76 | 77 | 78 | 79 | org.apache.maven.plugins 80 | maven-javadoc-plugin 81 | 2.8 82 | 83 | 84 | 85 | http://kentbeck.github.com/junit/javadoc/latest/ 86 | 87 | 88 | 89 | 90 | attach-javadocs 91 | 92 | jar 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | deployToTargetFolder 103 | 104 | 105 | 106 | maven-deploy-plugin 107 | 2.7 108 | 109 | internal.repo::default::file://${built.repo.dir} 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /webdriver-reporting/release-notes.txt: -------------------------------------------------------------------------------- 1 | Simply do this, and change versions manually: 2 | 3 | $ mvn -DaltDeploymentRepository=snapshot-repo::default::file:../../github-vorburger-repository/maven-m2/snapshots/ clean deploy 4 | 5 | $ mvn -DaltDeploymentRepository=snapshot-repo::default::file:../../github-vorburger-repository/maven-m2/releases/ clean deploy 6 | 7 | ___ 8 | 9 | 10 | Doesn't really work... 11 | 12 | $ mvn -DdryRun=true clean release:clean release:prepare 13 | 14 | $ mvn release:prepare 15 | 16 | $ mvn release:stage -DstagingRepository=staging::default::file:../../github-vorburger-repository/maven-m2/releases/ 17 | INSTEAD of $ mvn release:perform 18 | 19 | $ mvn release:clean 20 | 21 | $ mvn release:rollback 22 | 23 | -------------------------------------------------------------------------------- /webdriver-reporting/src/main/java/ch/vorburger/webdriver/reporting/LoggingTestWatchman.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Michael Vorburger & other contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package ch.vorburger.webdriver.reporting; 18 | 19 | import java.io.PrintWriter; 20 | import java.io.StringWriter; 21 | import java.io.Writer; 22 | 23 | import org.junit.rules.TestWatchman; 24 | import org.junit.runners.model.FrameworkMethod; 25 | 26 | /** 27 | * JUnit (v4) Rule which logs all test failures, starts, and ends. 28 | * 29 | * Used like this: 30 | * 31 | *
 32 |  * public static class WatchmanTest {
 33 |  *
 34 |  *     @Rule
 35 |  *     public MethodRule logRule = new LoggingTestWatchman(...);
 36 |  *
 37 |  *     @Test
 38 |  *     public void fails() {
 39 |  *         fail("I'm a loser baby, so why don't you kill me?");
 40 |  *     }
 41 |  * 
42 | * 43 | * This class should not have any or WebDriver or actual Report Writing dependencies/imports, only JUnit. 44 | * 45 | * @author Michael Vorburger 46 | */ 47 | public class LoggingTestWatchman extends TestWatchman { 48 | 49 | private final TestCaseReportWriter reportWriter; 50 | 51 | public LoggingTestWatchman(TestCaseReportWriter reportWriter) { 52 | this.reportWriter = reportWriter; 53 | } 54 | 55 | @Override 56 | public void starting(FrameworkMethod method) { 57 | reportWriter.clearInfoString(); 58 | reportWriter.createNewTestReportFile(method, getReportFileName(method)); 59 | reportWriter.info("Start Test: " + testName(method)); 60 | reportWriter.getPackageName("Start Test: " + testName(method) + " :Package Name " + packageName(method)); 61 | reportWriter.addTestClassNameToJS(createPackageNamewithTestName(method)); 62 | } 63 | 64 | @Override 65 | public void finished(FrameworkMethod method) { 66 | reportWriter.info("End Test: " + testName(method)); 67 | } 68 | 69 | @Override 70 | public void failed(Throwable t, FrameworkMethod method) { 71 | reportWriter.info("STACKTRACE:" + getStackTrace(t)); 72 | reportWriter.info("Failed: " + testName(method)); 73 | reportWriter.addFailedTestClassNameToJS(createPackageNamewithTestName(method)); 74 | } 75 | 76 | @Override 77 | public void succeeded(FrameworkMethod method) { 78 | reportWriter.info("Test succeeded: " + testName(method)); 79 | super.succeeded(method); 80 | } 81 | 82 | private String getStackTrace(Throwable throwable) { 83 | Writer writer = new StringWriter(); 84 | PrintWriter printWriter = new PrintWriter(writer); 85 | throwable.printStackTrace(printWriter); 86 | return writer.toString(); 87 | } 88 | 89 | private String testName(FrameworkMethod method) { 90 | return method.getMethod().getDeclaringClass().getCanonicalName() + "." + method.getName(); 91 | } 92 | 93 | private String packageName(FrameworkMethod method) { 94 | return method.getMethod().getDeclaringClass().getPackage().getName(); 95 | } 96 | 97 | private String extractPackageName(String fullPackageName) { 98 | int indx = fullPackageName.lastIndexOf("."); 99 | fullPackageName = fullPackageName.substring(indx + 1, fullPackageName.length()); 100 | return fullPackageName.toUpperCase(); 101 | } 102 | 103 | private String getReportFileName(FrameworkMethod method) { 104 | return extractPackageName(packageName(method)) + "/" 105 | + getLogFileName(method.getMethod().getDeclaringClass().getCanonicalName(), 106 | method.getMethod().getDeclaringClass().getCanonicalName() 107 | + "." + method.getName()) 108 | + "_log.html"; 109 | } 110 | 111 | private String getLogFileName(String className, String methodName) { 112 | int indx = methodName.lastIndexOf("."); 113 | methodName = methodName.substring(indx + 1, methodName.length()); 114 | 115 | return methodName; 116 | } 117 | 118 | private String createPackageNamewithTestName(FrameworkMethod method) { 119 | String methodName = method.getName(); 120 | String packageName = extractPackageName(packageName(method)); 121 | return packageName + "." + methodName; 122 | } 123 | 124 | } 125 | -------------------------------------------------------------------------------- /webdriver-reporting/src/main/java/ch/vorburger/webdriver/reporting/LoggingWebDriverEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Michael Vorburger & other contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package ch.vorburger.webdriver.reporting; 18 | 19 | import java.io.File; 20 | 21 | import org.openqa.selenium.JavascriptExecutor; 22 | import org.openqa.selenium.OutputType; 23 | import org.openqa.selenium.StaleElementReferenceException; 24 | import org.openqa.selenium.TakesScreenshot; 25 | import org.openqa.selenium.WebDriver; 26 | import org.openqa.selenium.WebDriverException; 27 | import org.openqa.selenium.WebElement; 28 | import org.openqa.selenium.support.events.AbstractWebDriverEventListener; 29 | import org.openqa.selenium.support.events.EventFiringWebDriver; 30 | 31 | 32 | /** 33 | * A WebDriverEventListener which logs method calls. 34 | * 35 | * This class should not have any JUnit or I/O dependencies/imports, only WebDriver. 36 | * 37 | * @author Michael Vorburger 38 | */ 39 | public class LoggingWebDriverEventListener extends AbstractWebDriverEventListener { 40 | 41 | private final TestCaseReportWriter clsObj; 42 | 43 | public LoggingWebDriverEventListener(TestCaseReportWriter object) { 44 | clsObj = object; 45 | } 46 | 47 | @Override 48 | public void beforeClickOn(WebElement element, WebDriver driver) { 49 | // try { 50 | // if (getTagNameSafely(element) != null) { 51 | // if ((getTagNameSafely(element).equalsIgnoreCase("span")) 52 | // || (getTagNameSafely(element).equalsIgnoreCase("button")) 53 | // || (getTagNameSafely(element).equalsIgnoreCase("div")) 54 | // || (getTagNameSafely(element).equalsIgnoreCase("img"))) { 55 | 56 | logAndTakeSnapShot(driver, element, "Before Clicking"); 57 | // } 58 | // } 59 | // } catch (RuntimeException e) { 60 | // } 61 | } 62 | 63 | @Override 64 | public void beforeNavigateBack(WebDriver driver) { 65 | } 66 | 67 | @Override 68 | public void afterChangeValueOf(WebElement element, WebDriver driver) { 69 | try { 70 | String tagName = getTagNameSafely(element); 71 | if ("input".equalsIgnoreCase(tagName) || "select".equalsIgnoreCase(tagName) ) { 72 | logAndTakeSnapShot(driver, element, "Setting value '" + getValueSafely(element) + "' on"); 73 | } 74 | } catch (RuntimeException e) { 75 | // "Shit happens" - guess we can't log this one then :-( 76 | } 77 | } 78 | 79 | @Override 80 | public void afterClickOn(WebElement element, WebDriver driver) { 81 | logAndTakeSnapShot(driver, element, "After Clicking"); 82 | } 83 | 84 | @Override 85 | public void beforeNavigateForward(WebDriver driver) { 86 | clsObj.infoWithFlag(" navigateForward"); 87 | } 88 | 89 | @Override 90 | public void beforeNavigateTo(String url, WebDriver driver) { 91 | clsObj.infoWithFlag(" Go to URL " + url); 92 | } 93 | 94 | /** 95 | * This method will take snap shots of screens and save them. 96 | * 97 | * @param driver WebDriver 98 | * @param element WebElement 99 | * @param log message from the action 100 | */ 101 | protected void logAndTakeSnapShot(WebDriver driver, WebElement element, String log) { 102 | addStyleBeforeSnapShot(element, driver); 103 | 104 | if (driver instanceof EventFiringWebDriver) { 105 | EventFiringWebDriver eventFiringWebDriver = (EventFiringWebDriver) driver; 106 | driver = eventFiringWebDriver.getWrappedDriver(); 107 | } 108 | if (driver instanceof TakesScreenshot) { 109 | TakesScreenshot takesScreenshotWebDriver = (TakesScreenshot) driver; 110 | File srcFile = takesScreenshotWebDriver.getScreenshotAs(OutputType.FILE); 111 | log(element, log, srcFile); 112 | removeStyleafterSnapShot(element, driver); 113 | } else { 114 | log(element, log, null); 115 | } 116 | } 117 | 118 | /** 119 | * Log, with a screenshot. 120 | * 121 | * @param element the WebElement, to give context, can be null if the previous message already gave it 122 | * @param message the message to log, never null 123 | * @param screenshot the Screenshot File, can be null if no screenshot is to be logged. The File is copied. 124 | */ 125 | private void log(WebElement element, String message, File screenshot) { 126 | StringBuilder sb = new StringBuilder(); 127 | sb.append(message); 128 | if (element != null) { 129 | sb.append(" "); 130 | String userVisibleLabel = getUserVisibleText(element); 131 | if (userVisibleLabel != null) { 132 | sb.append("'" + userVisibleLabel + "', "); 133 | } 134 | sb.append("element"); 135 | if (getAttributeSafely(element, "id") != null) { 136 | String id = getAttributeSafely(element, "id"); 137 | sb.append(" with ID " + id); 138 | } 139 | // Show the name only if there is no ID (id is stronger) 140 | else if (getAttributeSafely(element, "name") != null) { 141 | sb.append(" with name " + element.getAttribute("name")); 142 | } 143 | } 144 | clsObj.infoWithFlagAndScreenshot(sb.toString(), screenshot); 145 | } 146 | 147 | /** 148 | * Clearest is an element text (content), if none (e.g. icons) try title, else alt. 149 | */ 150 | private String getUserVisibleText(WebElement element) { 151 | String text = getTextSafely(element); 152 | String title = getAttributeSafely(element, "title"); 153 | String alt = getAttributeSafely(element, "alt"); 154 | if ((text != null) && (!text.trim().isEmpty())) { 155 | return text; 156 | } else if (title != null) { 157 | return title; 158 | } else if (alt != null) { 159 | return alt; 160 | } else { 161 | return null; 162 | } 163 | } 164 | 165 | private String getTextSafely(WebElement element) { 166 | try { 167 | return element.getText(); 168 | } catch (Exception e) { 169 | // If we couldn't get the attribute, something is wrong, it probably 170 | // doesn't have one, so let's just return null: 171 | return null; 172 | } 173 | } 174 | 175 | private String getAttributeSafely(WebElement element, String attributeName) { 176 | try { 177 | return element.getAttribute(attributeName); 178 | } catch (WebDriverException e) { 179 | // If we couldn't get the attribute, something is wrong, it probably 180 | // doesn't have one, so let's just return null: 181 | return null; 182 | } 183 | } 184 | 185 | private String getValueSafely(WebElement element) { 186 | return getAttributeSafely(element, "value"); 187 | } 188 | 189 | private String getTagNameSafely(WebElement element) { 190 | try { 191 | return element.getTagName(); 192 | } catch (WebDriverException e) { 193 | // If we couldn't get the attribute, something is wrong, it probably 194 | // doesn't have one, so let's just return null: 195 | return null; 196 | } 197 | } 198 | 199 | public void addStyleBeforeSnapShot(WebElement element, WebDriver driver) { 200 | String webElementId; 201 | if (element != null) { 202 | try { 203 | webElementId = element.getAttribute("id"); 204 | } catch (StaleElementReferenceException e) { 205 | webElementId = null; 206 | } 207 | 208 | if (webElementId != null && ! webElementId.isEmpty() && driver instanceof JavascriptExecutor) { 209 | try { 210 | ((JavascriptExecutor) driver).executeScript("document.getElementById('" + webElementId 211 | + "').setAttribute('style','border:solid 2px #73A6FF;background:#EFF5FF;')", ""); 212 | } catch (Throwable e) { 213 | // Highlight ON didn't work, tant pis. 214 | } 215 | } 216 | } 217 | } 218 | 219 | public void removeStyleafterSnapShot(WebElement element, WebDriver driver) { 220 | String webElementId; 221 | if (element != null) { 222 | webElementId = getAttributeSafely(element, "id"); 223 | 224 | if (webElementId != null && ! webElementId.isEmpty() && driver instanceof JavascriptExecutor) { 225 | try { 226 | ((JavascriptExecutor) driver).executeScript("document.getElementById('" + webElementId 227 | + "').setAttribute('style','border:;background:;')", ""); 228 | } catch (Throwable e) { 229 | // Highlight OFF didn't work, tant pis. 230 | } 231 | } 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /webdriver-reporting/src/main/java/ch/vorburger/webdriver/reporting/TestCaseReportWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Michael Vorburger & other contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package ch.vorburger.webdriver.reporting; 18 | 19 | import java.io.BufferedWriter; 20 | import java.io.File; 21 | import java.io.FileWriter; 22 | import java.io.IOException; 23 | import java.net.URL; 24 | import java.util.LinkedList; 25 | import java.util.List; 26 | 27 | import org.apache.commons.io.FileUtils; 28 | import org.junit.runners.model.FrameworkMethod; 29 | 30 | /** 31 | * Report Writer. 32 | * 33 | * This class should not have any JUnit or WebDriver dependencies/imports, only I/O. 34 | * 35 | * @author Nasir Raza 36 | * @author Michael Vorburger 37 | */ 38 | public class TestCaseReportWriter 39 | { 40 | private static final String START_TEST = "Start"; 41 | private static final String END_TEST = "End"; 42 | private static final String LOG_FLAG = "Logflag"; 43 | private static final String LINE_SEP = System.getProperty("line.separator"); 44 | private static final String APPENDED_JS = "jquery-ui-1.8.5.custom.min.js"; 45 | private final static String SCREENSHOTS_DIR_NAME = "screenshots/"; 46 | 47 | private final List packageNamesList = new LinkedList(); 48 | private final File reportDirFile = new File(System.getProperty("user.dir") + "/target/webdriver-reporting/"); 49 | private final File jsFile = new File(reportDirFile, APPENDED_JS); 50 | private final File screenshotsDirFile = new File(reportDirFile, SCREENSHOTS_DIR_NAME); 51 | 52 | private StringBuffer infoString = new StringBuffer(""); 53 | private File logFile; 54 | 55 | 56 | private StringBuffer getInfoString() { 57 | return infoString; 58 | } 59 | 60 | private void setInfoString(StringBuffer infoString) { 61 | this.infoString = infoString; 62 | } 63 | 64 | /* package local */ 65 | void clearInfoString(){ 66 | setInfoString(new StringBuffer("")); 67 | } 68 | 69 | public File getLogFile() { 70 | return logFile; 71 | } 72 | 73 | public void setLogFile(File logFile) { 74 | this.logFile = logFile; 75 | } 76 | 77 | public void createNewTestReportFile(FrameworkMethod method, String reportFileName) { 78 | BufferedWriter bufferedWriter = null; 79 | try { 80 | File file = new File(reportDirFile, reportFileName); 81 | if (!file.getParentFile().exists()) { 82 | file.getParentFile().mkdirs(); 83 | } 84 | bufferedWriter = new BufferedWriter(new FileWriter(file)); 85 | bufferedWriter.write(getHeader()); 86 | setLogFile(file); 87 | 88 | } catch (IOException e) { 89 | throw new RuntimeException("Oups, could't create WebDriver Report Log files?!", e); 90 | } finally { 91 | try { 92 | if (bufferedWriter != null) { 93 | bufferedWriter.flush(); 94 | bufferedWriter.close(); 95 | } 96 | } catch (IOException ex) { 97 | // Zucchero says "Nothing To Loose" if this happens - ignore. 98 | } 99 | } 100 | } 101 | 102 | /** 103 | * Returns appropriate HTML headers. 104 | */ 105 | protected String getHeader() { 106 | // TODO Should copy this out from a HTML fragment (!) on classpath... just need to deal with Date below 107 | StringBuffer sbuf = new StringBuffer(); 108 | sbuf.append("" + LINE_SEP); 109 | sbuf.append("" + LINE_SEP); 110 | sbuf.append("" + LINE_SEP); 111 | sbuf.append("WebDriver Report" + LINE_SEP); 112 | sbuf.append(" "); 113 | sbuf.append(" "); 114 | sbuf.append(""); 115 | sbuf.append(""); 116 | sbuf.append(""); 117 | sbuf.append("" + LINE_SEP); 123 | 124 | sbuf.append("" + LINE_SEP); 125 | sbuf.append("" + LINE_SEP); 126 | sbuf.append("Log session start time " + new java.util.Date() + "
" + LINE_SEP); 127 | sbuf.append("
" + LINE_SEP); 128 | sbuf.append("
" + LINE_SEP); 129 | 130 | return sbuf.toString(); 131 | } 132 | 133 | public void infoWithFlag(String message) { 134 | info(LOG_FLAG + message); 135 | } 136 | 137 | public void info(String message) { 138 | // Create all the required files to run this log HTML file. 139 | createAdditionalFiles(); 140 | String rowClass = "row"; 141 | boolean isBizLog = false; 142 | boolean stackTraceFlag = false; 143 | String methodName = ""; 144 | String temp = ""; 145 | infoString = getInfoString(); 146 | if (isBizLog) { 147 | rowClass = "rowBiz"; 148 | } 149 | if (message.contains(".png")) { 150 | rowClass = "rowImg"; 151 | } 152 | 153 | boolean startTestFlag = message.trim().startsWith(START_TEST); 154 | boolean endTestFlag = message.trim().startsWith(END_TEST); 155 | long tableId = System.currentTimeMillis(); 156 | double randomId = Math.random(); 157 | 158 | // Check if there is stack trace 159 | if (message.contains("STACKTRACE")) { 160 | //rowClass = "rowStackTrace"; 161 | stackTraceFlag = true; 162 | // Extract the method name 163 | //int indx1 = message.indexOf("STACKTRACE"); 164 | //message = message.substring(indx1+1,message.length()); 165 | //indx1 = methodName.indexOf(":"); 166 | //methodName = methodName.substring(indx1 + 1, methodName.length()); 167 | } 168 | 169 | if (startTestFlag) { 170 | int indx2 = message.lastIndexOf("."); 171 | String methodName1 = message.substring(indx2 + 1, message.length()); 172 | 173 | infoString.append(LINE_SEP + "
" + LINE_SEP); 175 | infoString.append(LINE_SEP + "
"); 177 | infoString.append("
" + LINE_SEP); 178 | } else { 179 | if (stackTraceFlag) { 180 | infoString.append("
" 181 | + LINE_SEP); 182 | } else { 183 | infoString.append("
" + LINE_SEP); 184 | } 185 | } 186 | 187 | infoString.append("
"); 188 | 189 | // sbuf.append(event.timeStamp - LoggingEvent.getStartTime()); 190 | //infoString.append(tableId); 191 | // ts = event.timeStamp; 192 | infoString.append("
" + LINE_SEP); 193 | 194 | // String escapedLogger = event.getLoggerName(); 195 | 196 | // Check if the message has images's name as well. 197 | int indx = message.indexOf("^"); 198 | 199 | // if (event.getLevel().equals(Level.TRACE)) { 200 | if (indx > 0) { 201 | //if(message.contains("")) 202 | temp = message.substring(indx + 1, message.length()); 203 | } else { 204 | temp = message; 205 | } 206 | 207 | // } 208 | 209 | if (message.indexOf(LOG_FLAG) < 0) { 210 | if (startTestFlag) { 211 | infoString.append("
"); 212 | infoString.append(""); 216 | 217 | infoString.append(""); 221 | 222 | infoString.append(""); 226 | 227 | infoString.append(""); 231 | 232 | } else if (!stackTraceFlag) { 233 | infoString.append("
"); 234 | infoString.append("Class: " + message); 235 | } else if (stackTraceFlag) { 236 | infoString.append("
"); 237 | infoString.append(message); 238 | } else { 239 | infoString.append("
"); 240 | infoString 241 | .append("Test Method: " 242 | + methodName 243 | + "" 248 | + ""); 252 | } 253 | } else { 254 | infoString.append("
"); 255 | } 256 | 257 | if(message.contains(LOG_FLAG)){ 258 | int flagIndex = message.indexOf(LOG_FLAG); 259 | message = message.substring(flagIndex+7,message.length()); 260 | } 261 | 262 | if (indx > 0) { 263 | infoString.append("Action taken: " + message.substring(0, indx) + ""); 264 | } else { 265 | if (startTestFlag) { 266 | infoString.append("Test Name: " + message + ""); 267 | } else if (stackTraceFlag) { 268 | int tempIndx = message.indexOf("$"); 269 | infoString.append("Exception Message: " 270 | + message.substring(tempIndx + 1, message.length()) + ""); 271 | } else { 272 | infoString.append("Action taken: " + message + ""); 273 | } 274 | } 275 | 276 | if (temp.length() > 0) { 277 | if (temp.contains(".png")) { 278 | infoString.append("test"); 279 | } 280 | } else { 281 | infoString.append(temp); 282 | } 283 | infoString.append("
" + LINE_SEP); 284 | infoString.append("
" + LINE_SEP); 285 | 286 | if (endTestFlag) { 287 | infoString.append(LINE_SEP + "
" + LINE_SEP); 288 | infoString.append("
" + LINE_SEP); 289 | infoString.append("
"); 290 | setInfoString(infoString); 291 | writeToFile(infoString.toString()); 292 | } 293 | } 294 | 295 | public void writeToFile(String message) { 296 | // TODO Use something in org.apache.commons.io.FileUtils which does this.. 297 | if (message.indexOf(END_TEST) > 0) { 298 | BufferedWriter bufferedWriter = null; 299 | try { 300 | bufferedWriter = new BufferedWriter(new FileWriter(getLogFile().getPath(), true)); 301 | bufferedWriter.newLine(); 302 | bufferedWriter.append(message); 303 | } catch (IOException e) { 304 | // e.printStackTrace(); 305 | } finally { 306 | try { 307 | if (bufferedWriter != null) { 308 | bufferedWriter.flush(); 309 | bufferedWriter.close(); 310 | } 311 | } catch (IOException ex) { 312 | // ex.printStackTrace(); 313 | } 314 | } 315 | } 316 | } 317 | 318 | /** 319 | * This file will create all all the required JavaScript file and CSS file 320 | * used for the HTML file. These files already exists in the workspace, but 321 | * we need them in the artifacts of the target build, hence we will have to 322 | * copy them out. 323 | */ 324 | private void createAdditionalFiles() { 325 | String[] files = { "index.html", "jquery-1.4.2.min.js", APPENDED_JS, "jquery-ui-1.8.5.custom.css", "style.css", "util.js" }; 326 | for (String fileName : files) { 327 | File targetFile = new File(reportDirFile , fileName); 328 | if (!targetFile.exists()) { 329 | URL sourceFileURL = TestCaseReportWriter.class.getResource(fileName); 330 | if (sourceFileURL == null) { 331 | throw new RuntimeException("Could not find resource on classpath: " + fileName); 332 | } 333 | try { 334 | FileUtils.copyURLToFile(sourceFileURL, targetFile); 335 | } catch (IOException e) { 336 | throw new RuntimeException("Failed to copy resource from classpath to file: " + fileName, e); 337 | } 338 | } 339 | } 340 | } 341 | 342 | // --- 343 | 344 | private void addPakageNameToJS(String packageName) throws IOException { 345 | BufferedWriter bw = null; 346 | try { 347 | bw = new BufferedWriter(new FileWriter(jsFile, true)); 348 | bw.write("packageArray.push(\"" + packageName.toUpperCase() + "\");"); 349 | bw.newLine(); 350 | bw.flush(); 351 | } catch (IOException ioe) { 352 | // DO Nothing 353 | } finally { // always close the file 354 | if (bw != null) 355 | try { 356 | bw.close(); 357 | } catch (IOException ioe2) { 358 | // just ignore it 359 | } 360 | } // end try/catch/finally 361 | } 362 | 363 | // package local 364 | void addTestClassNameToJS(String className) { 365 | BufferedWriter bw = null; 366 | try { 367 | bw = new BufferedWriter(new FileWriter(jsFile, true)); 368 | bw.write("testClassArray.push(\"" + className + "\");"); 369 | bw.newLine(); 370 | bw.flush(); 371 | } catch (IOException ioe) { 372 | // DO Nothing 373 | } finally { // always close the file 374 | if (bw != null) 375 | try { 376 | bw.close(); 377 | } catch (IOException ioe2) { 378 | // just ignore it 379 | } 380 | } // end try/catch/finally 381 | } 382 | 383 | // package local 384 | String getPackageName(String arg0) { 385 | int indx = arg0.indexOf("Package Name"); 386 | arg0 = arg0.substring(indx, arg0.length()); 387 | indx = arg0.lastIndexOf("."); 388 | 389 | try { 390 | addPakageNameToJS(arg0.substring(indx + 1, arg0.length())); 391 | if (!packageNamesList.contains(arg0.substring(indx + 1, arg0.length()))) { 392 | packageNamesList.add(arg0.substring(indx + 1, arg0.length())); 393 | } 394 | } catch (IOException e) { 395 | // Ignore (?!) 396 | } 397 | 398 | return arg0.substring(indx + 1, arg0.length()); 399 | } 400 | 401 | // package local 402 | void addFailedTestClassNameToJS(String className) { 403 | BufferedWriter bw = null; 404 | try { 405 | bw = new BufferedWriter(new FileWriter(jsFile, true)); 406 | bw.write("failedTestClassArray.push(\"" + className + "\");"); 407 | bw.newLine(); 408 | bw.flush(); 409 | } catch (IOException ioe) { 410 | // DO Nothing 411 | } finally { // always close the file 412 | if (bw != null) 413 | try { 414 | bw.close(); 415 | } catch (IOException ioe2) { 416 | // just ignore it 417 | } 418 | } // end try/catch/finally 419 | } 420 | 421 | public void infoWithFlagAndScreenshot(String message, File screenshot) { 422 | if (screenshot != null) { 423 | try { 424 | FileUtils.copyFileToDirectory(screenshot, screenshotsDirFile, true); 425 | } catch (IOException e) { 426 | throw new RuntimeException("Oups, WebDriver Report could't copy screenshot file?!", e); 427 | } 428 | 429 | message = message + "^" + screenshot.getName(); 430 | } 431 | infoWithFlag(message); 432 | } 433 | } 434 | -------------------------------------------------------------------------------- /webdriver-reporting/src/main/resources/ch/vorburger/webdriver/reporting/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Log4J Log Messages 5 | 11 | 12 | -------------------------------------------------------------------------------- /webdriver-reporting/src/main/resources/ch/vorburger/webdriver/reporting/jquery-1.4.2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.4.1 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2010, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2010, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Mon Jan 25 19:43:33 2010 -0500 15 | */ 16 | (function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, 18 | a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, 21 | va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], 22 | [f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, 23 | this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, 24 | a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; 25 | c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= 34 | {leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; 35 | b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); 36 | c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= 37 | {"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, 38 | {},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, 39 | a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); 40 | return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| 41 | a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= 42 | c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| 45 | {}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); 47 | f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= 48 | ""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= 49 | function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, 50 | d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ 51 | s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, 52 | "events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, 53 | b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, 54 | d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), 55 | fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| 56 | d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= 57 | 0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; 58 | c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= 59 | a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== 60 | "form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, 61 | "keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| 62 | d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= 63 | a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, 64 | f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, 65 | b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| 70 | typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= 71 | l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& 72 | y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& 79 | "2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); 80 | return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== 81 | g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== 82 | 0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= 84 | 0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? 85 | k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; 86 | try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); 89 | return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", 90 | 2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== 91 | 0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], 92 | l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e 95 | -1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), 96 | a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, 97 | nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): 98 | e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== 99 | b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"], 100 | col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, 101 | wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? 102 | d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, 103 | false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& 104 | !c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/

Home

Test Packages

    "; 68 | for (var i = 0; i < packageArray.length; i++) { 69 | var stmt = "return showClasses(\"" + packageArray[i].toUpperCase() + "\");"; 70 | frameHtml = frameHtml + "
  • " + 75 | packageArray[i].toUpperCase() + 76 | "
  • "; 79 | } 80 | $body.html("
" + frameHtml); 81 | 82 | 83 | top.packageFrame.document.body.style.backgroundColor = '#B9C9FE'; 84 | top.packageListFrame.document.body.style.backgroundColor = '#B9C9FE'; 85 | top.classFrame.document.body.style.backgroundColor = '#B9C9FE'; 86 | } 87 | }, 500); 88 | }); 89 | 90 | 91 | /** 92 | * This method will populate the test classes name in the frame. 93 | */ 94 | $(function(){ 95 | var $frame = $('frame'); 96 | setTimeout(function(){ 97 | if ($frame[1] != undefined) { 98 | 99 | var headIDCss = top.packageFrame.document.getElementsByTagName("head")[0]; 100 | var cssNode = top.packageFrame.document.createElement('link'); 101 | cssNode.type = 'text/css'; 102 | cssNode.rel = 'stylesheet'; 103 | cssNode.href = 'style.css'; 104 | cssNode.media = 'screen'; 105 | headIDCss.appendChild(cssNode); 106 | 107 | 108 | var doc = $frame[1].contentWindow.document; 109 | var $body = $('body', doc); 110 | var frameHtml = "

Test Methods

"; 111 | for (var j = 0; j < testClassArray.length; j++) { 112 | var indx = testClassArray[j].lastIndexOf("."); 113 | var fileName = testClassArray[j].substring(indx + 1, testClassArray[j].length); 114 | var packageName = testClassArray[j].substring(0, indx).toUpperCase(); 115 | 116 | if (j == 0) { 117 | tempPackageName = packageName; 118 | frameHtml = frameHtml + "