{"id":8602,"library":"robotframework-selenium2library","title":"Robot Framework Selenium2Library","description":"Robot Framework Selenium2Library is a web testing library for Robot Framework, leveraging Selenium WebDriver internally. As of version 3.0.0, this project serves as a transitional wrapper for the `robotframework-seleniumlibrary` and is the final release. New development and maintenance have fully shifted to `robotframework-seleniumlibrary`.","status":"renamed","version":"3.0.0","language":"en","source_language":"en","source_url":"https://github.com/robotframework/Selenium2Library","tags":["robot framework","selenium","web testing","automation"],"install":[{"cmd":"pip install robotframework-selenium2library","lang":"bash","label":"Install latest transitional version"},{"cmd":"pip install robotframework-seleniumlibrary","lang":"bash","label":"Install recommended replacement library"}],"dependencies":[{"reason":"From version 3.0.0, Selenium2Library acts as a thin wrapper around SeleniumLibrary, inheriting all its keywords and functionality.","package":"robotframework-seleniumlibrary","optional":false},{"reason":"Both Selenium2Library and SeleniumLibrary use Selenium WebDriver internally for browser automation.","package":"selenium","optional":false},{"reason":"This is a library for the Robot Framework.","package":"robotframework","optional":false}],"imports":[{"note":"Keywords are accessed directly within Robot Framework test cases after importing the library. Attempting a Python-style import will fail as this is a Robot Framework library, not a direct Python module for user import. Since version 3.0, it's recommended to use 'Library    SeleniumLibrary' directly.","wrong":"from robotframework_selenium2library import Selenium2Library","symbol":"Selenium2Library","correct":"*** Settings ***\nLibrary    Selenium2Library"}],"quickstart":{"code":"*** Settings ***\nLibrary    Selenium2Library\n\n*** Test Cases ***\nExample Google Search\n    Open Browser    https://www.google.com    chrome\n    Title Should Be    Google\n    Input Text    name=q    Robot Framework Selenium2Library\n    Click Button    name=btnK\n    Title Should Contain    Robot Framework Selenium2Library - Google Search\n    Close Browser","lang":"robotframework","description":"This Robot Framework example demonstrates a basic web test using `Selenium2Library` to open a browser, navigate to Google, perform a search, and verify the title. Note that from version 3.0, `Selenium2Library` transparently uses `SeleniumLibrary`'s keywords, so the keywords are the same."},"warnings":[{"fix":"Update your `*** Settings ***` section from `Library    Selenium2Library` to `Library    SeleniumLibrary`. Ensure `robotframework-seleniumlibrary` is installed (installing `robotframework-selenium2library==3.0.0` will also install it).","message":"As of version 3.0.0, Selenium2Library has been renamed to SeleniumLibrary and this project is a thin wrapper. It's the last release, and users are strongly advised to migrate to `robotframework-seleniumlibrary` for future development.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Transition your tests and installations to `robotframework-seleniumlibrary`. While `Selenium2Library` 3.0.0 provides compatibility, direct use of `SeleniumLibrary` is the path forward.","message":"The `robotframework-selenium2library` project is no longer actively developed or maintained beyond version 3.0.0. All future enhancements, bug fixes, and compatibility updates will occur in `robotframework-seleniumlibrary`.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Upgrade to `robotframework-selenium2library` 3.0.0 or, preferably, `robotframework-seleniumlibrary` to benefit from updated Selenium WebDriver support and broader browser compatibility. Ensure you have the correct browser drivers installed and in your system PATH.","message":"Prior to version 3.0.0, Selenium2Library had known compatibility issues with newer browser versions (e.g., Firefox 47.0), often requiring specific Selenium versions or browser driver configurations (like `geckodriver`). Version 3.0.0 and `SeleniumLibrary` generally have better compatibility with modern Selenium and browsers.","severity":"gotcha","affected_versions":"<3.0.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the library is installed: `pip install robotframework-selenium2library`. Verify the spelling and spacing in your Robot Framework `*** Settings ***` section: `Library    Selenium2Library` (at least two spaces).","cause":"The `robotframework-selenium2library` package is not installed in the active Python environment, or there's a typo in the library name in the Robot Framework settings.","error":"Importing test library 'Selenium2Library' failed: ModuleNotFoundError: No module named 'Selenium2Library'"},{"fix":"Correct the spacing in your `.robot` file: `Library    SeleniumLibrary` or `Library\\tSeleniumLibrary`.","cause":"Incorrect spacing in the Robot Framework settings file. Robot Framework requires at least two spaces (or a tab) between `Library` and the library name.","error":"Non-existing setting 'Library SeleniumLibrary'"},{"fix":"Download the appropriate WebDriver executable (e.g., `chromedriver` for Chrome, `geckodriver` for Firefox) for your browser version and place it in a directory included in your system's PATH, or specify its path directly when opening the browser: `Open Browser    https://www.example.com    chrome    executable_path=/path/to/chromedriver`.","cause":"While not directly an `robotframework-selenium2library` error, this is a very common issue when `Open Browser` is used without the corresponding browser driver being available in the system's PATH.","error":"WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home"}]}