{"id":15177565,"url":"https://github.com/mcarneirobug/selenium","last_synced_at":"2026-03-09T17:09:03.751Z","repository":{"id":248125457,"uuid":"827828911","full_name":"mcarneirobug/selenium","owner":"mcarneirobug","description":"Selenium","archived":false,"fork":false,"pushed_at":"2024-07-12T15:27:16.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T20:47:55.292Z","etag":null,"topics":["java","selenium-java","selenium-webdriver","webdriver"],"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/mcarneirobug.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-07-12T13:15:25.000Z","updated_at":"2024-07-12T15:27:20.000Z","dependencies_parsed_at":"2024-07-12T15:17:43.553Z","dependency_job_id":"f704ab5c-bec7-43a1-a22d-5fc199a3afef","html_url":"https://github.com/mcarneirobug/selenium","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"af72317b031b198b6709d7dfa9039281eaf3419a"},"previous_names":["mcarneirobug/selenium"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcarneirobug%2Fselenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcarneirobug%2Fselenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcarneirobug%2Fselenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcarneirobug%2Fselenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcarneirobug","download_url":"https://codeload.github.com/mcarneirobug/selenium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242197850,"owners_count":20087885,"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":["java","selenium-java","selenium-webdriver","webdriver"],"created_at":"2024-09-27T14:40:28.829Z","updated_at":"2026-03-09T17:08:58.715Z","avatar_url":"https://github.com/mcarneirobug.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium WebDriver Demo 🚀\n\nThis repository demonstrates various Selenium WebDriver functionalities, including iterating through checkboxes, radio buttons, working with select elements, using CSS selectors, handling tables, images, and setting up a remote WebDriver. Below is a detailed explanation of the code and its functionalities.\n\n## Table of Contents 📚\n\n- [Setup](#setup-%EF%B8%8F)\n- [Usage](#usage-)\n- [Examples](#examples-)\n  - [Checkboxes](#checkboxes-%EF%B8%8F)\n  - [Radio Buttons](#radio-buttons-)\n  - [Select Elements](#select-elements-)\n  - [CSS Selectors](#css-selectors-)\n  - [Tables](#tables-)\n  - [Images](#images-%EF%B8%8F)\n  - [Remote WebDriver](#remote-webdriver-)\n- [Contributing](#contributing-)\n\n## Setup ⚙️\n\n1. **Clone the repository:**\n\n    ```sh\n    git clone https://github.com/mcarneirobug/selenium.git\n    cd selenium\n    ```\n\n2. **Install dependencies:**\n\n    Make sure you have the necessary dependencies installed. If you are using Maven, your `pom.xml` should include Selenium dependencies.\n\n    ```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.seleniumhq.selenium\u003c/groupId\u003e\n        \u003cartifactId\u003eselenium-java\u003c/artifactId\u003e\n        \u003cversion\u003e4.20.0\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n3. **Download ChromeDriver:**\n\n    Ensure you have the correct version of ChromeDriver matching your Chrome browser.\n\n## Usage 🎮\n\nRun the main class to execute the Selenium WebDriver tests. The code is organized to demonstrate different functionalities.\n\n## Examples 🧩\n\n### Checkboxes ☑️\n\nIterate through checkboxes and select them based on conditions.\n\n```java\nList\u003cWebElement\u003e checkboxes = driver.findElements(By.cssSelector(\"input[type='checkbox']\"));\nfor (WebElement checkbox : checkboxes) {\n    if (!checkbox.isSelected()) {\n        checkbox.click();\n    }\n}\n```\n\n### Radio Buttons 🔘\n\nSelect radio buttons based on the value.\n\n```java\nList\u003cWebElement\u003e radioButtons = driver.findElements(By.cssSelector(\"input[type='radio']\"));\nfor (WebElement radioButton : radioButtons) {\n    if (radioButton.getAttribute(\"value\").equals(\"desiredValue\")) {\n        radioButton.click();\n        break;\n    }\n}\n```\n\n### Select Elements 📑\n\nInteract with dropdown menus using the Select class.\n\n```java\nSelect dropdown = new Select(driver.findElement(By.id(\"dropdownId\")));\ndropdown.selectByVisibleText(\"OptionText\");\n```\n\n### CSS Selectors 🎨\nUse CSS selectors to locate elements.\n\n```java\nWebElement element = driver.findElement(By.cssSelector(\".className #elementId\"));\nelement.click();\n```\n### Tables 📊\n\nIterate through table rows and columns.\n\n```java\nWebElement table = driver.findElement(By.id(\"tableId\"));\nList\u003cWebElement\u003e rows = table.findElements(By.tagName(\"tr\"));\nfor (WebElement row : rows) {\n    List\u003cWebElement\u003e columns = row.findElements(By.tagName(\"td\"));\n    for (WebElement column : columns) {\n        System.out.println(column.getText());\n    }\n}\n```\n\n### Images 🖼️\n\nVerify if an image is displayed.\n\n```java\nWebElement image = driver.findElement(By.xpath(\"//img[@alt='imageAltText']\"));\nif (image.isDisplayed()) {\n    System.out.println(\"Image is displayed.\");\n}\n```\n\n### Remote WebDriver 🌐\n\n```java\nWebDriver driver = new RemoteWebDriver(new URL(\"http://localhost:4444/wd/hub\"), new ChromeOptions());\ndriver.get(\"https://www.example.com\");\n```\n\n## Contributing 🤝\nContributions are welcome! Please open an issue or submit a pull request for any changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcarneirobug%2Fselenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcarneirobug%2Fselenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcarneirobug%2Fselenium/lists"}