{"id":28807415,"url":"https://github.com/xdev-software/selenium-elements","last_synced_at":"2026-04-04T06:34:59.635Z","repository":{"id":298848709,"uuid":"1001296258","full_name":"xdev-software/selenium-elements","owner":"xdev-software","description":"Define Selenium HTML elements as Java classes and access them easily","archived":false,"fork":false,"pushed_at":"2025-07-16T04:24:07.000Z","size":760,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-07-18T05:09:43.892Z","etag":null,"topics":["browser","elements","java","selenium"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xdev-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-13T06:31:12.000Z","updated_at":"2025-07-17T09:44:47.000Z","dependencies_parsed_at":"2025-06-13T08:37:21.866Z","dependency_job_id":"7d23aca8-62c3-40b8-8a2d-f6565d0eefa9","html_url":"https://github.com/xdev-software/selenium-elements","commit_stats":null,"previous_names":["xdev-software/selenium-elements"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xdev-software/selenium-elements","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdev-software%2Fselenium-elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdev-software%2Fselenium-elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdev-software%2Fselenium-elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdev-software%2Fselenium-elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xdev-software","download_url":"https://codeload.github.com/xdev-software/selenium-elements/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdev-software%2Fselenium-elements/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267205989,"owners_count":24052762,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["browser","elements","java","selenium"],"created_at":"2025-06-18T12:00:38.549Z","updated_at":"2026-04-04T06:34:59.601Z","avatar_url":"https://github.com/xdev-software.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest version](https://img.shields.io/maven-central/v/software.xdev/selenium-elements?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/selenium-elements)\n[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/selenium-elements/check-build.yml?branch=develop)](https://github.com/xdev-software/selenium-elements/actions/workflows/check-build.yml?query=branch%3Adevelop)\n\n# \u003cimg src=\"https://raw.githubusercontent.com/SeleniumHQ/seleniumhq.github.io/690acbad7b4bf4656f116274809765db64e6ccf7/website_and_docs/static/images/logos/webdriver.svg\" width=24 /\u003e Elements for Selenium\n\nDefine Selenium HTML elements as Java classes, similar to Selenium's [``@FindBy`` annotation](https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/FindBy.html).\n\nAlso contains a ton of other predefined utility, for example:\n* Automatically scrolls elements that perform operations into the view\n* Safe click: When an element is detected as stale a JavaScript click is executed instead\n* Option to globally wait until the page finished loading\n* Waiting for some time until the element is present (``waitUntil``)\n\nOverall this should result in:\n* Less [flaky](https://www.browserstack.com/test-reporting-and-analytics/features/test-reporting/what-is-flaky-test) tests\n* Abstraction of elements in an object oriented way\n\n## Usage\n\n1. Define the elements you want to access\n    ```java\n    @FindBySelector(tagName = \"body\")\n    abstract class BodyElement implements ImprovedWebElement {\n        public MyElement myElement() {\n            return waitForFirst(MyElement.class);\n        }\n    }\n\n    @FindBySelector(id = \"abc\")\n    abstract class MyElement implements ImprovedWebElement {\n    }\n    ```\n2. Utilize the predefined methods and classes to get/access the elements in a test\n    ```java\n    class MyWebDriverTest implements CanFindElements {\n        WebDriver webDriver;\n\n        @BeforeEach\n        void beforeEach() {\n            webDriver = createWebDriver();\n            CustomizableRemoteWebElementInstaller.install(\n                webDriver,\n                () -\u003e new ImprovedRemoteWebElement(\n                    \"return document.readyState == 'complete';\")\n            );\n        }\n\n        @Test\n        void test() {\n            MyElement myElement = waitForFirst(BodyElement.class).myElement();\n            assertEquals(\"Hello world\", myElement.getText());\n\n            // Or alternatively\n            ElementInstantiatorInstance.instance().find(webDriver, BodyElement.class);\n        }\n\n        @AfterEach\n        void afterEach() {\n            // Stop webDriver here...\n            webDriver = null;\n        }\n\n        @Override\n        public WebDriver getWebDriver() {\n            return webDriver;\n        }\n    }\n    ```\n\nYou can also checkout the [integrated tests](./selenium-elements/src/test/java/) to see this in action.\n\n## Installation\n[Installation guide for the latest release](https://github.com/xdev-software/selenium-elements/releases/latest#Installation)\n\n## Support\nIf you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).\n\n## Contributing\nSee the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.\n\n## Dependencies and Licenses\nView the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/selenium-elements/dependencies)\n\n\u003csub\u003eDisclaimer: This is not an official Testcontainers/Selenium product and not associated\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxdev-software%2Fselenium-elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxdev-software%2Fselenium-elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxdev-software%2Fselenium-elements/lists"}