{"id":19712163,"url":"https://github.com/fmstrat/selenium","last_synced_at":"2026-03-05T13:02:04.368Z","repository":{"id":76612845,"uuid":"176554203","full_name":"Fmstrat/selenium","owner":"Fmstrat","description":"Docker container for python selenium scripts with Firefox","archived":false,"fork":false,"pushed_at":"2019-10-30T15:52:31.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T19:59:56.366Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/Fmstrat.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":"2019-03-19T16:24:02.000Z","updated_at":"2024-07-03T04:22:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"df10f064-cfd2-453e-9794-f820c080afe5","html_url":"https://github.com/Fmstrat/selenium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fmstrat/selenium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fmstrat%2Fselenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fmstrat%2Fselenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fmstrat%2Fselenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fmstrat%2Fselenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fmstrat","download_url":"https://codeload.github.com/Fmstrat/selenium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fmstrat%2Fselenium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30127214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T12:40:50.676Z","status":"ssl_error","status_checked_at":"2026-03-05T12:39:32.209Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-11T22:15:35.676Z","updated_at":"2026-03-05T13:02:04.324Z","avatar_url":"https://github.com/Fmstrat.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker container for python selenium scripts with Firefox \n\nTo use, create your Selenium script, such as this example using Nextcloud:\n\n```\nimport time\nfrom selenium.webdriver import Firefox\nfrom selenium.webdriver.firefox.options import Options\nfrom selenium.webdriver.common.keys import Keys\n\nclass wait(object):\n\n\tdef __init__(self, browser):\n\t\tself.browser = browser\n\n\tdef __enter__(self):\n\t\tself.old_page = self.browser.find_element_by_tag_name('html')\n\n\tdef page_has_loaded(self):\n\t\tnew_page = self.browser.find_element_by_tag_name('html')\n\t\treturn new_page.id != self.old_page.id\n\n\tdef __exit__(self, *_):\n\t\tstart_time = time.time()\n\t\twhile time.time() \u003c start_time + 5:\n\t\t\tif self.page_has_loaded():\n\t\t\t\treturn True\n\t\t\telse:\n\t\t\t\ttime.sleep(0.1)\n\t\traise Exception('Timeout waiting for page load.')\n\ndef test():\n\ttry:\n\t\topts = Options()\n\t\topts.set_headless()\n\t\tassert opts.headless  # Operating in headless mode\n\t\tbrowser = Firefox(options=opts)\n\texcept Exception as e:\n\t\tprint(\"  -=- FAIL -=-: Browser setup - \", e)\n\t\treturn\n\n\t# Test title\n\ttry:\n\t\twith wait(browser):\n\t\t\tbrowser.get('https://nextcloud.mydomain.com/index.php/login')\n\t\tassert 'Nextcloud' in browser.title\n\texcept Exception as e:\n\t\tprint(\"  -=- FAIL -=-: Initial load - \", e)\n\t\treturn\n\telse:\n\t\tprint(\"  Success: Initial load\")\n\n\ttry:\n\t\t# Enter user\n\t\telem = browser.find_element_by_id('user')\n\t\telem.send_keys(\"MYUSER\")\n\n\t\t# Enter password\n\t\telem = browser.find_element_by_id('password')\n\t\telem.send_keys(\"MYPASSWORD\")\n\n\t\t# Submit form\n\t\telem = browser.find_element_by_id('submit')\n\t\twith wait(browser):\n\t\t\telem.click()\n\n\t\t# Check title for success\n\t\tassert 'Files' in browser.title\n\texcept Exception as e:\n\t\tprint(\"  -=- FAIL -=-: Login - \", e)\n\t\treturn\n\telse:\n\t\tprint(\"  Success: Login\")\n\n\tprint(\"  Finished.\")\n\nprint(\"Testing nextcloud...\")\ntest()\n```\n\nAnd then run it:\n\n```\ndocker run --rm -ti --shm-size 2g -v /path/to/script:/data nowsci/selenium /data/script.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmstrat%2Fselenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmstrat%2Fselenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmstrat%2Fselenium/lists"}