{"id":14978810,"url":"https://github.com/teodesian/selenium-remote-driver","last_synced_at":"2025-04-05T12:09:12.766Z","repository":{"id":45884142,"uuid":"529448","full_name":"teodesian/Selenium-Remote-Driver","owner":"teodesian","description":"Perl Bindings to the Selenium Webdriver server","archived":false,"fork":false,"pushed_at":"2024-05-10T21:33:24.000Z","size":36358,"stargazers_count":175,"open_issues_count":24,"forks_count":89,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-05T12:09:05.538Z","etag":null,"topics":["perl","selenium","selenium-webdriver","webdriver-3"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/teodesian.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2010-02-22T01:14:33.000Z","updated_at":"2025-04-04T20:16:54.000Z","dependencies_parsed_at":"2023-02-01T03:16:01.951Z","dependency_job_id":"41c55a2b-c7bc-4f86-9c0d-a66e2d8148d9","html_url":"https://github.com/teodesian/Selenium-Remote-Driver","commit_stats":{"total_commits":1146,"total_committers":54,"mean_commits":21.22222222222222,"dds":0.5244328097731239,"last_synced_commit":"1f078d8f41ae02cbeb51d0a6ad460c0aee6c98fc"},"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodesian%2FSelenium-Remote-Driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodesian%2FSelenium-Remote-Driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodesian%2FSelenium-Remote-Driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodesian%2FSelenium-Remote-Driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teodesian","download_url":"https://codeload.github.com/teodesian/Selenium-Remote-Driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332612,"owners_count":20921853,"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":["perl","selenium","selenium-webdriver","webdriver-3"],"created_at":"2024-09-24T13:58:27.163Z","updated_at":"2025-04-05T12:09:12.741Z","avatar_url":"https://github.com/teodesian.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium::Remote::Driver [![Build Status](https://travis-ci.org/teodesian/Selenium-Remote-Driver.svg?branch=master)](https://travis-ci.org/teodesian/Selenium-Remote-Driver) [![Coverage Status](https://coveralls.io/repos/github/teodesian/Selenium-Remote-Driver/badge.svg?branch=master)](https://coveralls.io/github/teodesian/Selenium-Remote-Driver?branch=master)\n\n## WARNING\n\nSelenium has essentially been leapfrogged technologically by [Playwright][pw]. (using the devtools protocol for all browsers)\nUse [Chrome::DevToolsProtocol][dt] (or the [Playwright][pwc] interface on CPAN) instead of this unless you want to be frustrated by a tool which doesn't do half of what you want.\nEven then you are probably shooting yourself in the foot not using Javascript directly to automate the testing of webpages.\n\nThis module is also not ready for SeleniumHQ's 4.0 series JAR.\nFor compatibility with that, try our next generation selenium client:\n[Selenium::Client][sc]\n\n## Introduction\n\n[Selenium WebDriver][wd] is a test tool that allows you to write\nautomated web application UI tests in any programming language against\nany HTTP website using any mainstream JavaScript-enabled browser. This\nmodule is a Perl implementation of the client for the Webdriver\n[JSONWireProtocol that Selenium provides.][jsonwire]\n\nIt also implements WC3 [selenium][wc3].\n\n[wc3]: https://w3c.github.io/webdriver/\n[wd]: http://www.seleniumhq.org/\n[jsonwire]: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol\n[standalone]: http://selenium-release.storage.googleapis.com/index.html\n[dt]: https://metacpan.org/pod/Chrome::DevToolsProtocol\n[pw]: https://github.com/microsoft/playwright\n[pwc]: https://metacpan.org/pod/Playwright\n[sc]: https://metacpan.org/pod/Selenium::Client\n\n## Installation\n\nIt's probably easiest to use the `cpanm` or `CPAN` commands:\n\n```bash\n$ cpanm Selenium::Remote::Driver\n```\n\nIf you want to install from this repository, see the\n[installation docs][] for more details.\n\n[installation docs]: /INSTALL.md\n\n## Usage\n\nYou can use this module to directly start the webdriver servers, after\n[downloading the appropriate ones][dl] and putting the servers in your\n`$PATH`. This method does not require the JRE/JDK to be installed, nor\ndoes it require the standalone server jar, despite the name of the\nmodule. In this case, you'll want to use the appropriate class for\ndriver construction: either [Selenium::Chrome][],\n[Selenium::Firefox][], [Selenium::PhantomJS][], or\n[Selenium::InternetExplorer][].\n\nYou can also use this module with the `selenium-standalone-server.jar`\nto let it handle browser start up for you, and also manage Remote\nconnections where the server jar is not running on the same machine as\nyour test script is executing. The main class for this method is\n[Selenium::Remote::Driver][].\n\nRegardless of which method you use to construct your browser object,\nall of the classes use the functions listed in the S::R::Driver POD\ndocumentation, so interacting with the browser, the page, and its\nelements would be the same.\n\n[Selenium::Firefox]: https://metacpan.org/pod/Selenium::Firefox\n[Selenium::Chrome]: https://metacpan.org/pod/Selenium::Chrome\n[Selenium::PhantomJS]: https://metacpan.org/pod/Selenium::PhantomJS\n[Selenium::InternetExplorer]: https://metacpan.org/pod/Selenium::InternetExplorer\n[Selenium::Remote::Driver]: https://metacpan.org/pod/Selenium::Remote::Driver\n[dl]: #no-standalone-server\n\n### no standalone server\n\n- _Firefox 48 \u0026 newer_: install the Firefox browser, download\n  [geckodriver][gd] and [put it in your `$PATH`][fxpath]. If the\n  Firefox browser binary is not in the default place for your OS and\n  we cannot locate it via `which`, you may have to specify the binary\n  location during startup. We also will need to locate the Firefox\n  browser; if the Firefox browser isn't in the default location, you\n  must provide it during startup in the `firefox_binary` attr.\n\n- _Firefox 47 \u0026 older_: install the Firefox browser in the default\n  place for your OS. If the Firefox browser binary is not in the\n  default place for your OS, you may have to specify the\n  `firefox_binary` constructor option during startup.\n\n- _Chrome_: install the Chrome browser, [download Chromedriver][dcd]\n  and get `chromedriver` in your `$PATH`.\n\n- _PhantomJS_: install the PhantomJS binary and get `phantomjs` in\n  your `$PATH`. The driver for PhantomJS, Ghostdriver, is bundled with\n  PhantomJS.\n\nWhen the browser(s) are installed and you have the appropriate binary\nin your path, you should be able to do the following:\n\n```perl\nmy $firefox = Selenium::Firefox-\u003enew;\n$firefox-\u003eget('http://www.google.com');\n\nmy $chrome = Selenium::Chrome-\u003enew;\n$chrome-\u003eget('http://www.google.com');\n\nmy $ghost = Selenium::PhantomJS-\u003enew;\n$ghost-\u003eget('http://www.google.com');\n```\n\nNote that you can also pass a `binary` argument to any of the above\nclasses to manually specify what binary to start. Note that this\n`binary` refers to the driver server, _not_ the browser executable.\n\n```perl\nmy $chrome = Selenium::Chrome-\u003enew(binary =\u003e '~/Downloads/chromedriver');\n```\n\nSee the pod for the different modules for more details.\n\n[dcd]: https://sites.google.com/a/chromium.org/chromedriver/downloads\n[fxpath]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver#Add_executable_to_system_path\n[gd]: https://github.com/mozilla/geckodriver/releases\n\n#### Breaking Changes for Selenium::Firefox in v1.0+\n\nThere are breaking changes for Selenium::Firefox from v0.2701 of S:F\nto v1.0+. This is because in FF47 and older, Firefox didn't have a\nseparate webdriver server executable - local startup was accomplished\nby starting your actual Firefox browser with a webdriver\nextension. However, in FF48 and newer, Mozilla have switched to using\n`geckodriver` to handle the Webdriver communication. Accordingly,\nv1.0+ of Selenium::Firefox assumes the geckodriver setup which only\nworks for FF48 and higher:\n\n```perl\n# marionette_enabled defaults to 1 === assumes you're running FF48\nmy $fx48 = Selenium::Firefox-\u003enew;\nmy $fx48 = Selenium::Firefox-\u003enew( marionette_enabled =\u003e 1 );\n```\n\nTo drive FF47 with v1.0+ of Selenium::Firefox, you must manually\ndisable marionette:\n\n```perl\nmy $fx47 = Selenium::Firefox-\u003enew( marionette_enabled =\u003e 0 );\n```\n\nDoing so will start up your Firefox browser with the webdriver\nextension. Note that in our tests, doing the old\n\"webdriver-extension-startup\" for Firefox 48 does not work. Likewise,\n`geckodriver` does not work with FF47.\n\n### with a standalone server\n\nDownload the [standalone server][] and have it running on port 4444:\n\n    $ java -jar selenium-server-standalone-X.XX.X.jar\n\nAs before, have the browsers themselves installed on your machine, and\ndownload the appropriate binary server, passing its location to the\nserver jar during startup.\n\n[standalone server]: http://selenium-release.storage.googleapis.com/index.html\n\n#### Locally\n\n```perl\nuse strict;\nuse warnings;\nuse Selenium::Remote::Driver;\n\nmy $driver = Selenium::Remote::Driver-\u003enew;\n$driver-\u003eget('http://www.google.com');\nprint $driver-\u003eget_title . \"\\n\"; # \"Google\"\n\nmy $query = $driver-\u003efind_element('q', 'name');\n$query-\u003esend_keys('CPAN Selenium Remote Driver');\n\nmy $send_search = $driver-\u003efind_element('btnG', 'name');\n$send_search-\u003eclick;\n\n# make the find_element blocking for a second to allow the title to change\n$driver-\u003eset_implicit_wait_timeout(2000);\nmy $results = $driver-\u003efind_element('search', 'id');\n\nprint $driver-\u003eget_title . \"\\n\"; # CPAN Selenium Remote Driver - Google Search\n$driver-\u003equit;\n```\n\n#### Saucelabs\n\nIf using Saucelabs, there's no need to have the standalone server\nrunning on a local port, since Saucelabs provides it.\n\n```perl\nuse Selenium::Remote::Driver;\n\nmy $user = $ENV{SAUCE_USERNAME};\nmy $key = $ENV{SAUCE_ACCESS_KEY};\n\nmy $driver = Selenium::Remote::Driver-\u003enew(\n    remote_server_addr =\u003e $user . ':' . $key . '@ondemand.saucelabs.com',\n    port =\u003e 80\n);\n\n$driver-\u003eget('http://www.google.com');\nprint $driver-\u003eget_title();\n$driver-\u003equit();\n```\n\nThere are additional usage examples on [metacpan][meta], and also\n[in this project's wiki][wiki], including\n[setting up the standalone server][setup], running tests on\n[Internet Explorer][ie], [Chrome][chrome], [PhantomJS][pjs], and other\nuseful [example snippets][ex].\n\n[wiki]: https://github.com/teodesian/Selenium-Remote-Driver/wiki\n[setup]: https://github.com/teodesian/Selenium-Remote-Driver/wiki/Getting-Started-with-Selenium%3A%3ARemote%3A%3ADriver\n[ie]: https://github.com/teodesian/Selenium-Remote-Driver/wiki/IE-browser-automation\n[chrome]: https://github.com/teodesian/Selenium-Remote-Driver/wiki/Chrome-browser-automation\n[pjs]: https://github.com/teodesian/Selenium-Remote-Driver/wiki/PhantomJS-Headless-Browser-Automation\n[ex]: https://github.com/teodesian/Selenium-Remote-Driver/wiki/Example-Snippets\n\n## Selenium IDE Plugin\n\n[ide-plugin.js](./ide-plugin.js) is a Selenium IDE Plugin which allows\nyou to export tests recorded in Selenium IDE to a perl script.\n\n### Installation in Selenium IDE\n\n  1. Open Selenium IDE\n  2. Options \u003e\u003e Options\n  3. Formats Tab\n  4. Click Add at the bottom\n  5. In the name field call it 'Perl-Webdriver'\n  6. Paste this entire source in the main textbox\n  7. Click 'Save'\n  8. Click 'Ok'\n  9. Close Selenium IDE and open it again.\n\n**Note:** The Code generated by this plugin currently assumes that you have firefox 48 or newer + the geckodriver plugin installed.\n\nIf you have an older version of firefox you can adjust the plugin the following way:\nIn the options window of selenium IDE (Formats tab) there is a input box called \"Header\".\nHere you can modify the fixed header code beeing generatd. Change Selenium::Firefox-\u003enew();\naccording to the firefox init examples shown above in this README.\n\n## Support and Documentation\n\nThere is a mailing list available at\n\nhttps://groups.google.com/forum/#!forum/selenium-remote-driver\n\nfor usage questions and ensuing discussions. If you've come across a\nbug, please open an issue in the [Github issue tracker][issue]. The\nPOD is available in the usual places, including [metacpan][meta], and\nin your shell via `perldoc`.\n\n```bash\n$ perldoc Selenium::Remote::Driver\n$ perldoc Selenium::Remote::WebElement\n```\n\n[issue]: https://github.com/teodesian/Selenium-Remote-Driver/issues\n[meta]: https://metacpan.org/pod/Selenium::Remote::Driver\n\n## Contributing\n\nThanks for considering contributing! The contributing guidelines are\n[in the wiki][contrib]. The documentation there also includes\ninformation on generating new Linux recordings for Travis.\n\n[contrib]: https://github.com/teodesian/Selenium-Remote-Driver/wiki/Contribution-Guide\n\n## Copyright and License\n\nCopyright (c) 2010-2011 Aditya Ivaturi, Gordon Child\n\nCopyright (c) 2014-2017 Daniel Gempesaw\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodesian%2Fselenium-remote-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteodesian%2Fselenium-remote-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodesian%2Fselenium-remote-driver/lists"}