{"id":13337293,"url":"https://github.com/JulienBreton/selenium-3-setup","last_synced_at":"2025-03-11T04:32:37.849Z","repository":{"id":52540003,"uuid":"165431968","full_name":"JulienBreton/selenium-3-setup","owner":"JulienBreton","description":"A sample to start tests with Selenium 3 in Docker containers","archived":false,"fork":false,"pushed_at":"2021-09-15T06:52:01.000Z","size":172,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-30T20:52:29.398Z","etag":null,"topics":["docker-selenium","selenium-grid","selenium-webdriver","test-automation"],"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/JulienBreton.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}},"created_at":"2019-01-12T20:17:48.000Z","updated_at":"2021-09-15T06:52:04.000Z","dependencies_parsed_at":"2022-09-08T06:13:03.412Z","dependency_job_id":null,"html_url":"https://github.com/JulienBreton/selenium-3-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreton%2Fselenium-3-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreton%2Fselenium-3-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreton%2Fselenium-3-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreton%2Fselenium-3-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulienBreton","download_url":"https://codeload.github.com/JulienBreton/selenium-3-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221205810,"owners_count":16776280,"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":["docker-selenium","selenium-grid","selenium-webdriver","test-automation"],"created_at":"2024-07-29T19:13:43.367Z","updated_at":"2024-10-23T15:32:35.650Z","avatar_url":"https://github.com/JulienBreton.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# selenium-3-setup\n\nMaven project to start tests with Selenium Grid.\n\n### Set up the testing environment on Ubuntu\n\n#### Option 1 : Use docker-selenium to set up the testing environment\n\n[docker-selenium project on github](https://github.com/SeleniumHQ/docker-selenium/tree/selenium-3)\n\n* [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n  * To run docker as a normal user, run this command : `sudo usermod -a -G docker $USER` and reboot your computer.\n* [Install Docker Compose](https://docs.docker.com/compose/install/)\n* To execute the docker-compose yml file use `docker-compose -f composer/docker-compose.yaml up`.\n  * Add the `-d` flag at the end for detached execution.\n  * To stop the grid and cleanup the created containers, run `docker-compose -f composer/docker-compose.yaml down`.\n* Scaling up the grid on-demand : `docker-compose -f composer/docker-compose.yaml up -d --scale firefox=2 --scale chrome=2`.  \n* Remote address for the client : http://ipserver:4444/wd/hub (e.g.: http://localhost:4444/wd/hub)\n* http://localhost:4444/grid/console \n* Debugging : to debug your tests you have to use node-chrome-debug and node-firefox-debug (see the composer file). \nGo to http://localhost:4445/ to list the vnc access. The password is \"sercret\".\n* You can share files between the host and the containers. It is usefull to upload files in a Web app. See /home/julien/test:/home/seluser/upload in the composer/docker-composer.yaml and adapt to your case. seluser is the user in the containers.\n* You can rename the folder composer in seleniumv3 (for example) if you want to identify easily the containers in the list displayed by http://localhost:4445/\n* If you want to set the timeouts, add GRID_TIMEOUT and GRID_BROWSER_TIMEOUT to the hub in the docker-compose.yaml. [To learn more about the timeouts, see also the Grid2 wiki.](https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-timeouts-version-221-required) \n```\n    hub:\n        image: selenium/hub:3.141.59\n        restart: on-failure\n        ports:\n            - \"4444:4444\"\n        environment:\n            - GRID_TIMEOUT=300\n            - GRID_BROWSER_TIMEOUT=300\n```\n\n#### Option 2 : Download and start the selenium-server-standalone. \n\nIf you can't use docker, you can use this solution.\n\n##### Downloads\n\n* [Download selenium-server-standalone](https://www.seleniumhq.org/download/)\n* [Download geckodriver](https://github.com/mozilla/geckodriver/releases)\n* [Download chromedriver](http://chromedriver.chromium.org/downloads)\n\n##### Start Selenium Grid\n\nhub :\n```\njava -jar selenium-server-standalone-3.141.59.jar -role hub\n```\nnode :\n```\njava -jar selenium-server-standalone-3.141.59.jar -role node -hub http://localhost:4444/grid/register\n```\n\n### Launch the tests\n\n`mvn test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJulienBreton%2Fselenium-3-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJulienBreton%2Fselenium-3-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJulienBreton%2Fselenium-3-setup/lists"}