{"id":22912257,"url":"https://github.com/geozi/selenium-java-junit-popupwindow","last_synced_at":"2025-04-01T11:16:34.113Z","repository":{"id":252679017,"uuid":"841119047","full_name":"geozi/selenium-java-junit-popupwindow","owner":"geozi","description":"Showcases the use of Selenium with Java and JUnit for performing functional tests on a pop-up window.","archived":false,"fork":false,"pushed_at":"2025-01-02T11:48:40.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T06:23:36.470Z","etag":null,"topics":["functional-testing","junit5","oop","selenium-java","surefire-reporting"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geozi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-11T17:37:42.000Z","updated_at":"2025-01-02T11:48:43.000Z","dependencies_parsed_at":"2024-08-14T07:58:19.902Z","dependency_job_id":null,"html_url":"https://github.com/geozi/selenium-java-junit-popupwindow","commit_stats":null,"previous_names":["geozi/selenium-java-junit-feature1","geozi/selenium-java-junit-popupwindow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geozi%2Fselenium-java-junit-popupwindow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geozi%2Fselenium-java-junit-popupwindow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geozi%2Fselenium-java-junit-popupwindow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geozi%2Fselenium-java-junit-popupwindow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geozi","download_url":"https://codeload.github.com/geozi/selenium-java-junit-popupwindow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246628225,"owners_count":20808106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-testing","junit5","oop","selenium-java","surefire-reporting"],"created_at":"2024-12-14T04:27:26.723Z","updated_at":"2025-04-01T11:16:34.092Z","avatar_url":"https://github.com/geozi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# selenium-java-junit-popupwindow\n![Functional Testing Demo App](https://img.shields.io/badge/Demo_project-blue)\n\n### About the project\nThe project showcases the use of Selenium with Java and JUnit for performing functional tests on a pop-up window.\n\n### Website[^1]\nThe website where the element is located is the https://www.netcompany-intrasoft.com/ .\n\n### Web element under test\n\nThe web element tested was the cookie pop-up window found on the landing page of the website:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/183fa067-e0e9-4c18-a9bd-e60fe477b37e\"\u003e\n\u003c/div\u003e\n\n### OOP\n\nTo make full use of Java as a pure Object-Oriented language and, by extension, optimize code organization, a small class hierarchy was developed. Each subclass simulates a concrete user action.\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"https://github.com/user-attachments/assets/4e7e00c4-c54b-42e3-8234-e38519ec3efa\"\u003e\n\u003c/div\u003e\n\n### Horizontal vs vertical testing\n\nThere are 6 test classes, each of which corresponds to an element of the pop-up window. Taking advantage of JUnit's ordering capabilities, the test classes are run according to a custom order (horizontal testing).\n\n| Ordering number | Window element  | Test class |\n|------------- | ------------- | ------------- |\n| #1 | 'click me' link  | ClickMeTest  |\n| #2 | Analytics checkbox | PerformanceCheckBoxTest |\n| #3 | Twitter checkbox | TwitterCheckBoxTex |\n| #4 | Meta checkbox| FacebookCheckBoxTest |\n| #5 | Accept All Cookies button | AcceptAllCookiesTest |\n| #6 | Reject All Cookies button| RejectAllCookiesTest |\n\nFurthermore, each class contains test methods that correspond to a series of simulated steps per window element. As in the case of the test classes, the test methods are run according to a custom order (vertical testing).\n\n### Prerequisites\n* Java 17 or higher,\n* Intellij IDEA (or any other Java IDE),\n* Maven,\n* Selenium.\n\n### Dependencies\n```xml\n  \u003cdependencies\u003e\n    \u003c!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.seleniumhq.selenium\u003c/groupId\u003e\n      \u003cartifactId\u003eselenium-java\u003c/artifactId\u003e\n      \u003cversion\u003e4.23.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n    \u003c!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-firefox-driver --\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.seleniumhq.selenium\u003c/groupId\u003e\n      \u003cartifactId\u003eselenium-firefox-driver\u003c/artifactId\u003e\n      \u003cversion\u003e4.23.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n    \u003c!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver --\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.seleniumhq.selenium\u003c/groupId\u003e\n      \u003cartifactId\u003eselenium-chrome-driver\u003c/artifactId\u003e\n      \u003cversion\u003e4.23.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n    \u003c!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine --\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.junit.jupiter\u003c/groupId\u003e\n      \u003cartifactId\u003ejunit-jupiter-engine\u003c/artifactId\u003e\n      \u003cversion\u003e5.10.3\u003c/version\u003e\n      \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n\n    \u003c!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api --\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.junit.jupiter\u003c/groupId\u003e\n      \u003cartifactId\u003ejunit-jupiter-api\u003c/artifactId\u003e\n      \u003cversion\u003e5.10.3\u003c/version\u003e\n      \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n```\n\n### Further documentation\n\nFor more information, please check the provided javadoc.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://skillicons.dev\"\u003e\n    \u003cimg src=\"https://skillicons.dev/icons?i=java,idea,maven,selenium\u0026theme=light\"/\u003e\n\t \n  \u003c/a\u003e\n\u003c/p\u003e\n\n[^1]: Disclaimer: This website was tested in order to showcase the use of Selenium with Java and JUnit 5, and such testing does not constitute an endorsement or promotion of said website.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeozi%2Fselenium-java-junit-popupwindow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeozi%2Fselenium-java-junit-popupwindow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeozi%2Fselenium-java-junit-popupwindow/lists"}