{"id":19041665,"url":"https://github.com/hudsonssrosa/java-upperselenium","last_synced_at":"2026-05-16T22:02:05.598Z","repository":{"id":126290230,"uuid":"376062773","full_name":"hudsonssrosa/java-upperselenium","owner":"hudsonssrosa","description":"JAVA SELENIUM - OLD PROJECT FOR WEB TEST AUTOMATION","archived":false,"fork":false,"pushed_at":"2021-06-11T15:21:47.000Z","size":1949,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-18T11:54:03.176Z","etag":null,"topics":["html-report","java","selenium-java"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hudsonssrosa.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":"2021-06-11T15:08:50.000Z","updated_at":"2021-06-15T00:13:04.000Z","dependencies_parsed_at":"2023-06-16T04:00:13.757Z","dependency_job_id":null,"html_url":"https://github.com/hudsonssrosa/java-upperselenium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hudsonssrosa/java-upperselenium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonssrosa%2Fjava-upperselenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonssrosa%2Fjava-upperselenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonssrosa%2Fjava-upperselenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonssrosa%2Fjava-upperselenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hudsonssrosa","download_url":"https://codeload.github.com/hudsonssrosa/java-upperselenium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudsonssrosa%2Fjava-upperselenium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33120450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["html-report","java","selenium-java"],"created_at":"2024-11-08T22:30:44.301Z","updated_at":"2026-05-16T22:02:05.563Z","avatar_url":"https://github.com/hudsonssrosa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"     __    __  _____   _____    _____   ______        _______   _____  \n    |  |  |  ||   _ \\ |   _ \\  / ___ \\ |   _  \\   _  /  _____] / ___ \\ \n    |  |  |  ||  |_) )|  |_) )| |___) )|  |_)  ) (_) \\____  \\ | |___) )\n    |  |__|  ||  ___/ |  ___/ |  ____/ |  _   /      _____)  )|  ____/ \n     \\______/ |__|    |__|     \\_____\\ |__|\\__\\      [______/  \\_____\\ \n\n\t                          R E A D  M E\n\t   \n                    Developed by: Hudson S. S. Rosa\n\t\t\t\t\t   \nGo ahead and try:\n\n```\n$ git clone git@github.com:hudsonssrosa/upperselenium.git\n```\n\n### 1. UpperSelenium Test Automation ###\nWith this TDD framework you can:\n#### 1.1. Choose different browsers/webdrivers to execute your tests: **Firefox, Chrome, PhantomJS and Edge**.\n#### 1.2. Execute all tests by **Suite**.\n#### 1.3. Generate results with detailed logs on console and complete **HTML Report**. \n#### 1.4. The HTML Report contains screenshot from failed stages web page.\n#### 1.5. View all suite results in a general **bar graph**.\n#### 1.6. Implement tests using concepts as **Suite, Flow, Stages and Page Objects**.\n#### 1.7. Create Data Mass using JSon files - This makes it easier to reuse Stages.\n\n### 2. Test Classes Structure ###\n\n```\n#!java\nPACKAGES:\nsrc/main/java\n  |___br.com.upperselenium\n      |__test\n         |\"SuitesExecutor.java\"\n         |__flow\n         |     SampleFlow.java\n         |__stage\n         |  |  \u003capp functionality name\u003e\n         |  |__dpo\n         |  |  SampleDPO.java\n         |  |__page\n         |     SamplePage.java\n         |__suite\n               SampleSuite.java\n\nFOLDERS:\nsrc/main/resources\n  |___dataprovider\n      |__sampleFlow\n               SampleDP.json\n\n```\n\n### 3. How do I implement tests? ###\n* 3.1. Create Page Object class and mapping all the web elements using in the test. Just extract XPaths from the page. Invoke element actions methods implemented in superclass and pass parameter value to use in the test.\n\n```\n#!java\n\npublic class LoginSamplePage extends BasePage{\n\tprivate static final String BUTTON_ENTER = \".//div[2]/div/form/div/button\";\t\n\tprivate static final String TEXT_USER = \"//*[@id='UserName']\";\t\n\tprivate static final String TEXT_PASS = \"//*[@id='Password']\";\t\n\t\t\n\tpublic void clickEnter(){\n\t\tclickOnElement(BUTTON_ENTER);\n\t}\n\n\tpublic void typeTextUser(String value){\n\t\ttypeTextField(TEXT_USER, value);\n\t}\n\n\tpublic void typeTextPassword(String value){\n\t\ttypeTextField(TEXT_PASS, value);\n\t}\t\t\n}\n```\n\n* 3.2. Create data mass with a JSon file locating in \"src\\main\\resources\\dataprovider\\...\\SampleDP.json\"\n\n\nLoginSampleDP.json - Consumed by \"LoginStage.java\"\n```\n#!json\n\n{\n    \"url\": \"http://localhost/app\",\n    \"user\": \"theUserName\",\n    \"pass\": \"me123456\",\n\t\"message\": \"User connected successfully\"\n}\n```\nSampleDP.json - Consumed by \"SampleStage.java\"\n```\n#!json\n\n{\n\t\"name\": \"Hudson Rosa\",\n\t\"occupation\": \"Quality Engineer\"\n}\n```\n\n* 3.3. Create a DPO class (Data Provider Object). This is a POJO file used to transfer information from JSon file to an object during the test execution. For example, if you need to create a class with the name \"LoginSampleDPO.java\", do this basically.\n\nNote: To create the Constructor, Getters, Setters and ToString method you can set shortcuts to make it easier your class implementation.\n\n```\n#!java\n\npublic class LoginSampleDPO {\n\n    private String url;\n    private String user;\n    private String pass;\n    private String message;\n\n    public LoginSampleDPO(String url, String user, String pass, String message) {\n        super();\n        this.url = url;\n        this.user = user;\n        this.pass = pass;\n        this.message = message;\n    }\n\n    public String getUrl() {\n        return url;\n    }\n\n    public void setUrl(String url) {\n        this.url = url;\n    }\n\n    public String getUser() {\n        return user;\n    }\n\n    public void setUser(String user) {\n        this.user = user;\n    }\n\n    public String getPass() {\n        return pass;\n    }\n\n    public void setPass(String pass) {\n        this.pass = pass;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public void setMessage(String message) {\n        this.message= message;\n    }\n\n    @Override\n    public String toString() {\n        return \"LoginSampleDPO [url=\" + url \n\t\t\t\t\t\t   + \", user=\" + user \n\t\t\t\t\t\t   + \", pass=\" + pass \n\t\t\t\t\t\t   + \", message=\" + message + \"]\";\n    }\n}\n```\n\n* 3.4. Create a Stage class. This class will aggregate actions semantically of application with Page Object and DPO class instantiation. Is required implement these flollowing methods:\n\n```\n#!java\n\npublic class LoginStage extends BaseStage {\n\tprivate LoginSampleDPO loginSampleDPO;\n\tprivate LoginSamplePage loginSamplePage;\n\n\tpublic LoginStage(String dpSample) {\n\t\tloginSampleDPO = loadDataProviderFile(LoginSampleDPO.class, dpSample);\n\t}\n\n\t@Override\n\tpublic void initMappedPages() {\n\t\tloginSamplePage = initElementsFromPage(LoginSamplePage.class);    \n\t}\n\n\t@Override\n\tpublic void runStage() {\n\t\tWebDriverMaster.getWebDriver().get(loginSampleDPO.getUrl());\t\t\t\n\t\twaitForPageToLoad(TimePRM._10_SECS);\n\t\tloginSamplePage.typeTextUser(loginSampleDPO.getUser());\n        loginSamplePage.typeTextPassword(loginSampleDPO.getPass());\n\t\tloginSamplePage.clickEnter();\n\t}\n\n\t@Override\n\tpublic void runValidations() {\n\t\tvalidateField();\n\t\t//... Add new validations here\n\t}\n\n\tprivate void validateField() {             \n\t\tString expectedMessage = loginSampleDPO.getMessage();\n\t\tString actualMessage = loginSamplePage.getMessage();\n\t\tAssertUtil.assertEquals(expectedMessage, actualMessage);\n\t}\n}\n```\n\n* 3.5. Create a Flow class invoking the Stage and set test parameters. Attribute the \"SampleDPs.json\" path in a String constant.\n\n```\n#!java\n\n@FlowParams\n(idTest = \"T0001_Sample\",\ntestDirPath = \"dataprovider/sample/Sample\",\nloginDirPath = \"dataprovider/sample/Login\",\ngoal = \"Access the application and validate Home Page\",\nsuiteClass = SampleSuite.class)\n\npublic class T0000SampleFlow extends BaseFlow {\n\n\tprivate String dpSample = getDPFileName(\"SampleDP\");\n\tprivate String dpLoginSample = getLoginDPFileName(\"LoginSampleDP\");\n\n\t@Override\n\tprotected void addFlowStages() {\n\t\taddStage(new LoginStage(dpLoginSample));\n\t\taddStage(new SampleStage(dpSample));\n\t\t//... Add new Stages here\n\t}\t\n}\n```\n\n* 3.6. Create a Suite class to organize Flows semantically and in order for execution.\n\n```\n#!java\n\n@RunWith(Suite.class)\n\n            @SuiteClasses({\n                SampleFlow.class,\n                //...AnotherSampleFlow.class                 \n            })\n\n            @SuiteParams(description=\"Tests About Sample Application\")\n            public class SampleSuite extends SuiteBase {}\n```\n\n\n### 4. How do I run tests? ###\n\n* 4.1. Set the following parameter of \"test_config.properties\":\n\n```\n#!java\n    browserType=chrome\n    deleteAllReports=true\n    reportDirectory=report/\n    timeWaitingDefault=5\n    showContextVariables=false\n```\n\n* 4.2. In Eclipse (developer mode), execute the file \"SuitesExecutor.java\" after entering the desired class suite.\n\n```\n#!java\n\n            public static List\u003cClass\u003c?\u003e\u003e runSuites() {\n                suites.add(SampleSuite.class);\n                return suites;\n            }\n```\n\n* 4.3. When all the tests are completed, collect the report in folder specified in \"test_config.properties\". For example, consider the path \"report/\" and the HTML file created.\n\n```\n#!java\n\nupperselenium-automation\n  |___report\n      |\"SuiteReport_01-01-2017_at_00-00-00.html\"\n```\n\n### 5. Who do I talk to? ###\n\n* Author: Hudson Steffanni Soares Rosa (hudsonssrosa@gmail.com)\n\nHave fun!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudsonssrosa%2Fjava-upperselenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhudsonssrosa%2Fjava-upperselenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudsonssrosa%2Fjava-upperselenium/lists"}