diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..afdf153 Binary files /dev/null and b/.DS_Store differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 4a64184..7d8727a 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# APIStrong \ No newline at end of file +# TTAF \ No newline at end of file diff --git a/Resources/.DS_Store b/Resources/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/Resources/.DS_Store differ diff --git a/Resources/SampleTestData.xls b/Resources/SampleTestData.xls new file mode 100644 index 0000000..c777773 Binary files /dev/null and b/Resources/SampleTestData.xls differ diff --git a/TestData/CollectionForTesting.postman_collection.json b/TestData/CollectionForTesting.postman_collection.json new file mode 100644 index 0000000..2027f9c --- /dev/null +++ b/TestData/CollectionForTesting.postman_collection.json @@ -0,0 +1,123 @@ +{ + "info": { + "_postman_id": "be6cd117-1056-472e-bd1e-e9b5bb2d810e", + "name": "CollectionForTesting", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "GET-200", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://reqres.in/api/users?page=2", + "protocol": "https", + "host": [ + "reqres", + "in" + ], + "path": [ + "api", + "users" + ], + "query": [ + { + "key": "page", + "value": "2" + } + ] + } + }, + "response": [] + }, + { + "name": "GET-404", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://reqres.in/api/users/23", + "protocol": "https", + "host": [ + "reqres", + "in" + ], + "path": [ + "api", + "users", + "23" + ] + } + }, + "response": [] + }, + { + "name": "GET-200-Dummy", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] + }, + { + "name": "GET-200-Dummy1", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] + }, + { + "name": "POST-201", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] + }, + { + "name": "PUT-200", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] + }, + { + "name": "DELETE-204", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] + }, + { + "name": "vtest", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {} +} \ No newline at end of file diff --git a/TestData/chromedriver.exe b/TestData/chromedriver.exe new file mode 100644 index 0000000..4850c8d Binary files /dev/null and b/TestData/chromedriver.exe differ diff --git a/TestData/users.properties b/TestData/users.properties new file mode 100644 index 0000000..58d2826 --- /dev/null +++ b/TestData/users.properties @@ -0,0 +1,2 @@ +ADMIN_USER_STAGE=masteradmin +ADMIN_PASS_STAGE=Ctsdemo123 \ No newline at end of file diff --git a/chromedriver b/chromedriver new file mode 100755 index 0000000..92db10e Binary files /dev/null and b/chromedriver differ diff --git a/config.properties b/config.properties new file mode 100644 index 0000000..8ad0604 --- /dev/null +++ b/config.properties @@ -0,0 +1,21 @@ +executionEnvironment=local +#executionEnvironment=browserstack +#executionEnvironment=seleniumgrid + +browserName=chrome +#browserName=Safari +#browserName=Firefox + +instanceUrl=https://dev.apistrong.com/ + +#Local +driverAgent=chromedriver + +#Browser Stack +#browserstackUsername= +#browserstackAuthkey= +#browserstackBrowserversion= +#browserstackOsversion=10 +#os=win + +outputPath=output \ No newline at end of file diff --git a/output/.DS_Store b/output/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/output/.DS_Store differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3009e10 --- /dev/null +++ b/pom.xml @@ -0,0 +1,127 @@ + + 4.0.0 + + TTPL + automationFramework + 0.0.1-SNAPSHOT + jar + + TTAF + http://maven.apache.org + + + UTF-8 + 1.8 + 1.8 + + + + + + org.seleniumhq.selenium + selenium-server + 3.141.59 + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + + org.testng + testng + 6.13 + compile + + + + + org.apache.poi + poi + 3.7 + + + + org.apache.poi + poi-ooxml + 3.7 + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.0 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + + + + net.sourceforge.jexcelapi + jxl + 2.6.12 + + + + org.apache.commons + commons-exec + 1.3 + + + + + + + + + + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + true + + + ${testSuiteToExecute} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + true + + + ${testFileToExecute} + + + + + + + + + diff --git a/src/main/java/com/ttaf/Library/AppLibrary.java b/src/main/java/com/ttaf/Library/AppLibrary.java new file mode 100644 index 0000000..8823d85 --- /dev/null +++ b/src/main/java/com/ttaf/Library/AppLibrary.java @@ -0,0 +1,683 @@ +package com.ttaf.Library; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Scanner; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.io.FileUtils; +import org.openqa.selenium.By; +import org.openqa.selenium.ElementNotVisibleException; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.OutputType; +import org.openqa.selenium.Platform; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.firefox.FirefoxDriver; +import org.openqa.selenium.ie.InternetExplorerDriver; +import org.openqa.selenium.ie.InternetExplorerOptions; +import org.openqa.selenium.remote.DesiredCapabilities; +import org.openqa.selenium.remote.LocalFileDetector; +import org.openqa.selenium.remote.RemoteWebDriver; +import org.openqa.selenium.support.ui.Select; +import org.openqa.selenium.support.ui.WebDriverWait; +import org.testng.Reporter; + +import junit.framework.Assert; +import jxl.Cell; +import jxl.Sheet; +import jxl.Workbook; +import jxl.read.biff.BiffException; + +public class AppLibrary { + + public static String txtRegEmail = "txtRegEmail"; + public static String txtRegPassword = "txtRegPassword"; + public static String txtConfirmPassword = "txtConfirmPassword"; + public static String txtCompany = "txtCompany"; + public static String regklogin="kc-login"; + public static String Skip="//a[text()='Skip']"; + + public static String reg = "https://dev.apistrong.com/Account/Register"; + + + public final long GLOBALTIMEOUT = 75; + private WebDriver driver; + private static Configuration config; + public String baseUrl; + public String browser; + public String device; + private String currentTestName; + private String currentSessionID; + + public AppLibrary(String testName) { + this.currentTestName = testName; + config = new Configuration(); + } + + public static Configuration getConfig() { + if (config == null) { + config = new Configuration(); + } + + return config; + } + + + public void Register() + { + int num=(int) Math.ceil(Math.random()*10000); + String email="qa"+num+"@mailinator.com"; + driver.get(reg); + + driver.findElement(By.id(txtRegEmail)).sendKeys(email); + driver.findElement(By.id(txtRegPassword)).sendKeys("test12"); + driver.findElement(By.id(txtConfirmPassword)).sendKeys("test12"); + driver.findElement(By.id(txtCompany)).sendKeys("qa"+num); + driver.findElement(By.id(regklogin)).click(); + driver.findElement(By.xpath(Skip)).click(); + System.out.println(txtRegEmail); + + + } + + + + + + + + + + + + public WebDriver getDriverInstance() throws MalformedURLException { + DesiredCapabilities caps = new DesiredCapabilities(); + String browserVersion, os, browserStackOSVersion, remoteGridUrl, environment; + + this.browser = config.getBrowserName(); + baseUrl = config.getURL(); + environment = config.getExecutionEnvironment(); + + switch (environment) { + + case "browserstack": + browserStackOSVersion = config.getBrowserStackOSVersion(); + browserVersion = config.getBrowserVersion(); + os = config.getOS(); + + if (config.getBrowserName().equalsIgnoreCase("IE")) { + caps.setCapability("browser", "IE"); + } else if (config.getBrowserName().equalsIgnoreCase("GCH") + || config.getBrowserName().equalsIgnoreCase("chrome")) { + caps.setCapability("browser", "Chrome"); + } else if (config.getBrowserName().equalsIgnoreCase("safari")) { + caps.setCapability("browser", "Safari"); + } else { + caps.setCapability("browser", "Firefox"); + } + + if (browserVersion != null && !browserVersion.equals("") && !browserVersion.equals("latest")) { + caps.setCapability("browser_version", browserVersion); + } + + if (browserStackOSVersion != null) { + caps.setCapability("os", os); + if (os.toLowerCase().startsWith("win")) { + caps.setCapability("os", "Windows"); + } else if (os.toLowerCase().startsWith("mac-") || os.toLowerCase().startsWith("os x-")) { + caps.setCapability("os", "OS X"); + } + + if (os.equalsIgnoreCase("win7")) { + browserStackOSVersion = "7"; + } else if (os.equalsIgnoreCase("win8")) { + browserStackOSVersion = "8"; + } else if (os.equalsIgnoreCase("win8.1") || os.equalsIgnoreCase("win8_1")) { + browserStackOSVersion = "8.1"; + } else if (os.toLowerCase().startsWith("mac-") || os.toLowerCase().startsWith("os x-")) { + browserStackOSVersion = os.split("-")[1]; + } + caps.setCapability("os_version", browserStackOSVersion); + } + caps.setCapability("resolution", "1920x1080"); + caps.setCapability("browserstack.debug", "true"); + caps.setCapability("build", System.getProperty("Build")); + caps.setCapability("project", System.getProperty("Suite")); + caps.setCapability("name", currentTestName); + + try { + driver = new RemoteWebDriver(new URL("http://" + config.getBrowserStackUserName() + ":" + + config.getBrowserStackAuthKey() + "@hub.browserstack.com/wd/hub"), caps); + ((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector()); + } catch (Exception e) { + autoLogger("Issue creating new driver instance due to following error: " + e.getMessage() + "\n" + + e.getStackTrace()); + throw e; + } + + break; + + case "seleniumgrid": + autoLogger("Remote execution set up on URL: " + config.getRemoteGridUrl()); + remoteGridUrl = config.getRemoteGridUrl(); + caps.setBrowserName("chrome"); + caps.setPlatform(Platform.LINUX); + String url = "http://" + remoteGridUrl + ":4444/wd/hub"; + autoLogger("===================================" + "\n" + "URL:" + url); + driver = new RemoteWebDriver(new URL(url), caps); + ((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector()); + break; + + case "local": + + if (config.getBrowserName().equalsIgnoreCase("IE")) { + String driverPath = config.getDriverAgent(); + if ((driverPath == null) || (driverPath.trim().length() == 0)) { + driverPath = "IEDriverServer.exe"; + } + System.setProperty("webdriver.ie.driver", driverPath); + DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer(); + capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, + false); + capabilities.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, false); + capabilities.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true); + capabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false); + capabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true); + + driver = new InternetExplorerDriver(new InternetExplorerOptions(capabilities)); + + } else if (config.getBrowserName().equalsIgnoreCase("GCH") + || config.getBrowserName().equalsIgnoreCase("chrome")) { + String driverPath = config.getDriverAgent(); + if ((driverPath == null) || (driverPath.trim().length() == 0)) { + driverPath = "chromedriver.exe"; + } + System.setProperty("webdriver.chrome.driver", driverPath); + ChromeOptions options = new ChromeOptions(); + options.addArguments("--test-type"); + options.addArguments("--disable-extensions"); + options.addArguments("--start-maximized"); + driver = new ChromeDriver(options); + } else { + System.setProperty("webdriver.firefox.profile", "default"); + driver = new FirefoxDriver(); + } + break; + } + + driver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS); + driver.manage().window().maximize(); + return driver; + } + + public void launchApp() { + // Delete cookies and Launch the Application + driver.manage().deleteAllCookies(); + baseUrl = config.getURL(); + driver.get(baseUrl); + + // Maximize the browser + driver.manage().window().maximize(); + waitForPageToLoad(); + } + + public void setBaseUrl(String baseUrl) { + this.baseUrl = baseUrl; + } + + public void launchApp(String url) { + // Delete cookies and Launch the Application + driver.manage().deleteAllCookies(); + + driver.get(url); + waitForPageToLoad(); + + // Maximize the browser + driver.manage().window().maximize(); + } + + public WebDriver getCurrentDriverInstance() { + return driver; + } + + public void closeBrowser() { + //if (driver != null) + // driver.quit(); + } + + public By getLocatorBy(String locator) { + By locatorBy = null; + String string = locator; + String[] parts = string.split(":"); + String type = parts[0]; // 004 + String object = parts[1]; + + if (type.equals("id")) { + locatorBy = By.id(object); + } else if (type.equals("name")) { + locatorBy = By.name(object); + } else if (type.equals("class")) { + locatorBy = By.className(object); + } else if (type.equals("link")) { + locatorBy = By.linkText(object); + } else if (type.equals("partiallink")) { + locatorBy = By.partialLinkText(object); + } else if (type.equals("css")) { + locatorBy = By.cssSelector(object); + } else if (type.equals("xpath")) { + locatorBy = By.xpath(object); + } else { + autoLogger("Please provide correct element locating strategy" + locator); + throw new RuntimeException("Please provide correct element locating strategy" + locator); + } + return locatorBy; + } + + public WebElement getElement(String locatorString) { + By locatorBy = null; + int counter = 0; + driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); + autoLogger("Finding element using: " + locatorString); + locatorBy = getLocatorBy(locatorString); + + for (; counter < 20; counter++) { + try { + autoLogger("Finding element, try" + counter + " with locator:" + locatorString); + return driver.findElement(locatorBy); + } catch (Exception e) { + sleep(2000); + } + } + + throw new RuntimeException("Element not found: " + locatorString); + + } + + public WebElement findElement(String locatorString) { + WebElement element = getElement(locatorString); + return element; + } + + public List findElements(String locatorString) { + By locatorBy = null; + List elements = null; + locatorBy = getLocatorBy(locatorString); + elements = driver.findElements(locatorBy); + return elements; + } + + public void selectElement(WebElement element, String option) throws Exception { + Select select = new Select(element); + select.selectByVisibleText(option); + } + + public boolean syncProgress() throws Exception { + + int loadCounter = 10; + + driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); + while (loadCounter > 0) { + + try { + driver.findElement( + By.xpath("//div[@id='MainContent_panelUpdateProgress'][contains(@style, 'display: none')]")); + driver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS); + return true; + } catch (Exception e) { + loadCounter--; + } + + } + + driver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS); + throw new Exception("Progress was not completed withing specified time"); + + } + + public void selectByPartOfVisibleText(WebElement element, String value) { + boolean flag = true; + List optionElements = element.findElements(By.tagName("option")); + Select select = new Select(element); + for (WebElement optionElement : optionElements) { + if (optionElement.getText().contains(value)) { + String optionIndex = optionElement.getAttribute("index"); + select.selectByIndex(Integer.parseInt(optionIndex)); + flag = false; + break; + } + } + if (flag) { + Assert.assertTrue("Option " + value + " was not found in the select", false); + } + } + + public void verifyElement(String locatorString, boolean checkVisibility, long timeOutInSeconds) throws Exception { + if (checkVisibility) { + boolean isDisplayed = (findElement(locatorString).isDisplayed()); + if (isDisplayed == false) { + throw new ElementNotVisibleException("Element Not Visible Exception"); + } + } else { + driver.manage().timeouts().implicitlyWait(timeOutInSeconds, TimeUnit.SECONDS); + findElement(locatorString); + } + driver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS); + } + + public void sleep(long milliSeconds) { + try { + Thread.sleep(milliSeconds); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + public String getCurrentSessionID() { + return currentSessionID; + } + + public void waitForPageToLoad() { + new WebDriverWait(driver, GLOBALTIMEOUT).until(webDriver -> ((JavascriptExecutor) webDriver) + .executeScript("return document.readyState").equals("complete")); + } + + public void selectDeselectCheckBox(String locator, boolean selectCheckBox) { + + if (selectCheckBox) { + if (!findElement(locator).isSelected()) + findElement(locator).click(); + } else if (findElement(locator).isSelected()) + findElement(locator).click(); + } + + public void clickElement(String locator) throws Exception { + + int i = 0; + do { + try { + findElement(locator).click(); + break; + } catch (Exception e) { + sleep(1000); + i++; + continue; + } + + } while (i < 5); + + if (i >= 5) { + throw new Exception("Failed to click element, Locator: " + locator); + } + } + + public void enterText(String locator, String text) throws Exception { + WebElement element = findElement(locator); + element.click(); + element.clear(); + element.sendKeys(text); + } + + public boolean verifyCheckBox(String locator) { + return findElement(locator).isSelected(); + } + + public void waitForNavigation(String url) { + int counter = 10; + for (; counter > 0; counter--) { + if (driver.getCurrentUrl().contains(url)) { + break; + } else { + sleep(10000); + } + } + } + + public void switchToWindow(int windowNo) { + Set set = driver.getWindowHandles(); + String windowHandle = null; + autoLogger("Current no. of windows are: " + set.size()); + if (windowNo <= set.size()) { + ArrayList windows = new ArrayList(set); + windowHandle = windows.get(windowNo - 1); + } + + if (windowHandle != null) { + driver.switchTo().window(windowHandle); + } else { + throw new RuntimeException("Specified window not available"); + } + } + + public String getFormattedDate() { + return getDate().replaceAll("/", "_").replaceAll(":", "_").replaceAll(" ", "_"); + } + + public String getDate() { + DateFormat dateFormat = new SimpleDateFormat("MM/dd HH:mm:ss"); + Date date = new Date(); + autoLogger(dateFormat.format(date)); + return dateFormat.format(date); + } + + public boolean waitTillElementLoaded(String locator) { + driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS); + int counter = 10; + do { + try { + if (findElement(locator) != null) { + return true; + } else { + sleep(1000); + counter--; + } + } catch (Exception e) { + sleep(3000); + counter--; + continue; + } + } while (counter > 0); + driver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS); + throw new RuntimeException("element was not loaded:" + locator); + } + + public static void autoLogger(String message) { + Reporter.log(message, true); + } + + /*public void getScreenshot(String name) throws IOException { + driver = getCurrentDriverInstance(); + String path = "screenshots/" + name; + File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); + FileUtils.copyFile(src, new File(path)); + autoLogger("screenshot at :" + path); + autoLogger("screenshot for " + name + " available at :" + path); + }*/ + + public String[][] readExcel(String excelFilePath, int sheetNo) throws BiffException, IOException { + File file = new File(excelFilePath); + String inputData[][] = null; + Workbook w; + + try { + w = Workbook.getWorkbook(file); + + // Get the sheet + Sheet sheet = w.getSheet(sheetNo); + + int colcount = sheet.getColumns(); + int rowcount = sheet.getRows(); + int countYes = 0; + + for (int i = 0; i < rowcount; i++) { + if (sheet.getCell(colcount - 1, i).getContents().equalsIgnoreCase("Yes")) { + countYes = countYes + 1; + + } + } + + inputData = new String[countYes][colcount]; + int k = 0; + for (int i = 0; i < rowcount; i++) { + if (sheet.getCell(colcount - 1, i).getContents().equalsIgnoreCase("Yes")) { + + for (int j = 0; j < colcount; j++) { + Cell cell = sheet.getCell(j, i); + inputData[k][j] = cell.getContents().trim(); + + } + k = k + 1; + } + + } + + } catch (BiffException e) { + e.printStackTrace(); + throw e; + } catch (IOException e) { + e.printStackTrace(); + throw e; + } + return inputData; + } + + public void scroll(String locator) { + + JavascriptExecutor js = (JavascriptExecutor) driver; + By by = getLocatorBy(locator); + WebElement element = driver.findElement(by); + // This will scroll the page till the element is found + js.executeScript("arguments[0].scrollIntoView();", element); + System.out.println("Scrolled into View"); + } + + public void switchToFrame(String locatorString) { + driver.switchTo().frame(locatorString); + } + + public void switchToDefault() { + driver.switchTo().defaultContent(); + } + + public void handleAlertBox() throws Exception { + driver.switchTo().alert().accept(); + } + + public void createFile(String path, String filename) throws IOException { + try { + File neo = new File(path + File.separator + filename); + System.out.println(path + File.separator + filename); + neo.createNewFile(); + neo = null; + } catch (IOException e) { + System.out.println("===========File creation failed, Path: " + path + File.separator + filename); + e.printStackTrace(); + throw e; + } + } + + public void writeToFile(String data, String path, String fileName) throws Exception { + + FileWriter fw = null; + BufferedWriter bw = null; + + try { + File neo = new File(path + File.separator + fileName); + fw = new FileWriter(neo.getAbsoluteFile(), true); + bw = new BufferedWriter(fw); + bw.write(data); + bw.newLine(); + bw.close(); + fw.close(); + } catch (Exception e) { + System.out.println("===========Exception in writing data to file"); + e.printStackTrace(); + throw e; + } finally { + if (bw != null) { + bw.close(); + } + if (fw != null) { + fw.close(); + } + } + } + + public static void cleanDirectory(String path) { + + try { + FileUtils.cleanDirectory(new File(path)); + } catch (IOException e) { + System.out.println("===========Exception in cleaning directory"); + e.printStackTrace(); + } + + } + + public Object[][] readText(String filePath) throws Exception { + + String inputData[][] = null; + Scanner myReader = null; + + try { + File myObj = new File(filePath); + myReader = new Scanner(myObj); + List fileData = new ArrayList<>(); + String data = null; + int row = 0; + int col = 0; + + while (myReader.hasNextLine()) { + data = myReader.nextLine(); + if (!data.equalsIgnoreCase("")) { + row++; + fileData.add(data); + } + } + + col = data.split("\\|\\|").length; + + inputData = new String[row][col]; + row = 0; + for (String string : fileData) { + + String[] lineData = string.split("\\|\\|"); + if (col == lineData.length) { + + for (int j = 0; j < lineData.length; j++) { + inputData[row][j] = lineData[j]; + } + + } else { + System.out.println("========column count does not match text file data"); + throw new Exception("column count does not match text file data"); + } + + row++; + } + + myReader.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } finally { + myReader.close(); + } + + return inputData; + } + +} \ No newline at end of file diff --git a/src/main/java/com/ttaf/Library/Configuration.java b/src/main/java/com/ttaf/Library/Configuration.java new file mode 100644 index 0000000..8f9b54f --- /dev/null +++ b/src/main/java/com/ttaf/Library/Configuration.java @@ -0,0 +1,128 @@ +package com.ttaf.Library; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Properties; + +public class Configuration { + private String url; + private String browserName; + private String driverAgent; + private String executionEnvironment; + private String browserStackUserName; + private String browserStackAuthKey; + private String browserStackBrowserVersion; + private String browserStackOSVersion; + private String os; + private String remoteGridUrl; + private String browserVersion; + private String outputPath; + + public Configuration() { + final Properties prop = new Properties(); + + try { + prop.load(new FileInputStream(new File("config.properties"))); + } catch (IOException e) { + e.printStackTrace(); + } + + url = System.getProperty("instanceUrl") != null ? System.getProperty("instanceUrl") + : prop.getProperty("instanceUrl"); + + browserName = System.getProperty("browserName") != null ? System.getProperty("browserName") + : prop.getProperty("browserName"); + + driverAgent = System.getProperty("driverAgent") != null ? System.getProperty("driverAgent") + : prop.getProperty("driverAgent"); + + executionEnvironment = System.getProperty("executionEnvironment") != null + ? System.getProperty("executionEnvironment") + : prop.getProperty("executionEnvironment"); + + browserStackUserName = System.getProperty("browserstackUsername") != null + ? System.getProperty("browserstackUsername") + : prop.getProperty("browserstackUsername"); + + browserStackAuthKey = System.getProperty("browserstackAuthkey") != null + ? System.getProperty("browserstackAuthkey") + : prop.getProperty("browserstackAuthkey"); + + browserStackBrowserVersion = System.getProperty("browserstackBrowserversion") != null + ? System.getProperty("browserstackBrowserversion") + : prop.getProperty("browserstackBrowserversion"); + + browserStackOSVersion = System.getProperty("browserstackOsversion") != null + ? System.getProperty("browserstackOsversion") + : prop.getProperty("browserstackOsversion"); + + os = System.getProperty("os") != null ? System.getProperty("os") : prop.getProperty("os"); + + remoteGridUrl = System.getProperty("remoteGridUrl") != null ? System.getProperty("remoteGridUrl") + : prop.getProperty("remoteGridUrl"); + + outputPath = System.getProperty("outputPath") != null ? System.getProperty("outputPath") + : prop.getProperty("outputPath"); + + AppLibrary.autoLogger("url:" + url); + AppLibrary.autoLogger("browserName:" + browserName); + AppLibrary.autoLogger("driverAgent:" + driverAgent); + AppLibrary.autoLogger("executionEnvironment:" + executionEnvironment); + AppLibrary.autoLogger("browserStackUserName:" + browserStackUserName); + AppLibrary.autoLogger("browserStackAuthKey:" + browserStackAuthKey); + AppLibrary.autoLogger("browserStackBrowserVersion:" + browserStackBrowserVersion); + AppLibrary.autoLogger("browserStackOSVersion:" + browserStackOSVersion); + AppLibrary.autoLogger("os:" + os); + AppLibrary.autoLogger("outputPath:" + outputPath); + } + + public String getURL() { + return url; + } + + public String getBrowserName() { + return browserName; + } + + public String getExecutionEnvironment() { + return executionEnvironment; + } + + public String getBrowserStackUserName() { + return browserStackUserName; + } + + public String getBrowserStackAuthKey() { + return browserStackAuthKey; + } + + public String getBrowserStackBrowserVersion() { + return browserStackBrowserVersion; + } + + public String getBrowserStackOSVersion() { + return browserStackOSVersion; + } + + public String getRemoteGridUrl() { + return remoteGridUrl; + } + + public String getOS() { + return os; + } + + public String getBrowserVersion() { + return browserVersion; + } + + public String getDriverAgent() { + return driverAgent; + } + + public String getoutputPath() { + return outputPath; + } + +} \ No newline at end of file diff --git a/src/main/java/com/ttaf/Library/TestBase.java b/src/main/java/com/ttaf/Library/TestBase.java new file mode 100644 index 0000000..c10d4e1 --- /dev/null +++ b/src/main/java/com/ttaf/Library/TestBase.java @@ -0,0 +1,168 @@ +package com.ttaf.Library; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.InetAddress; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Properties; + +import org.openqa.selenium.Alert; +import org.openqa.selenium.NoAlertPresentException; +import org.testng.ITestContext; +import org.testng.ITestResult; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeSuite; + +public class TestBase { + protected AppLibrary appLibrary; // Application Library instance + Properties usersProperties = null; + private String suite; + protected String testName; + ITestContext testContext; + + @BeforeSuite + public void cleanUp() { +// AppLibrary.cleanDirectory(AppLibrary.getConfig().getoutputPath()); + } + + @BeforeClass(alwaysRun = true) + public void setUp(ITestContext context) throws Exception { + + suite = context.getCurrentXmlTest().getSuite().getName(); + suite = ((suite != null && !(suite.equals("Default suite"))) ? suite + : InetAddress.getLocalHost().getHostName()); + suite = (suite.contains("Neo") ? "Neo" : suite); + testName = this.getClass().getSimpleName(); + testName = ((testName != null && !(testName.equals("Default test"))) ? testName + : this.getClass().getSimpleName()); + + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("MMMddyyyyhhmmssaz"); + String currentDate = sdf.format(date); + + if (System.getProperty("Build") == null) { + System.setProperty("Build", suite + "_" + currentDate); + System.setProperty("Suite", suite); + } + System.setProperty("Test", testName); + testContext = context; + } + + public Properties loadUserProperties() { + if (usersProperties == null) { + usersProperties = new Properties(); + try { + File f = new File("Users.properties"); + if (!f.exists()) { + f = new File("TestData/users.properties"); + } + usersProperties.load(new FileInputStream(f)); + + } catch (IOException e) { + e.printStackTrace(); + } + } + return usersProperties; + } + + public String getAdminUserID() { + String email = null; + + if (appLibrary.baseUrl.contains("stage")) { + email = loadUserProperties().getProperty("ADMIN_USER_STAGE"); + } else if (appLibrary.baseUrl.contains("preprod")) { + System.out.println("Properties: " + loadUserProperties()); + email = loadUserProperties().getProperty("ADMIN_USER_PREPROD"); + } else if (appLibrary.baseUrl.contains("dev") || appLibrary.baseUrl.contains("uat")) { + email = loadUserProperties().getProperty("ADMIN_USER_DEV"); + } + return email; + } + + public String getAdminPassword() { + String pass = null; + + System.out.println("URL: " + appLibrary.baseUrl); + if (appLibrary.baseUrl.contains("stage")) { + pass = loadUserProperties().getProperty("ADMIN_PASS_STAGE"); + } else if (appLibrary.baseUrl.contains("preprod")) { + pass = loadUserProperties().getProperty("ADMIN_PASS_PREPROD"); + } else if (appLibrary.baseUrl.contains("dev") || appLibrary.baseUrl.contains("uat")) { + pass = loadUserProperties().getProperty("ADMIN_PASS_DEV"); + } + return pass; + } + + public String getUserType() { + String user = null; + if (appLibrary.baseUrl.contains("uat")) { + user = loadUserProperties().getProperty("USER_TYPE"); + } + return user; + } + + @AfterMethod + /*public void checkAlerts(ITestResult result) throws Exception { + if (result.getStatus() == ITestResult.FAILURE) { + try { + String screenshotName = result.getName() + "_" + appLibrary.browser + "_" + + appLibrary.getFormattedDate() + ".png"; + appLibrary.getScreenshot(screenshotName); + AppLibrary.autoLogger("Failed at URL: " + appLibrary.getCurrentDriverInstance().getCurrentUrl()); + int paramsLength = result.getParameters().length; + AppLibrary.autoLogger("ScreenShot for " + testName + " " + + ((paramsLength > 0) ? " with parameter " + result.getParameters()[1] : "") + "saved as " + + screenshotName + ".png"); + + } catch (Exception e) { + AppLibrary.autoLogger("Failed fetching URL and screenshot due to error:" + e.getMessage()); + e.printStackTrace(); + } + + if (appLibrary.getCurrentSessionID() != null) { + AppLibrary.autoLogger("Session id for " + testName + " is " + appLibrary.getCurrentSessionID()); + AppLibrary.autoLogger("Session details for " + testName + + " can be found at https://www.browserstack.com/automate/sessions/" + + appLibrary.getCurrentSessionID() + ".json"); + } + } + + try { + Alert alert = appLibrary.getCurrentDriverInstance().switchTo().alert(); + String alertText = alert.getText(); + alert.accept(); + AppLibrary.autoLogger("Unexpected Alert opened: " + alertText); + } catch (NoAlertPresentException e) { + //Alert was not present + } + + try { + while (appLibrary.getCurrentDriverInstance().getWindowHandles().size() > 1) { + appLibrary.getCurrentDriverInstance().switchTo() + .window((String) appLibrary.getCurrentDriverInstance().getWindowHandles().toArray()[1]).close(); + } + + } catch (Exception e) { + if (appLibrary.getCurrentSessionID() != null) { + AppLibrary.autoLogger("Session id for " + testName + " is " + appLibrary.getCurrentSessionID()); + AppLibrary.autoLogger("Session details for " + testName + + " can be found at https://www.browserstack.com/automate/sessions/" + + appLibrary.getCurrentSessionID()); + } + throw e; + } + + appLibrary.closeBrowser(); + }*/ + + @AfterClass(alwaysRun = true) + public void quitBrowser() { + appLibrary.closeBrowser(); + AppLibrary.autoLogger("Closing the Browser Successfully"); + } + +} diff --git a/src/main/java/com/ttaf/PageObject/ExposedUrlPage.java b/src/main/java/com/ttaf/PageObject/ExposedUrlPage.java new file mode 100644 index 0000000..521dc76 --- /dev/null +++ b/src/main/java/com/ttaf/PageObject/ExposedUrlPage.java @@ -0,0 +1,17 @@ +package com.ttaf.PageObject; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; + +public class ExposedUrlPage extends TestBase +{ + AppLibrary appLibrary; + + public ExposedUrlPage(AppLibrary appLibrary) { + this.appLibrary = appLibrary; + } + + + + +} diff --git a/src/main/java/com/ttaf/PageObject/LoginPage.java b/src/main/java/com/ttaf/PageObject/LoginPage.java new file mode 100644 index 0000000..ee687a5 --- /dev/null +++ b/src/main/java/com/ttaf/PageObject/LoginPage.java @@ -0,0 +1,36 @@ +package com.ttaf.PageObject; + +import com.ttaf.Library.AppLibrary; + +public class LoginPage { + + + public static String txtEmail = "id:txtEmail"; + public static String txtPassword = "id:txtPassword"; + public static String login = "id:kc-login"; + + AppLibrary appLibrary; + + public LoginPage(AppLibrary appLibrary) { + this.appLibrary = appLibrary; + } + + + public NewAPIPage login(String email, String password) throws Exception + { + + appLibrary.enterText(txtEmail, email); + appLibrary.enterText(txtPassword, password); + appLibrary.clickElement(login); + return new NewAPIPage(appLibrary); + + + } + + + + + + + +} diff --git a/src/main/java/com/ttaf/PageObject/NewAPIPage.java b/src/main/java/com/ttaf/PageObject/NewAPIPage.java new file mode 100644 index 0000000..1b91861 --- /dev/null +++ b/src/main/java/com/ttaf/PageObject/NewAPIPage.java @@ -0,0 +1,171 @@ +package com.ttaf.PageObject; + +import org.openqa.selenium.By; +import org.openqa.selenium.support.ui.Select; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; + +public class NewAPIPage extends TestBase { + + public static String btnCreateTest = "id:btnCreateTest"; + public static String GETAPIUrl = "https://reqres.in/api/users?page=2"; + public static String POSTAPIUrl = "https://reqres.in/api/users"; + public static String puturl="https://reqres.in/api/users/2"; + public static String delurl="http://dummy.restapiexample.com/api/v1/employee/1"; + public static String apiname="id:apiName"; + public static String TestsMenu = "id:TestsMenu"; + public static String runapi = "id:run-api"; + public static String Home="xpath://a[text()='Home']"; + + public static String testactionsdropdowntoggle = "id:test-actions-dropdown-toggle"; + + + public static String statuscode="xpath://span[@title='200']"; + + public static String txtSearch = "id:txtSearch"; + public static String nodata="id:divNoData"; + + + public static String crapi = "id:Create_a_basic_request"; + + public static String urlText = "id:urlText"; + public static String saveapi = "id:save-api"; + + public static String httpMethodDropdown = "id:httpMethodDropdown"; + + private AppLibrary appLibrary; + + public static String deleteapi="xpath://span[text()='Delete API']"; + + public static String getapiname=" "; + public static String postapiname=" "; + public static String putapiname=" "; + public static String delapiname=" "; + + public static String recentapi="xpath//a[@title='"+getapiname+"']"; + + + + + + + public NewAPIPage(AppLibrary appLibrary) { + this.appLibrary = appLibrary; + } + + public importPage GETAPI() throws Exception { + appLibrary.clickElement(btnCreateTest); + appLibrary.clickElement(crapi); + + + appLibrary.enterText(urlText, GETAPIUrl); + appLibrary.clickElement(saveapi); + Thread.sleep(2000); + getapiname=appLibrary.findElement(apiname).getAttribute("value"); + System.out.println("API name--------------"+getapiname); + + return new importPage(appLibrary); + + } + + public importPage POSTAPI() throws Exception { + + + + appLibrary.clickElement(btnCreateTest); + appLibrary.clickElement(crapi); + Select drp1 = new Select(appLibrary.findElement(httpMethodDropdown)); + Thread.sleep(2000); + + drp1.selectByVisibleText("POST"); + Thread.sleep(3000); + + appLibrary.enterText(urlText, POSTAPIUrl); + + appLibrary.clickElement(saveapi); + Thread.sleep(2000); + String postapiname=appLibrary.findElement(apiname).getAttribute("value"); + + return new importPage(appLibrary); + + } + + + public importPage PUTAPI() throws Exception { + Thread.sleep(3000); + + appLibrary.clickElement(btnCreateTest); + appLibrary.clickElement(crapi); + Select drp2 = new Select(appLibrary.findElement(httpMethodDropdown)); + Thread.sleep(2000); + + drp2.selectByVisibleText("PUT"); + + appLibrary.enterText(urlText, puturl); + appLibrary.clickElement(saveapi); + Thread.sleep(2000); + + String putapiname=appLibrary.findElement(apiname).getAttribute("value"); + + return new importPage(appLibrary); + + } + public importPage DELAPI() throws Exception { + Thread.sleep(3000); + + appLibrary.clickElement(btnCreateTest); + appLibrary.clickElement(crapi); + Select drp3 = new Select(appLibrary.findElement(httpMethodDropdown)); + Thread.sleep(2000); + drp3.selectByVisibleText("DELETE"); + + appLibrary.enterText(urlText, delurl); + Thread.sleep(2000); + + appLibrary.clickElement(saveapi); + Thread.sleep(2000); + + String delapiname=appLibrary.findElement(apiname).getAttribute("value"); + + return new importPage(appLibrary); + + } + + public importPage RunAPI() throws Exception { + Thread.sleep(2000); + + appLibrary.clickElement(TestsMenu); + Thread.sleep(2000); + + appLibrary.enterText(txtSearch, this.getapiname); + Thread.sleep(2000); + + appLibrary.findElement("xpath://i[@class='http-method-tag' and text()='GET']").click();; + appLibrary.clickElement(runapi); + appLibrary.clickElement(Home); + appLibrary.findElement(statuscode); + return new importPage(appLibrary); + + + } + + public importPage DeleteApi() throws Exception { + + appLibrary.clickElement(recentapi); + appLibrary.clickElement(testactionsdropdowntoggle); + + appLibrary.clickElement(deleteapi); + appLibrary.clickElement(TestsMenu); + Thread.sleep(2000); + + appLibrary.enterText(txtSearch, this.getapiname); + Thread.sleep(2000); + + appLibrary.findElement(nodata); + + return new importPage(appLibrary); + + + } +} diff --git a/src/main/java/com/ttaf/PageObject/SampleLoginPageObject.java b/src/main/java/com/ttaf/PageObject/SampleLoginPageObject.java new file mode 100644 index 0000000..7b30ac7 --- /dev/null +++ b/src/main/java/com/ttaf/PageObject/SampleLoginPageObject.java @@ -0,0 +1,17 @@ +package com.ttaf.PageObject; + +import com.ttaf.Library.AppLibrary; + +public class SampleLoginPageObject { + + AppLibrary appLibrary; + + public String userNameInput = "id:txtUserName"; + public String passInput = "id:txtPassword"; + public String loginBtn = "id:btnLogin"; + + public SampleLoginPageObject(AppLibrary appLibrary) { + this.appLibrary = appLibrary; + } + +} diff --git a/src/main/java/com/ttaf/PageObject/importPage.java b/src/main/java/com/ttaf/PageObject/importPage.java new file mode 100644 index 0000000..5dda292 --- /dev/null +++ b/src/main/java/com/ttaf/PageObject/importPage.java @@ -0,0 +1,47 @@ +package com.ttaf.PageObject; + +import com.ttaf.Library.AppLibrary; + +public class importPage { + AppLibrary appLibrary; + + public static String btnImport="id:btnImport"; + public static String UploadFolderFiles="id:UploadFolderFiles"; + public static String ProjectMenu="id:ProjectMenu"; + public static String collName="xpath://a[text()='CollectionForTesting']"; + + + public importPage(AppLibrary appLibrary) { + this.appLibrary = appLibrary; + } + + public ExposedUrlPage importColl() throws Exception + { + appLibrary.clickElement(btnImport); + + appLibrary.findElement(UploadFolderFiles).sendKeys("/Users/Apple/Documents/APIStrong/ttaf-main/TestData/CollectionForTesting.postman_collection.json"); + + return new ExposedUrlPage(appLibrary); + + } + public ExposedUrlPage verification() throws Exception + { + appLibrary.clickElement(ProjectMenu); + try + { + appLibrary.findElement(collName); + System.out.println("Collection is imported"); + + } + catch(Exception e) + { + System.out.println("Collection is not imported"); + } + + + return new ExposedUrlPage(appLibrary); + + } + + +} diff --git a/src/test/java/com/db/Regression/LoginTest.java b/src/test/java/com/db/Regression/LoginTest.java new file mode 100644 index 0000000..ad78549 --- /dev/null +++ b/src/test/java/com/db/Regression/LoginTest.java @@ -0,0 +1,30 @@ +package com.db.Regression; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; +import com.ttaf.PageObject.LoginPage; +import com.ttaf.PageObject.NewAPIPage; + +public class LoginTest extends TestBase { + + + @BeforeClass + public void setUp() throws Exception { + appLibrary = new AppLibrary("Logintest"); + } + + @Test() + public void LoginTest() throws Exception { + + appLibrary.getDriverInstance(); + appLibrary.launchApp(); + + NewAPIPage np = new LoginPage(appLibrary).login("test24nov@mailinator.com", "test12"); + + } + + +} diff --git a/src/test/java/com/db/Regression/NewAPITest.java b/src/test/java/com/db/Regression/NewAPITest.java new file mode 100644 index 0000000..23253d7 --- /dev/null +++ b/src/test/java/com/db/Regression/NewAPITest.java @@ -0,0 +1,46 @@ +package com.db.Regression; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; +import com.ttaf.PageObject.LoginPage; +import com.ttaf.PageObject.NewAPIPage; +import com.ttaf.PageObject.importPage; + +public class NewAPITest extends TestBase{ + @BeforeClass + public void setUp() throws Exception { + appLibrary = new AppLibrary("New API test"); + } + + @Test() + public void NewAPITest() throws Exception { + + appLibrary.getDriverInstance(); + appLibrary.launchApp(); + appLibrary.Register(); + + importPage np = new NewAPIPage(appLibrary).GETAPI(); + Thread.sleep(2000); + importPage np1 = new NewAPIPage(appLibrary).RunAPI(); + importPage np2 = new NewAPIPage(appLibrary).DeleteApi(); + + //importPage np1 = new NewAPIPage(appLibrary).POSTAPI(); + //importPage np2 = new NewAPIPage(appLibrary).PUTAPI(); + //importPage np3 = new NewAPIPage(appLibrary).DELAPI(); + + + + //new NewAPIPage(appLibrary).login("test24nov@mailinator.com", "test12"); + + //new LoginPage(appLibrary).login("test24nov@mailinator.com", "test12"); + + } + + + + + +} diff --git a/src/test/java/com/db/Regression/SampleTest.java b/src/test/java/com/db/Regression/SampleTest.java new file mode 100644 index 0000000..2ffd9ec --- /dev/null +++ b/src/test/java/com/db/Regression/SampleTest.java @@ -0,0 +1,24 @@ +package com.db.Regression; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; + +public class SampleTest extends TestBase { + + @BeforeClass + public void setUp() throws Exception { + appLibrary = new AppLibrary("addSponsorTest"); + } + + @Test() + public void addSponsorTest() throws Exception { + + appLibrary.getDriverInstance(); + appLibrary.launchApp(); + + } + +} \ No newline at end of file diff --git a/src/test/java/com/db/Regression/SampleTestPrameterized.java b/src/test/java/com/db/Regression/SampleTestPrameterized.java new file mode 100644 index 0000000..9b15ade --- /dev/null +++ b/src/test/java/com/db/Regression/SampleTestPrameterized.java @@ -0,0 +1,40 @@ +package com.db.Regression; + +import java.io.File; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; + +public class SampleTestPrameterized extends TestBase { + + @DataProvider(name = "SponsorData") + public String[][] getDataFromExcel() throws Exception { + String str[][] = appLibrary.readExcel("Resources" + File.separator + "SampleTestData.xls", 0); + return str; + } + + @BeforeClass + public void setUp() throws Exception { + appLibrary = new AppLibrary("addSponsorTest"); + } + + @Test(dataProvider = "SponsorData") + public void addSponsorTest(String paramA, String paramB, String paramC, String paramD, String paramE, + String exeIndicator) throws Exception { + + System.out.println(paramA); + System.out.println(paramB); + System.out.println(paramC); + System.out.println(paramD); + System.out.println(paramE); + System.out.println(exeIndicator); + appLibrary.getDriverInstance(); + appLibrary.launchApp(); + + } + +} \ No newline at end of file diff --git a/src/test/java/com/db/Regression/importTest.java b/src/test/java/com/db/Regression/importTest.java new file mode 100644 index 0000000..80a54c4 --- /dev/null +++ b/src/test/java/com/db/Regression/importTest.java @@ -0,0 +1,34 @@ +package com.db.Regression; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import com.ttaf.Library.AppLibrary; +import com.ttaf.Library.TestBase; +import com.ttaf.PageObject.ExposedUrlPage; +import com.ttaf.PageObject.LoginPage; +import com.ttaf.PageObject.NewAPIPage; +import com.ttaf.PageObject.importPage; + +public class importTest extends TestBase { + + + @BeforeClass + public void setUp() throws Exception { + appLibrary = new AppLibrary("Logintest"); + } + + @Test() + public void importTest() throws Exception { + + appLibrary.getDriverInstance(); + appLibrary.launchApp(); + NewAPIPage np1 =new LoginPage(appLibrary).login("test24nov@mailinator.com", "test12"); + + ExposedUrlPage np2 = new importPage(appLibrary).importColl(); + ExposedUrlPage np3 = new importPage(appLibrary).verification(); + + } + + +} diff --git a/test-output/Default suite/Default test.html b/test-output/Default suite/Default test.html new file mode 100644 index 0000000..dee5ee4 --- /dev/null +++ b/test-output/Default suite/Default test.html @@ -0,0 +1,110 @@ + + +TestNG: Default test + + + + + + + + +

Default test

+ + + + + + + + + + + +
Tests passed/Failed/Skipped:1/0/0
Started on:Thu Nov 26 20:13:51 IST 2020
Total time:24 seconds (24738 ms)
Included groups:
Excluded groups:

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

+ + + + + + + + + + + + +
PASSED TESTS
Test methodExceptionTime (seconds)Instance
importTest
Test class: com.db.Regression.importTest
+Show output + +Show all outputs +
+Finding element using: id:txtEmail
+Finding element, try0 with locator:id:txtEmail
+Finding element using: id:txtPassword
+Finding element, try0 with locator:id:txtPassword
+Finding element using: id:kc-login
+Finding element, try0 with locator:id:kc-login
+Finding element using: id:btnImport
+Finding element, try0 with locator:id:btnImport
+Finding element using: id:UploadFolderFiles
+Finding element, try0 with locator:id:UploadFolderFiles
+Finding element using: id:ProjectMenu
+Finding element, try0 with locator:id:ProjectMenu
+Finding element using: id:ProjectMenu
+Finding element, try0 with locator:id:ProjectMenu
+Finding element using: id:ProjectMenu
+Finding element, try0 with locator:id:ProjectMenu
+Finding element using: id:ProjectMenu
+Finding element, try0 with locator:id:ProjectMenu
+Finding element using: xpath://a[text()='CollectionForTesting']
+Finding element, try0 with locator:xpath://a[text()='CollectionForTesting']
+
+
19com.db.Regression.importTest@52525845

+ + \ No newline at end of file diff --git a/test-output/Default suite/Default test.xml b/test-output/Default suite/Default test.xml new file mode 100644 index 0000000..b3da945 --- /dev/null +++ b/test-output/Default suite/Default test.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test-output/Default suite/testng-failed.xml b/test-output/Default suite/testng-failed.xml new file mode 100644 index 0000000..94c240a --- /dev/null +++ b/test-output/Default suite/testng-failed.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/test-output/bullet_point.png b/test-output/bullet_point.png new file mode 100644 index 0000000..176e6d5 Binary files /dev/null and b/test-output/bullet_point.png differ diff --git a/test-output/collapseall.gif b/test-output/collapseall.gif new file mode 100644 index 0000000..a2d80a9 Binary files /dev/null and b/test-output/collapseall.gif differ diff --git a/test-output/emailable-report.html b/test-output/emailable-report.html new file mode 100644 index 0000000..c97e8ad --- /dev/null +++ b/test-output/emailable-report.html @@ -0,0 +1,18 @@ + + + + +TestNG Report + + + + + + + +
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Default suite
Default test10024,738
+ +
ClassMethodStartTime (ms)
Default suite
Default test — passed
com.db.Regression.importTestimportTest160640183620819668
+

Default test

com.db.Regression.importTest#importTest

Messages
Finding element using: id:txtEmail
Finding element, try0 with locator:id:txtEmail
Finding element using: id:txtPassword
Finding element, try0 with locator:id:txtPassword
Finding element using: id:kc-login
Finding element, try0 with locator:id:kc-login
Finding element using: id:btnImport
Finding element, try0 with locator:id:btnImport
Finding element using: id:UploadFolderFiles
Finding element, try0 with locator:id:UploadFolderFiles
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: xpath://a[text()='CollectionForTesting']
Finding element, try0 with locator:xpath://a[text()='CollectionForTesting']

back to summary

+ + diff --git a/test-output/failed.png b/test-output/failed.png new file mode 100644 index 0000000..c117be5 Binary files /dev/null and b/test-output/failed.png differ diff --git a/test-output/index.html b/test-output/index.html new file mode 100644 index 0000000..5f813a7 --- /dev/null +++ b/test-output/index.html @@ -0,0 +1,277 @@ + + + + + + TestNG reports + + + + + + + + + + +
+ Test results +
+ 1 suite +
+ +
+
+
+
+
+ + com.db.Regression.importTest +
+
+
+
+ + + importTest +
+
+
+
+
+
+
+ /private/var/folders/0p/716f5n213cq6l2xz0xf1swlm0000gp/T/testng-eclipse--1933482820/testng-customsuite.xml +
+
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite thread-count="-1" guice-stage="DEVELOPMENT" name="Default suite">
+  <test verbose="2" name="Default test">
+    <classes>
+      <class name="com.db.Regression.importTest"/>
+    </classes>
+  </test> <!-- Default test -->
+</suite> <!-- Default suite -->
+            
+
+
+
+
+ Tests for Default suite +
+
+
    +
  • + Default test (1 class) +
  • +
+
+
+
+
+ Groups for Default suite +
+
+
+
+
+
+ Times for Default suite +
+
+
+ + Total running time: 19 seconds +
+
+
+
+
+
+
+ Reporter output for Default suite +
+
+
+ importTest +
+ Finding element using: id:txtEmail + Finding element, try0 with locator:id:txtEmail + Finding element using: id:txtPassword + Finding element, try0 with locator:id:txtPassword + Finding element using: id:kc-login + Finding element, try0 with locator:id:kc-login + Finding element using: id:btnImport + Finding element, try0 with locator:id:btnImport + Finding element using: id:UploadFolderFiles + Finding element, try0 with locator:id:UploadFolderFiles + Finding element using: id:ProjectMenu + Finding element, try0 with locator:id:ProjectMenu + Finding element using: id:ProjectMenu + Finding element, try0 with locator:id:ProjectMenu + Finding element using: id:ProjectMenu + Finding element, try0 with locator:id:ProjectMenu + Finding element using: id:ProjectMenu + Finding element, try0 with locator:id:ProjectMenu + Finding element using: xpath://a[text()='CollectionForTesting'] + Finding element, try0 with locator:xpath://a[text()='CollectionForTesting'] +
+
+
+
+
+
+ 0 ignored methods +
+
+
+
+
+
+ Methods in chronological order +
+
+
+
com.db.Regression.importTest
+
+ cleanUp + 0 ms +
+
+ setUp(org.testng.TestRunner@4612b856) + 24 ms +
+
+ setUp + 5066 ms +
+
+ importTest + 5082 ms +
+
+ quitBrowser + 24752 ms +
+
+ quitBrowser + 24752 ms +
+
+
+
+
+ + diff --git a/test-output/jquery-1.7.1.min.js b/test-output/jquery-1.7.1.min.js new file mode 100644 index 0000000..979ed08 --- /dev/null +++ b/test-output/jquery-1.7.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+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(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/test-output/junitreports/TEST-com.db.Regression.LoginTest.xml b/test-output/junitreports/TEST-com.db.Regression.LoginTest.xml new file mode 100644 index 0000000..ae156b6 --- /dev/null +++ b/test-output/junitreports/TEST-com.db.Regression.LoginTest.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test-output/junitreports/TEST-com.db.Regression.NewAPITest.xml b/test-output/junitreports/TEST-com.db.Regression.NewAPITest.xml new file mode 100644 index 0000000..57ccc85 --- /dev/null +++ b/test-output/junitreports/TEST-com.db.Regression.NewAPITest.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/test-output/junitreports/TEST-com.db.Regression.SampleTest.xml b/test-output/junitreports/TEST-com.db.Regression.SampleTest.xml new file mode 100644 index 0000000..0a03652 --- /dev/null +++ b/test-output/junitreports/TEST-com.db.Regression.SampleTest.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + (ChromeDriver.java:157)at com.ttaf.Library.AppLibrary.getDriverInstance(AppLibrary.java:177)at com.db.Regression.SampleTest.addSponsorTest(SampleTest.java:19)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)at org.testng.internal.Invoker.invokeMethod(Invoker.java:571)at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:707)at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:979)at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)at org.testng.TestRunner.privateRun(TestRunner.java:648)at org.testng.TestRunner.run(TestRunner.java:505)at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)at org.testng.SuiteRunner.run(SuiteRunner.java:364)at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)at org.testng.TestNG.runSuites(TestNG.java:1028)at org.testng.TestNG.run(TestNG.java:996)at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)]]> + + + diff --git a/test-output/junitreports/TEST-com.db.Regression.importTest.xml b/test-output/junitreports/TEST-com.db.Regression.importTest.xml new file mode 100644 index 0000000..97368f7 --- /dev/null +++ b/test-output/junitreports/TEST-com.db.Regression.importTest.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test-output/navigator-bullet.png b/test-output/navigator-bullet.png new file mode 100644 index 0000000..36d90d3 Binary files /dev/null and b/test-output/navigator-bullet.png differ diff --git a/test-output/old/Default suite/Default test.properties b/test-output/old/Default suite/Default test.properties new file mode 100644 index 0000000..37da032 --- /dev/null +++ b/test-output/old/Default suite/Default test.properties @@ -0,0 +1 @@ +[SuiteResult context=Default test] \ No newline at end of file diff --git a/test-output/old/Default suite/classes.html b/test-output/old/Default suite/classes.html new file mode 100644 index 0000000..091d88a --- /dev/null +++ b/test-output/old/Default suite/classes.html @@ -0,0 +1,44 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class nameMethod nameGroups
com.db.Regression.importTest  
@Test
 importTest 
@BeforeClass
 setUp 
 setUp 
@BeforeMethod
@AfterMethod
 quitBrowser 
@AfterClass
 quitBrowser 
diff --git a/test-output/old/Default suite/groups.html b/test-output/old/Default suite/groups.html new file mode 100644 index 0000000..199cb3f --- /dev/null +++ b/test-output/old/Default suite/groups.html @@ -0,0 +1 @@ +

Groups used for this test run

\ No newline at end of file diff --git a/test-output/old/Default suite/index.html b/test-output/old/Default suite/index.html new file mode 100644 index 0000000..8ed202c --- /dev/null +++ b/test-output/old/Default suite/index.html @@ -0,0 +1,6 @@ +Results for Default suite + + + + + diff --git a/test-output/old/Default suite/main.html b/test-output/old/Default suite/main.html new file mode 100644 index 0000000..5888ae0 --- /dev/null +++ b/test-output/old/Default suite/main.html @@ -0,0 +1,2 @@ +Results for Default suite +Select a result on the left-hand pane. diff --git a/test-output/old/Default suite/methods-alphabetical.html b/test-output/old/Default suite/methods-alphabetical.html new file mode 100644 index 0000000..fa7d7f3 --- /dev/null +++ b/test-output/old/Default suite/methods-alphabetical.html @@ -0,0 +1,16 @@ +

Methods run, sorted chronologically

>> means before, << means after


Default suite

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

+ + + + + + + + + + + + + + +
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/11/26 20:13:51 0 >>cleanUp      main@1822383117
20/11/26 20:13:56 5074      importTestmain@1822383117
20/11/26 20:14:15 24744     <<quitBrowser  main@1822383117
20/11/26 20:14:15 24744   <<quitBrowser    main@1822383117
20/11/26 20:13:51 21   >>setUp    main@1822383117
20/11/26 20:13:56 5058   >>setUp    main@1822383117
diff --git a/test-output/old/Default suite/methods-not-run.html b/test-output/old/Default suite/methods-not-run.html new file mode 100644 index 0000000..54b14cb --- /dev/null +++ b/test-output/old/Default suite/methods-not-run.html @@ -0,0 +1,2 @@ +

Methods that were not run

+
\ No newline at end of file diff --git a/test-output/old/Default suite/methods.html b/test-output/old/Default suite/methods.html new file mode 100644 index 0000000..644ea3f --- /dev/null +++ b/test-output/old/Default suite/methods.html @@ -0,0 +1,16 @@ +

Methods run, sorted chronologically

>> means before, << means after


Default suite

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

+ + + + + + + + + + + + + + +
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/11/26 20:13:51 0 >>cleanUp      main@1822383117
20/11/26 20:13:51 21   >>setUp    main@1822383117
20/11/26 20:13:56 5058   >>setUp    main@1822383117
20/11/26 20:13:56 5074      importTestmain@1822383117
20/11/26 20:14:15 24744     <<quitBrowser  main@1822383117
20/11/26 20:14:15 24744   <<quitBrowser    main@1822383117
diff --git a/test-output/old/Default suite/reporter-output.html b/test-output/old/Default suite/reporter-output.html new file mode 100644 index 0000000..9dff0bc --- /dev/null +++ b/test-output/old/Default suite/reporter-output.html @@ -0,0 +1,33 @@ +

Reporter output

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
url:https://dev.apistrong.com/
browserName:chrome
driverAgent:chromedriver
executionEnvironment:local
browserStackUserName:null
browserStackAuthKey:null
browserStackBrowserVersion:null
browserStackOSVersion:null
os:null
outputPath:output
Finding element using: id:txtEmail
Finding element, try0 with locator:id:txtEmail
Finding element using: id:txtPassword
Finding element, try0 with locator:id:txtPassword
Finding element using: id:kc-login
Finding element, try0 with locator:id:kc-login
Finding element using: id:btnImport
Finding element, try0 with locator:id:btnImport
Finding element using: id:UploadFolderFiles
Finding element, try0 with locator:id:UploadFolderFiles
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: id:ProjectMenu
Finding element, try0 with locator:id:ProjectMenu
Finding element using: xpath://a[text()='CollectionForTesting']
Finding element, try0 with locator:xpath://a[text()='CollectionForTesting']
Closing the Browser Successfully
Closing the Browser Successfully
\ No newline at end of file diff --git a/test-output/old/Default suite/testng.xml.html b/test-output/old/Default suite/testng.xml.html new file mode 100644 index 0000000..d6dfa3c --- /dev/null +++ b/test-output/old/Default suite/testng.xml.html @@ -0,0 +1 @@ +testng.xml for Default suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="-1" guice-stage="DEVELOPMENT" name="Default suite">
  <test verbose="2" name="Default test">
    <classes>
      <class name="com.db.Regression.importTest"/>
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->
\ No newline at end of file diff --git a/test-output/old/Default suite/toc.html b/test-output/old/Default suite/toc.html new file mode 100644 index 0000000..e58eee3 --- /dev/null +++ b/test-output/old/Default suite/toc.html @@ -0,0 +1,30 @@ + + +Results for Default suite + + + + +

Results for
Default suite

+ + + + + + + + + + +
1 test1 class1 method:
+  chronological
+  alphabetical
+  not run (0)
0 groupreporter outputtestng.xml
+ +

+

+
Default test (1/0/0) + Results +
+
+ \ No newline at end of file diff --git a/test-output/old/index.html b/test-output/old/index.html new file mode 100644 index 0000000..e8f52f8 --- /dev/null +++ b/test-output/old/index.html @@ -0,0 +1,9 @@ + + + + +

Test results

+ + + +
SuitePassedFailedSkippedtestng.xml
Total100 
Default suite100Link
diff --git a/test-output/passed.png b/test-output/passed.png new file mode 100644 index 0000000..45e85bb Binary files /dev/null and b/test-output/passed.png differ diff --git a/test-output/skipped.png b/test-output/skipped.png new file mode 100644 index 0000000..c36a324 Binary files /dev/null and b/test-output/skipped.png differ diff --git a/test-output/testng-failed.xml b/test-output/testng-failed.xml new file mode 100644 index 0000000..94c240a --- /dev/null +++ b/test-output/testng-failed.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/test-output/testng-reports.css b/test-output/testng-reports.css new file mode 100644 index 0000000..6c65926 --- /dev/null +++ b/test-output/testng-reports.css @@ -0,0 +1,309 @@ +body { + margin: 0px 0px 5px 5px; +} + +ul { + margin: 0px; +} + +li { + list-style-type: none; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.navigator-selected { + background: #ffa500; +} + +.wrapper { + position: absolute; + top: 60px; + bottom: 0; + left: 400px; + right: 0; + overflow: auto; +} + +.navigator-root { + position: absolute; + top: 60px; + bottom: 0; + left: 0; + width: 400px; + overflow-y: auto; +} + +.suite { + margin: 0px 10px 10px 0px; + background-color: #fff8dc; +} + +.suite-name { + padding-left: 10px; + font-size: 25px; + font-family: Times; +} + +.main-panel-header { + padding: 5px; + background-color: #9FB4D9; //afeeee; + font-family: monospace; + font-size: 18px; +} + +.main-panel-content { + padding: 5px; + margin-bottom: 10px; + background-color: #DEE8FC; //d0ffff; +} + +.rounded-window { + border-radius: 10px; + border-style: solid; + border-width: 1px; +} + +.rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; + border-style: solid; + border-width: 1px; + overflow: auto; +} + +.light-rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; +} + +.rounded-window-bottom { + border-style: solid; + border-width: 0px 1px 1px 1px; + border-bottom-right-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + overflow: auto; +} + +.method-name { + font-size: 12px; + font-family: monospace; +} + +.method-content { + border-style: solid; + border-width: 0px 0px 1px 0px; + margin-bottom: 10; + padding-bottom: 5px; + width: 80%; +} + +.parameters { + font-size: 14px; + font-family: monospace; +} + +.stack-trace { + white-space: pre; + font-family: monospace; + font-size: 12px; + font-weight: bold; + margin-top: 0px; + margin-left: 20px; +} + +.testng-xml { + font-family: monospace; +} + +.method-list-content { + margin-left: 10px; +} + +.navigator-suite-content { + margin-left: 10px; + font: 12px 'Lucida Grande'; +} + +.suite-section-title { + margin-top: 10px; + width: 80%; + border-style: solid; + border-width: 1px 0px 0px 0px; + font-family: Times; + font-size: 18px; + font-weight: bold; +} + +.suite-section-content { + list-style-image: url(bullet_point.png); +} + +.top-banner-root { + position: absolute; + top: 0; + height: 45px; + left: 0; + right: 0; + padding: 5px; + margin: 0px 0px 5px 0px; + background-color: #0066ff; + font-family: Times; + color: #fff; + text-align: center; +} + +.top-banner-title-font { + font-size: 25px; +} + +.test-name { + font-family: 'Lucida Grande'; + font-size: 16px; +} + +.suite-icon { + padding: 5px; + float: right; + height: 20; +} + +.test-group { + font: 20px 'Lucida Grande'; + margin: 5px 5px 10px 5px; + border-width: 0px 0px 1px 0px; + border-style: solid; + padding: 5px; +} + +.test-group-name { + font-weight: bold; +} + +.method-in-group { + font-size: 16px; + margin-left: 80px; +} + +table.google-visualization-table-table { + width: 100%; +} + +.reporter-method-name { + font-size: 14px; + font-family: monospace; +} + +.reporter-method-output-div { + padding: 5px; + margin: 0px 0px 5px 20px; + font-size: 12px; + font-family: monospace; + border-width: 0px 0px 0px 1px; + border-style: solid; +} + +.ignored-class-div { + font-size: 14px; + font-family: monospace; +} + +.ignored-methods-div { + padding: 5px; + margin: 0px 0px 5px 20px; + font-size: 12px; + font-family: monospace; + border-width: 0px 0px 0px 1px; + border-style: solid; +} + +.border-failed { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0px 0px 0px 10px; + border-color: #f00; +} + +.border-skipped { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0px 0px 0px 10px; + border-color: #edc600; +} + +.border-passed { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0px 0px 0px 10px; + border-color: #19f52d; +} + +.times-div { + text-align: center; + padding: 5px; +} + +.suite-total-time { + font: 16px 'Lucida Grande'; +} + +.configuration-suite { + margin-left: 20px; +} + +.configuration-test { + margin-left: 40px; +} + +.configuration-class { + margin-left: 60px; +} + +.configuration-method { + margin-left: 80px; +} + +.test-method { + margin-left: 100px; +} + +.chronological-class { + background-color: #0ccff; + border-style: solid; + border-width: 0px 0px 1px 1px; +} + +.method-start { + float: right; +} + +.chronological-class-name { + padding: 0px 0px 0px 5px; + color: #008; +} + +.after, .before, .test-method { + font-family: monospace; + font-size: 14px; +} + +.navigator-suite-header { + font-size: 22px; + margin: 0px 10px 5px 0px; + background-color: #deb887; + text-align: center; +} + +.collapse-all-icon { + padding: 5px; + float: right; +} diff --git a/test-output/testng-reports.js b/test-output/testng-reports.js new file mode 100644 index 0000000..b147043 --- /dev/null +++ b/test-output/testng-reports.js @@ -0,0 +1,122 @@ +$(document).ready(function() { + $('a.navigator-link').click(function() { + // Extract the panel for this link + var panel = getPanelName($(this)); + + // Mark this link as currently selected + $('.navigator-link').parent().removeClass('navigator-selected'); + $(this).parent().addClass('navigator-selected'); + + showPanel(panel); + }); + + installMethodHandlers('failed'); + installMethodHandlers('skipped'); + installMethodHandlers('passed', true); // hide passed methods by default + + $('a.method').click(function() { + showMethod($(this)); + return false; + }); + + // Hide all the panels and display the first one (do this last + // to make sure the click() will invoke the listeners) + $('.panel').hide(); + $('.navigator-link').first().click(); + + // Collapse/expand the suites + $('a.collapse-all-link').click(function() { + var contents = $('.navigator-suite-content'); + if (contents.css('display') == 'none') { + contents.show(); + } else { + contents.hide(); + } + }); +}); + +// The handlers that take care of showing/hiding the methods +function installMethodHandlers(name, hide) { + function getContent(t) { + return $('.method-list-content.' + name + "." + t.attr('panel-name')); + } + + function getHideLink(t, name) { + var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); + return $(s); + } + + function getShowLink(t, name) { + return $('a.show-methods.' + name + "." + t.attr('panel-name')); + } + + function getMethodPanelClassSel(element, name) { + var panelName = getPanelName(element); + var sel = '.' + panelName + "-class-" + name; + return $(sel); + } + + $('a.hide-methods.' + name).click(function() { + var w = getContent($(this)); + w.hide(); + getHideLink($(this), name).hide(); + getShowLink($(this), name).show(); + getMethodPanelClassSel($(this), name).hide(); + }); + + $('a.show-methods.' + name).click(function() { + var w = getContent($(this)); + w.show(); + getHideLink($(this), name).show(); + getShowLink($(this), name).hide(); + showPanel(getPanelName($(this))); + getMethodPanelClassSel($(this), name).show(); + }); + + if (hide) { + $('a.hide-methods.' + name).click(); + } else { + $('a.show-methods.' + name).click(); + } +} + +function getHashForMethod(element) { + return element.attr('hash-for-method'); +} + +function getPanelName(element) { + return element.attr('panel-name'); +} + +function showPanel(panelName) { + $('.panel').hide(); + var panel = $('.panel[panel-name="' + panelName + '"]'); + panel.show(); +} + +function showMethod(element) { + var hashTag = getHashForMethod(element); + var panelName = getPanelName(element); + showPanel(panelName); + var current = document.location.href; + var base = current.substring(0, current.indexOf('#')) + document.location.href = base + '#' + hashTag; + var newPosition = $(document).scrollTop() - 65; + $(document).scrollTop(newPosition); +} + +function drawTable() { + for (var i = 0; i < suiteTableInitFunctions.length; i++) { + window[suiteTableInitFunctions[i]](); + } + + for (var k in window.suiteTableData) { + var v = window.suiteTableData[k]; + var div = v.tableDiv; + var data = v.tableData + var table = new google.visualization.Table(document.getElementById(div)); + table.draw(data, { + showRowNumber : false + }); + } +} diff --git a/test-output/testng-results.xml b/test-output/testng-results.xml new file mode 100644 index 0000000..8d7cffe --- /dev/null +++ b/test-output/testng-results.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/testng.css b/test-output/testng.css new file mode 100644 index 0000000..3904800 --- /dev/null +++ b/test-output/testng.css @@ -0,0 +1,9 @@ +.invocation-failed, .test-failed { background-color: #DD0000; } +.invocation-percent, .test-percent { background-color: #006600; } +.invocation-passed, .test-passed { background-color: #00AA00; } +.invocation-skipped, .test-skipped { background-color: #CCCC00; } + +.main-page { + font-size: x-large; +} + diff --git a/testngRegression.xml b/testngRegression.xml new file mode 100644 index 0000000..09bca53 --- /dev/null +++ b/testngRegression.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file