diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 23e3a3e2d..41fa78502 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,9 +9,9 @@ jobs: continue-on-error: true strategy: matrix: - python-version: [3.8, 3.11] # 3.12, pypy-3.9 - rf-version: [5.0.1, 6.1.1, 7.0] - selenium-version: [4.14.0, 4.15.2, 4.16.0, 4.17.2, 4.18.1, 4.19.0] + python-version: [3.8, 3.13.0] # pypy-3.9 + rf-version: [6.1.1, 7.1.1] + selenium-version: [4.24.0, 4.25.0, 4.26.1, 4.27.1] browser: [firefox, chrome, headlesschrome] #edge steps: @@ -60,7 +60,7 @@ jobs: pip install -U --pre robotframework==${{ matrix.rf-version }} - name: Install drivers via selenium-manager run: | - SELENIUM_MANAGER_EXE=$(python -c 'from selenium.webdriver.common.selenium_manager import SeleniumManager; sm=SeleniumManager(); print(f"{str(sm.get_binary())}")') + SELENIUM_MANAGER_EXE=$(python -c 'from selenium.webdriver.common.selenium_manager import SeleniumManager; sm=SeleniumManager(); print(f"{str(sm._get_binary())}")') echo "$SELENIUM_MANAGER_EXE" echo "WEBDRIVERPATH=$($SELENIUM_MANAGER_EXE --browser chrome --debug | awk '/INFO[[:space:]]Driver path:/ {print $NF;exit}')" >> "$GITHUB_ENV" echo "$WEBDRIVERPATH" @@ -87,8 +87,9 @@ jobs: # sudo chmod u+x ./selenium-server-standalone.jar # xvfb-run --auto-servernum python atest/run.py --zip headlesschrome --grid True - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 if: failure() with: name: SeleniumLibrary Test results path: atest/zip_results + overwrite: true \ No newline at end of file diff --git a/README.rst b/README.rst index 6948a9ea5..1f4346024 100644 --- a/README.rst +++ b/README.rst @@ -10,14 +10,14 @@ SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes the Selenium_ tool internally. The project is hosted on GitHub_ and downloads can be found from PyPI_. -SeleniumLibrary works with Selenium 3 and 4. It supports Python 3.6 or -newer. In addition to the normal Python_ interpreter, it works also +SeleniumLibrary currently works with Selenium 4. It supports Python 3.8 through 3.13. +In addition to the normal Python_ interpreter, it works also with PyPy_. -SeleniumLibrary is based on the `old SeleniumLibrary`_ that was forked to -Selenium2Library_ and then later renamed back to SeleniumLibrary. -See the Versions_ and History_ sections below for more information about -different versions and the overall project history. +SeleniumLibrary is based on the "old SeleniumLibrary" that was forked to +Selenium2Library and then later renamed back to SeleniumLibrary. +See the `VERSIONS.rst`_ for more information about different versions and the +overall project history. .. image:: https://img.shields.io/pypi/v/robotframework-seleniumlibrary.svg?label=version :target: https://pypi.python.org/pypi/robotframework-seleniumlibrary @@ -44,27 +44,11 @@ The recommended installation method is using pip_:: pip install --upgrade robotframework-seleniumlibrary Running this command installs also the latest Selenium and Robot Framework -versions, but you still need to install `browser drivers`_ separately. -The ``--upgrade`` option can be omitted when installing the library for the +versions. The ``--upgrade`` option can be omitted when installing the library for the first time. -Those migrating from Selenium2Library_ can install SeleniumLibrary so that -it is exposed also as Selenium2Library:: - - pip install --upgrade robotframework-selenium2library - -The above command installs the normal SeleniumLibrary as well as a new -Selenium2Library version that is just a thin wrapper to SeleniumLibrary. -That allows importing Selenium2Library in tests while migrating to -SeleniumLibrary. - -To install the last legacy Selenium2Library_ version, use this command instead:: - - pip install robotframework-selenium2library==1.8.0 - -With recent versions of ``pip`` it is possible to install directly from the -GitHub_ repository. To install latest source from the master branch, use -this command:: +It is possible to install directly from the GitHub_ repository. To install +latest source from the master branch, use this command:: pip install git+https://github.com/robotframework/SeleniumLibrary.git @@ -79,39 +63,11 @@ using ``pip`` see `its own documentation `__. Browser drivers --------------- -After installing the library, you still need to install browser and -operating system specific browser drivers for all those browsers you -want to use in tests. These are the exact same drivers you need to use with -Selenium also when not using SeleniumLibrary. More information about -drivers can be found from `Selenium documentation`__. - -The general approach to install a browser driver is downloading a right -driver, such as ``chromedriver`` for Chrome, and placing it into -a directory that is in PATH__. Drivers for different browsers -can be found via Selenium documentation or by using your favorite -search engine with a search term like ``selenium chrome browser driver``. -New browser driver versions are released to support features in -new browsers, fix bug, or otherwise, and you need to keep an eye on them -to know when to update drivers you use. - -Alternatively, you can use a tool called WebdriverManager__ which can -find the latest version or when required, any version of appropriate -webdrivers for you and then download and link/copy it into right -location. Tool can run on all major operating systems and supports -downloading of Chrome, Firefox, Opera & Edge webdrivers. - -Here's an example: - -.. code:: bash - - pip install webdrivermanager - webdrivermanager firefox chrome --linkpath /usr/local/bin - - +Browsers and drivers are installed and managed automatically by `Selenium Manager`__. +For more information, see the `Selenium documentation`__. +__ https://www.selenium.dev/documentation/selenium_manager __ https://seleniumhq.github.io/selenium/docs/api/py/index.html#drivers -__ https://en.wikipedia.org/wiki/PATH_(variable) -__ https://github.com/omenia/webdrivermanager Usage ----- @@ -197,7 +153,6 @@ Community If the provided documentation is not enough, there are various community channels available: -- `robotframework-users`_ mailing list - ``#seleniumlibrary`` and ``#seleniumlibrary-dev`` channels in Robot Framework `Slack community`_ - `Robot Framework forum`_ has channel for SeleniumLibrary. @@ -205,89 +160,23 @@ available: requests - `Other community channels`_ including paid support -Versions --------- - -SeleniumLibrary has over the years lived under SeleniumLibrary and -Selenium2Library names and different library versions have supported -different Selenium and Python versions. This is summarized in the table -below and the History_ section afterwards explains the project history -a bit more. - -================================== ========================== ========================== =============== - Project Selenium Version Python Version Comment -================================== ========================== ========================== =============== -SeleniumLibrary 2.9.2 and earlier Selenium 1 and 2 Python 2.5-2.7 The original SeleniumLibrary using Selenium RC API. -Selenium2Library 1.8.0 and earlier Selenium 2 and 3 Python 2.6-2.7 Fork of SeleniumLibrary using Selenium WebDriver API. -SeleniumLibrary 3.0 and 3.1 Selenium 2 and 3 Python 2.7 and 3.3+ Selenium2Library renamed and with Python 3 support and new architecture. -SeleniumLibrary 3.2 Selenium 3 Python 2.7 and 3.4+ Drops Selenium 2 support. -SeleniumLibrary 4.0 Selenium 3 Python 2.7 and 3.4+ Plugin API and support for event friging webdriver. -SeleniumLibrary 4.1 Selenium 3 Python 2.7 and 3.5+ Drops Python 3.4 support. -SeleniumLibrary 4.2 Selenium 3 Python 2.7 and 3.5+ Supports only Selenium 3.141.0 or newer. -SeleniumLibrary 4.4 Selenium 3 and 4 Python 2.7 and 3.6+ New PythonLibCore and dropped Python 3.5 support. -SeleniumLibrary 5.0 Selenium 3 and 4 Python 3.6+ Python 2 and Jython support is dropped. -SeleniumLibrary 5.1 Selenium 3 and 4 Python 3.6+ Robot Framework 3.1 support is dropped. -Selenium2Library 3.0 Depends on SeleniumLibrary Depends on SeleniumLibrary Thin wrapper for SeleniumLibrary 3.0 to ease transition. -================================== ========================== ========================== =============== - -History -------- - -SeleniumLibrary originally used the Selenium Remote Controller (RC) API. -When Selenium 2 was introduced with the new but backwards incompatible -WebDriver API, SeleniumLibrary kept using Selenium RC and separate -Selenium2Library using WebDriver was forked. These projects contained -mostly the same keywords and in most cases Selenium2Library was a drop-in -replacement for SeleniumLibrary. - -Over the years development of the old SeleniumLibrary stopped and also -the Selenium RC API it used was deprecated. Selenium2Library was developed -further and replaced the old library as the de facto web testing library -for Robot Framework. - -When Selenium 3 was released in 2016, it was otherwise backwards compatible -with Selenium 2, but the deprecated Selenium RC API was removed. This had two -important effects: - -- The old SeleniumLibrary could not anymore be used with new Selenium versions. - This project was pretty much dead. -- Selenium2Library was badly named as it supported Selenium 3 just fine. - This project needed a new name. - -At the same time when Selenium 3 was released, Selenium2Library was going -through larger architecture changes in order to ease future maintenance and -to make adding Python 3 support easier. With all these big internal and -external changes, it made sense to rename Selenium2Library back to -SeleniumLibrary. This decision basically meant following changes: - -- Create separate repository for the `old SeleniumLibrary`_ to preserve - its history since Selenium2Library was forked. -- Rename Selenium2Library project and the library itself to SeleniumLibrary_. -- Add new Selenium2Library_ project to ease transitioning from Selenium2Library - to SeleniumLibrary. - -Going forward, all new development will happen in the new SeleniumLibrary -project. .. _Robot Framework: https://robotframework.org .. _Selenium: https://www.seleniumhq.org/ .. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary -.. _Selenium2Library: https://github.com/robotframework/Selenium2Library -.. _Old SeleniumLibrary: https://github.com/robotframework/OldSeleniumLibrary .. _pip: http://pip-installer.org .. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary .. _GitHub: https://github.com/robotframework/SeleniumLibrary .. _Keyword Documentation: https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html .. _Python: https://python.org .. _PyPy: https://pypy.org -.. _Jython: https://jython.org/ -.. _IronPython: https://ironpython.net/ .. _demo project: https://github.com/robotframework/WebDemo .. _Robot Framework User Guide: https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html .. _Robot Framework installation instructions: https://github.com/robotframework/robotframework/blob/master/INSTALL.rst -.. _robotframework-users: https://groups.google.com/group/robotframework-users .. _extending documentation: https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst .. _Slack community: https://robotframework-slack-invite.herokuapp.com .. _Robot Framework forum: https://forum.robotframework.org/ .. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues .. _Other community channels: https://robotframework.org/#community +.. _VERSIONS.rst: https://github.com/robotframework/SeleniumLibrary/blob/master/VERSIONS.rst + diff --git a/VERSIONS.rst b/VERSIONS.rst new file mode 100644 index 000000000..289736971 --- /dev/null +++ b/VERSIONS.rst @@ -0,0 +1,72 @@ +Versions +-------- + +SeleniumLibrary has over the years lived under SeleniumLibrary and +Selenium2Library names and different library versions have supported +different Selenium and Python versions. This is summarized in the table +below and the History_ section afterwards explains the project history +a bit more. + +================================== ========================== ========================== =============== + Project Selenium Version Python Version Comment +================================== ========================== ========================== =============== +SeleniumLibrary 2.9.2 and earlier Selenium 1 and 2 Python 2.5-2.7 The original SeleniumLibrary using Selenium RC API. +Selenium2Library 1.8.0 and earlier Selenium 2 and 3 Python 2.6-2.7 Fork of SeleniumLibrary using Selenium WebDriver API. +SeleniumLibrary 3.0 and 3.1 Selenium 2 and 3 Python 2.7 and 3.3+ Selenium2Library renamed and with Python 3 support and new architecture. +SeleniumLibrary 3.2 Selenium 3 Python 2.7 and 3.4+ Drops Selenium 2 support. +SeleniumLibrary 4.0 Selenium 3 Python 2.7 and 3.4+ Plugin API and support for event friging webdriver. +SeleniumLibrary 4.1 Selenium 3 Python 2.7 and 3.5+ Drops Python 3.4 support. +SeleniumLibrary 4.2 Selenium 3 Python 2.7 and 3.5+ Supports only Selenium 3.141.0 or newer. +SeleniumLibrary 4.4 Selenium 3 and 4 Python 2.7 and 3.6+ New PythonLibCore and dropped Python 3.5 support. +SeleniumLibrary 5.0 Selenium 3 and 4 Python 3.6+ Python 2 and Jython support is dropped. +SeleniumLibrary 5.1 Selenium 3 and 4 Python 3.6+ Robot Framework 3.1 support is dropped. +Selenium2Library 3.0 Depends on SeleniumLibrary Depends on SeleniumLibrary Thin wrapper for SeleniumLibrary 3.0 to ease transition. +================================== ========================== ========================== =============== + +History +------- + +SeleniumLibrary originally used the Selenium Remote Controller (RC) API. +When Selenium 2 was introduced with the new but backwards incompatible +WebDriver API, SeleniumLibrary kept using Selenium RC and separate +Selenium2Library using WebDriver was forked. These projects contained +mostly the same keywords and in most cases Selenium2Library was a drop-in +replacement for SeleniumLibrary. + +Over the years development of the old SeleniumLibrary stopped and also +the Selenium RC API it used was deprecated. Selenium2Library was developed +further and replaced the old library as the de facto web testing library +for Robot Framework. + +When Selenium 3 was released in 2016, it was otherwise backwards compatible +with Selenium 2, but the deprecated Selenium RC API was removed. This had two +important effects: + +- The old SeleniumLibrary could not anymore be used with new Selenium versions. + This project was pretty much dead. +- Selenium2Library was badly named as it supported Selenium 3 just fine. + This project needed a new name. + +At the same time when Selenium 3 was released, Selenium2Library was going +through larger architecture changes in order to ease future maintenance and +to make adding Python 3 support easier. With all these big internal and +external changes, it made sense to rename Selenium2Library back to +SeleniumLibrary. This decision basically meant following changes: + +- Create separate repository for the `old SeleniumLibrary`_ to preserve + its history since Selenium2Library was forked. +- Rename Selenium2Library project and the library itself to SeleniumLibrary_. +- Add new Selenium2Library_ project to ease transitioning from Selenium2Library + to SeleniumLibrary. + +All new development is happenning in the SeleniumLibrary project. + +Installation of legacy Selenium2Library +--------------------------------------- +To install the last legacy Selenium2Library_ version, use this command:: + + pip install robotframework-selenium2library==1.8.0 + +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium2Library: https://github.com/robotframework/Selenium2Library +.. _Old SeleniumLibrary: https://github.com/robotframework/OldSeleniumLibrary diff --git a/atest/acceptance/1-plugin/OpenBrowserExample.py b/atest/acceptance/1-plugin/OpenBrowserExample.py index b279ab133..2cb006f24 100644 --- a/atest/acceptance/1-plugin/OpenBrowserExample.py +++ b/atest/acceptance/1-plugin/OpenBrowserExample.py @@ -24,6 +24,7 @@ def open_browser( service_log_path=None, extra_dictionary=None, executable_path=None, + service=None, ): self._new_creator.extra_dictionary = extra_dictionary browser_manager = BrowserManagementKeywords(self.ctx) @@ -37,7 +38,8 @@ def open_browser( ff_profile_dir=ff_profile_dir, options=options, service_log_path=service_log_path, - executable_path=None, + executable_path=executable_path, + service=service, ) def _make_driver( @@ -49,6 +51,7 @@ def _make_driver( options=None, service_log_path=None, executable_path=None, + service=None, ): driver = self._new_creator.create_driver( browser=browser, @@ -58,6 +61,7 @@ def _make_driver( options=options, service_log_path=service_log_path, executable_path=executable_path, + service=None, ) driver.set_script_timeout(self.ctx.timeout) driver.implicitly_wait(self.ctx.implicit_wait) @@ -76,6 +80,7 @@ def create_driver( options=None, service_log_path=None, executable_path=None, + service=None, ): self.browser_names["seleniumwire"] = "seleniumwire" browser = self._normalise_browser_name(browser) @@ -83,6 +88,7 @@ def create_driver( desired_capabilities = self._parse_capabilities(desired_capabilities, browser) service_log_path = self._get_log_path(service_log_path) options = self.selenium_options.create(self.browser_names.get(browser), options) + service = self.selenium_service.create(self.browser_names.get(browser), service) if service_log_path: logger.info("Browser driver log file created to: %s" % service_log_path) self._create_directory(service_log_path) @@ -96,6 +102,7 @@ def create_driver( profile_dir, options=options, service_log_path=service_log_path, + service=service, ) if creation_method == self.create_seleniumwire: return creation_method( @@ -103,16 +110,18 @@ def create_driver( remote_url, options=options, service_log_path=service_log_path, + service=service, ) return creation_method( desired_capabilities, remote_url, options=options, service_log_path=service_log_path, + service=service, ) def create_seleniumwire( - self, desired_capabilities, remote_url, options=None, service_log_path=None + self, desired_capabilities, remote_url, options=None, service_log_path=None, service=None, ): logger.info(self.extra_dictionary) return webdriver.Chrome() diff --git a/atest/acceptance/1-plugin/plugin_does_not_exist.robot b/atest/acceptance/1-plugin/plugin_does_not_exist.robot index 503c32f71..e97d25f21 100644 --- a/atest/acceptance/1-plugin/plugin_does_not_exist.robot +++ b/atest/acceptance/1-plugin/plugin_does_not_exist.robot @@ -1,5 +1,5 @@ *** Variables *** -${SERVER}= localhost:7000 +${SERVER}= localhost:${PORT} ${BROWSER}= firefox ${REMOTE_URL}= ${NONE} ${ROOT}= http://${SERVER}/html diff --git a/atest/acceptance/1-plugin/plugin_open_browser.robot b/atest/acceptance/1-plugin/plugin_open_browser.robot index 41247443b..9d391d956 100644 --- a/atest/acceptance/1-plugin/plugin_open_browser.robot +++ b/atest/acceptance/1-plugin/plugin_open_browser.robot @@ -2,7 +2,7 @@ Library SeleniumLibrary plugins=${CURDIR}/OpenBrowserExample.py *** Variables *** -${SERVER}= localhost:7000 +${SERVER}= localhost:${PORT} ${ROOT}= http://${SERVER}/html &{EXTRA DICTIONARY} extra=dictionary key=value diff --git a/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot b/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot index b31c8fa91..5e9a07e6d 100644 --- a/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot +++ b/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot @@ -1,7 +1,7 @@ *** Settings *** Library SeleniumLibrary event_firing_webdriver=${CURDIR}/../../resources/testlibs/MyListener.py Resource resource_event_firing_webdriver.robot -Suite Setup Open Browser ${FRONT PAGE} ${BROWSER} alias=event_firing_webdriver +Suite Setup Open Browser ${FRONT_PAGE} ${BROWSER} alias=event_firing_webdriver ... remote_url=${REMOTE_URL} Suite Teardown Close All Browsers @@ -12,9 +12,9 @@ ${event_firing_or_none} ${NONE} Open Browser To Start Page [Tags] NoGrid [Documentation] - ... LOG 1:31 DEBUG Wrapping driver to event_firing_webdriver. - ... LOG 1:33 INFO Got driver also from SeleniumLibrary. - Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} + ... LOG 1:30 DEBUG Wrapping driver to event_firing_webdriver. + ... LOG 1:32 INFO Got driver also from SeleniumLibrary. + Open Browser ${FRONT_PAGE} ${BROWSER} remote_url=${REMOTE_URL} Event Firing Webdriver Go To (WebDriver) [Tags] NoGrid diff --git a/atest/acceptance/2-event_firing_webdriver/resource_event_firing_webdriver.robot b/atest/acceptance/2-event_firing_webdriver/resource_event_firing_webdriver.robot index a224bc9bd..27e92aab7 100644 --- a/atest/acceptance/2-event_firing_webdriver/resource_event_firing_webdriver.robot +++ b/atest/acceptance/2-event_firing_webdriver/resource_event_firing_webdriver.robot @@ -1,14 +1,7 @@ -*** Variables *** -${SERVER}= localhost:7000 -${BROWSER}= Chrome -${REMOTE_URL}= ${NONE} -${DESIRED_CAPABILITIES}= ${NONE} -${ROOT}= http://${SERVER}/html -${FRONT_PAGE}= ${ROOT}/ +*** Settings *** +Resource ../variables.robot *** Keywords *** - Go To Page "${relative url}" [Documentation] Goes to page Go To ${ROOT}/${relative url} - diff --git a/atest/acceptance/create_webdriver.robot b/atest/acceptance/create_webdriver.robot index 0ee079522..9f3796ddf 100644 --- a/atest/acceptance/create_webdriver.robot +++ b/atest/acceptance/create_webdriver.robot @@ -7,7 +7,7 @@ Library Collections Create Webdriver Creates Functioning WebDriver [Documentation] ... LOG 1:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver. - ... LOG 1:19 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+. + ... LOG 1:18 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+. [Tags] Known Issue Internet Explorer Known Issue Safari [Setup] Set Driver Variables Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS} diff --git a/atest/acceptance/entry_point.robot b/atest/acceptance/entry_point.robot new file mode 100644 index 000000000..a92c3740a --- /dev/null +++ b/atest/acceptance/entry_point.robot @@ -0,0 +1,36 @@ +*** Settings *** +Library Process + + +*** Test Cases *** +Entry Point Version + ${process} = Run Process + ... python -m SeleniumLibrary.entry --version + ... shell=True + ... cwd=${EXECDIR}/src + Log ${process.stdout} + Log ${process.stderr} + Should Be Equal As Integers ${process.rc} 0 + Should Be Empty ${process.stderr} + Should Contain ${process.stdout} Used Python is: + Should Contain ${process.stdout} Installed selenium version is: + +Entry Point Translation + ${process} = Run Process + ... python -m SeleniumLibrary.entry translation ${OUTPUT_DIR}/translation.json + ... shell=True + ... cwd=${EXECDIR}/src + Log ${process.stdout} + Log ${process.stderr} + Should Be Equal As Integers ${process.rc} 0 + Should Be Empty ${process.stderr} + Should Be Equal ${process.stdout} Translation file created in ${OUTPUT_DIR}/translation.json + ${process} = Run Process + ... python -m SeleniumLibrary.entry translation --compare ${OUTPUT_DIR}/translation.json + ... shell=True + ... cwd=${EXECDIR}/src + Log ${process.stdout} + Log ${process.stderr} + Should Be Equal As Integers ${process.rc} 0 + Should Be Empty ${process.stderr} + Should Be Equal ${process.stdout} Translation is valid, no updated needed. diff --git a/atest/acceptance/keywords/async_javascript.robot b/atest/acceptance/keywords/async_javascript.robot index 7fc72b198..646e3dd16 100644 --- a/atest/acceptance/keywords/async_javascript.robot +++ b/atest/acceptance/keywords/async_javascript.robot @@ -88,6 +88,7 @@ Should Timeout If Script Does Not Invoke Callback With Long Timeout ... var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 1500); Should Detect Page Loads While Waiting On An Async Script And Return An Error + [Tags] Triage Set Selenium Timeout 0.5 seconds ${status} ${error} Run Keyword And Ignore Error Execute Async Javascript ... window.location = 'javascript/dynamic'; diff --git a/atest/acceptance/keywords/click_element_modifier.robot b/atest/acceptance/keywords/click_element_modifier.robot index f83a0317d..f3b9ac5ce 100644 --- a/atest/acceptance/keywords/click_element_modifier.robot +++ b/atest/acceptance/keywords/click_element_modifier.robot @@ -5,19 +5,23 @@ Resource ../resource.robot *** Test Cases *** Click Element Modifier CTRL + [Tags] SKIP_ON_MAC Click Element Button modifier=CTRL Element Text Should Be output CTRL click Click Link Modifier CTRL + [Tags] SKIP_ON_MAC Click Link link text modifier=CTRL Element Text Should Be output CTRL click [Teardown] Close Popup Window Click Button Modifier CTRL + [Tags] SKIP_ON_MAC Click Button Click me! modifier=CTRL Element Text Should Be output CTRL click Click Image Modifier CTRL + [Tags] SKIP_ON_MAC Click Image robot modifier=CTRL Element Text Should Be output CTRL click @@ -46,7 +50,7 @@ Click Element Action Chain and modifier [Documentation] LOG 1:1 INFO Clicking element 'Button' with CTRL. Click Element Button modifier=CTRL action_chain=True Element Text Should Be output CTRL click - + *** Keywords *** Initialize Page Reload Page diff --git a/atest/acceptance/keywords/cookies.robot b/atest/acceptance/keywords/cookies.robot index 81e22c453..2349bc68d 100644 --- a/atest/acceptance/keywords/cookies.robot +++ b/atest/acceptance/keywords/cookies.robot @@ -36,15 +36,15 @@ Add Cookie When Secure Is False Should Be Equal ${cookie.secure} ${False} Add Cookie When Expiry Is Epoch - Add Cookie Cookie1 value1 expiry=1730205247 + Add Cookie Cookie1 value1 expiry=1761755100 ${cookie} = Get Cookie Cookie1 - ${expiry} = Convert Date ${1730205247} exclude_millis=True + ${expiry} = Convert Date ${1761755100} exclude_millis=True Should Be Equal As Strings ${cookie.expiry} ${expiry} Add Cookie When Expiry Is Human Readable Data&Time - Add Cookie Cookie12 value12 expiry=2024-10-29 19:36:51 + Add Cookie Cookie12 value12 expiry=2025-10-29 12:25:00 ${cookie} = Get Cookie Cookie12 - Should Be Equal As Strings ${cookie.expiry} 2024-10-29 19:36:51 + Should Be Equal As Strings ${cookie.expiry} 2025-10-29 12:25:00 Delete Cookie [Tags] Known Issue Safari @@ -114,12 +114,15 @@ Test Get Cookie Keyword Logging ... domain=localhost ... secure=False ... httpOnly=False - ... expiry=2024-09-15 *:22:33 + ... expiry=2025-09-01 *:25:00 ... extra={'sameSite': 'Lax'} ${cookie} = Get Cookie far_future *** Keywords *** Add Cookies + # To update time each September (as Chrome limits cookies to one year expiry date) use + # import datetime + # print (datetime.datetime.strptime("2025-09-01 12:25:00", "%Y-%m-%d %I:%M:%S").timestamp()) Delete All Cookies Add Cookie test seleniumlibrary ${now} = Get Current Date @@ -127,4 +130,4 @@ Add Cookies ${tomorrow_thistime_datetime} = Convert Date ${tomorrow_thistime} datetime Set Suite Variable ${tomorrow_thistime_datetime} Add Cookie another value expiry=${tomorrow_thistime} - Add Cookie far_future timemachine expiry=1726399353 # 2024-09-15 11:22:33 + Add Cookie far_future timemachine expiry=1756700700 # 2025-09-01 12:25:00 diff --git a/atest/acceptance/keywords/elements.robot b/atest/acceptance/keywords/elements.robot index fa053b0ff..a93ccd219 100644 --- a/atest/acceptance/keywords/elements.robot +++ b/atest/acceptance/keywords/elements.robot @@ -90,7 +90,7 @@ Get DOM Attribute Should Be Equal ${id} some_id # Test custom attribute ${existing_custom_attr}= Get DOM Attribute id:emptyDiv data-id - Should Be Equal ${existing_custom_attr} my_id + Should Be Equal ${existing_custom_attr} my_id ${doesnotexist_custom_attr}= Get DOM Attribute id:emptyDiv data-doesnotexist Should Be Equal ${doesnotexist_custom_attr} ${None} # Get non existing DOM Attribute @@ -156,7 +156,7 @@ Get Element Attribute And Element Attribute Value Should Be Should have same res Element Attribute Value Should Be css=#second_div class ${attribute_value} Get Element Attribute Value Should Be Should Be Succesfull with non-ascii characters - Element Attribute Value Should Be link=Link with Unicode äöüÄÖÜß href http://localhost:7000/html/index.html + Element Attribute Value Should Be link=Link with Unicode äöüÄÖÜß href ${FRONT_PAGE}index.html Get Element Attribute Value Should Be Should Be Succesfull error and error messages Run Keyword And Expect Error @@ -169,8 +169,8 @@ Get Element Attribute Value Should Be Should Be Succesfull error and error messa ... Element with locator 'id=non_existing' not found. ... Element Attribute Value Should Be id=non_existing href http://non_existing.com Run Keyword And Expect Error - ... Element 'link=Target opens in new window' attribute should have value 'http://localhost:7000/html/indéx.html' (str) but its value was 'http://localhost:7000/html/index.html' (str). - ... Element Attribute Value Should Be link=Target opens in new window href http://localhost:7000/html/indéx.html + ... Element 'link=Target opens in new window' attribute should have value '${FRONT_PAGE}indéx.html' (str) but its value was '${FRONT_PAGE}index.html' (str). + ... Element Attribute Value Should Be link=Target opens in new window href ${FRONT_PAGE}indéx.html Get Horizontal Position ${pos}= Get Horizontal Position link=Link diff --git a/atest/acceptance/keywords/location.robot b/atest/acceptance/keywords/location.robot index 19d9ac1d8..d96fdb3aa 100644 --- a/atest/acceptance/keywords/location.robot +++ b/atest/acceptance/keywords/location.robot @@ -44,12 +44,13 @@ Wait Until Location Contains At The End Wait Until Location Contains In The Middle [Setup] Go To Page "javascript/wait_location.html" Click Element button - Wait Until Location Contains 7000 + Wait Until Location Contains ${PORT} Wait Until Location Contains As Number [Setup] Go To Page "javascript/wait_location.html" Click Element button - Wait Until Location Contains ${7000} + ${number} Convert To Integer ${PORT} + Wait Until Location Contains ${number} Wait Until Location Contains Fails [Setup] Go To Page "javascript/wait_location.html" @@ -70,7 +71,7 @@ Wait Until Location Contains Fails With Timeout Wait Until Location Is [Setup] Go To Page "javascript/wait_location.html" Click Element button - Wait Until Location Is http://localhost:7000/html/ + Wait Until Location Is ${FRONT_PAGE} Wait Until Location Is Fails [Setup] Go To Page "javascript/wait_location.html" @@ -91,14 +92,14 @@ Wait Until Location Is Fails With Timeout Wait Until Location Is Not [Setup] Go To Page "javascript/wait_location.html" Click Element button - Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html + Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html Wait Until Location Is Not Fail [Setup] Go To Page "javascript/wait_location.html" ${orig_timeout}= Set Selenium Timeout 2 s Run Keyword And Expect Error - ... Location is 'http://localhost:7000/html/javascript/wait_location.html' in 2 seconds. - ... Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html + ... Location is '${FRONT_PAGE}javascript/wait_location.html' in 2 seconds. + ... Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html Set Selenium Timeout ${orig_timeout} Wait Until Location Is Not Fails With Timeout @@ -106,8 +107,8 @@ Wait Until Location Is Not Fails With Timeout ${orig_timeout}= Set Selenium Timeout 2 s Click Element button Run Keyword And Expect Error - ... Location is 'http://localhost:7000/html/javascript/wait_location.html' in 750 milliseconds. - ... Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html timeout=750ms + ... Location is '${FRONT_PAGE}javascript/wait_location.html' in 750 milliseconds. + ... Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html timeout=750ms Set Selenium Timeout ${orig_timeout} Wait Until Location Is Not Fails With Message @@ -116,7 +117,7 @@ Wait Until Location Is Not Fails With Message ${orig_timeout}= Set Selenium Timeout 2 s Run Keyword And Expect Error ... my_message - ... Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html message=my_message + ... Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html message=my_message Set Selenium Timeout ${orig_timeout} Wait Until Location Does Not Contain @@ -143,9 +144,10 @@ Wait Until Location Does Not Contain Fail In The Middle Wait Until Location Does Not Contain Fail As Number [Setup] Go To Page "javascript/wait_location.html" ${orig_timeout}= Set Selenium Timeout 2 s + ${number} Convert To Integer ${PORT} run keyword and expect error - ... Location did contain '${7000}' in 2 seconds. - ... Wait Until Location Does Not Contain ${7000} + ... Location did contain '${number}' in 2 seconds. + ... Wait Until Location Does Not Contain ${number} Set Selenium Timeout ${orig_timeout} Wait Until Location Does Not Contain Fail At The End diff --git a/atest/acceptance/keywords/page_load_timeout.robot b/atest/acceptance/keywords/page_load_timeout.robot index a39df7d50..100bfe2c7 100644 --- a/atest/acceptance/keywords/page_load_timeout.robot +++ b/atest/acceptance/keywords/page_load_timeout.robot @@ -7,8 +7,8 @@ Test Teardown Close Browser And Reset Page Load Timeout *** Test Cases *** Should Open Browser With Default Page Load Timeout [Documentation] Verify that 'Open Browser' changes the page load timeout. - ... LOG 1.1.1:27 DEBUG REGEXP: POST http://localhost:\\d{2,5}/session/[a-f0-9-]+/timeouts {['\\\"]pageLoad['\\\"]: 300000} - ... LOG 1.1.1:29 DEBUG STARTS: Remote response: status=200 + ... LOG 1.1.1:26 DEBUG REGEXP: POST http://localhost:\\d{2,5}/session/[a-f0-9-]+/timeouts {['\\\"]pageLoad['\\\"]: 300000} + ... LOG 1.1.1:28 DEBUG STARTS: Remote response: status=200 # Note: previous log check was 33 and 37. Recording to see if something is swtiching back and forth Open Browser To Start Page diff --git a/atest/acceptance/keywords/print_page.robot b/atest/acceptance/keywords/print_page.robot new file mode 100644 index 000000000..a78cd6623 --- /dev/null +++ b/atest/acceptance/keywords/print_page.robot @@ -0,0 +1,25 @@ +*** Settings *** +Documentation Suite description +Suite Setup Go To Page "non_ascii.html" +Resource ../resource.robot + +Test Setup Remove Files ${OUTPUTDIR}/selenium-page-*.pdf + +*** Test Cases *** +Print Page As PDF Without Print Options + Print Page As PDF + +Verify Index Increments With Multiple Prints + [Setup] Remove Files ${OUTPUTDIR}/selenium-page-*.pdf + ${file_1} = Print Page As PDF background=${True} scale=${2} + Should Be Equal ${file_1} ${OUTPUTDIR}${/}selenium-page-1.pdf + ${file_2} = Print Page As PDF orientation=landscape + Should Be Equal ${file_2} ${OUTPUTDIR}${/}selenium-page-2.pdf + Go To https://robotframework.org/foundation/ + ${file_3} = Print Page As PDF shrink_to_fit=${True} page_height=${35.56} page_width=${21.59} + Should Be Equal ${file_3} ${OUTPUTDIR}${/}selenium-page-3.pdf + +Print With Full Options + Print Page As PDF page_ranges=['1'] background=${False} shrink_to_fit=${False} orientation=portrait + ... margin_top=${0.5} margin_left=${1.5} margin_bottom=${0.5} margin_right=${1.5} + ... page_height=${35.56} page_width=${21.59} diff --git a/atest/acceptance/locators/custom.robot b/atest/acceptance/locators/custom.robot index 56841038f..af1b87fdf 100644 --- a/atest/acceptance/locators/custom.robot +++ b/atest/acceptance/locators/custom.robot @@ -55,4 +55,4 @@ Teardown Custom Locator Custom Locator Strategy [Arguments] ${browser} ${locator} ${tag} ${constraints} ${element}= Execute Javascript return window.document.getElementById('${locator}') || []; - [Return] ${element} + RETURN ${element} diff --git a/atest/acceptance/locators/locator_parsing.robot b/atest/acceptance/locators/locator_parsing.robot index 3ae3a59aa..2efb1586f 100644 --- a/atest/acceptance/locators/locator_parsing.robot +++ b/atest/acceptance/locators/locator_parsing.robot @@ -47,6 +47,15 @@ Multiple Locators with double arrows as separator should work Multiple Locators strategy should be case-insensitive Page Should Contain Element cSs=div#div_id >> XpaTh=a[6] >> iD=image1_id +Multiple Locators as a List should work + ${element} = Get WebElement id:foo:bar + ${locator_list} = Create List id:div_id ${element} id:bar=foo + Page Should Contain Element ${locator_list} + +WebElement as locator should work + ${element} = Get WebElement id:foo:bar + Page Should Contain Element ${element} + When One Of Locator From Multiple Locators Is Not Found Keyword Fails Run Keyword And Expect Error ... Element with locator 'id:not_here' not found. diff --git a/atest/acceptance/multiple_browsers_options.robot b/atest/acceptance/multiple_browsers_options.robot index 40ce798d7..2349c9195 100644 --- a/atest/acceptance/multiple_browsers_options.robot +++ b/atest/acceptance/multiple_browsers_options.robot @@ -9,32 +9,32 @@ Documentation Creating test which would work on all browser is not possible. *** Test Cases *** Chrome Browser With Selenium Options As String [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("--disable-dev-shm-usage") Chrome Browser With Selenium Options As String With Attribute As True [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]--headless=new['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]--headless=new['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_argument ( "--headless=new" ) Chrome Browser With Selenium Options With Complex Object [Tags] NoGrid [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]mobileEmulation['\\\"]: {['\\\"]deviceName['\\\"]: ['\\\"]Galaxy S5['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]mobileEmulation['\\\"]: {['\\\"]deviceName['\\\"]: ['\\\"]Galaxy S5['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_experimental_option( "mobileEmulation" , { 'deviceName' : 'Galaxy S5'}) Chrome Browser With Selenium Options Object [Documentation] - ... LOG 2:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 2:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 2:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 2:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* ${options} = Get Chrome Options Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=${options} @@ -47,8 +47,8 @@ Chrome Browser With Selenium Options Invalid Method Chrome Browser With Selenium Options Argument With Semicolon [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*\\\[['\\\"]has;semicolon['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*\\\[['\\\"]has;semicolon['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("has;semicolon") diff --git a/atest/acceptance/multiple_browsers_service.robot b/atest/acceptance/multiple_browsers_service.robot new file mode 100644 index 000000000..e47c917a0 --- /dev/null +++ b/atest/acceptance/multiple_browsers_service.robot @@ -0,0 +1,44 @@ +*** Settings *** +Suite Teardown Close All Browsers +Library ../resources/testlibs/get_driver_path.py +Resource resource.robot +# Force Tags Known Issue Firefox Known Issue Safari Known Issue Internet Explorer +Documentation Creating test which would work on all browser is not possible. +... These tests are for Chrome only. + +*** Test Cases *** +Chrome Browser With Chrome Service As String + [Documentation] + ... LOG 2:3 DEBUG STARTS: Started executable: + ... LOG 2:4 DEBUG GLOB: POST*/session* + ${driver_path}= Get Driver Path Chrome + Open Browser ${FRONT PAGE} Chrome remote_url=${REMOTE_URL} + ... service=executable_path='${driver_path}' + +Chrome Browser With Chrome Service As String With service_args As List + Open Browser ${FRONT PAGE} Chrome remote_url=${REMOTE_URL} + ... service=service_args=['--append-log', '--readable-timestamp']; log_output='${OUTPUT_DIR}/chromedriverlog.txt' + File Should Exist ${OUTPUT_DIR}/chromedriverlog.txt + # ... service=service_args=['--append-log', '--readable-timestamp']; log_output='./' + # ... service=service_args=['--append-log', '--readable-timestamp'] + +Firefox Browser With Firefox Service As String + [Documentation] + ... LOG 2:3 DEBUG STARTS: Started executable: + ... LOG 2:4 DEBUG GLOB: POST*/session* + ${driver_path}= Get Driver Path Firefox + Open Browser ${FRONT PAGE} Firefox remote_url=${REMOTE_URL} + ... service=executable_path='${driver_path}' + +#Chrome Browser With Selenium Options Invalid Method +# Run Keyword And Expect Error AttributeError: 'Options' object has no attribute 'not_here_method' +# ... Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} +# ... desired_capabilities=${DESIRED_CAPABILITIES} options=not_here_method("arg1") +# +# +#Chrome Browser With Selenium Options Argument With Semicolon +# [Documentation] +# ... LOG 1:14 DEBUG GLOB: *"goog:chromeOptions"* +# ... LOG 1:14 DEBUG GLOB: *["has;semicolon"* +# Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} +# ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("has;semicolon") diff --git a/atest/acceptance/multiple_browsers_service_log_path.robot b/atest/acceptance/multiple_browsers_service_log_path.robot index ee22a3b25..364713b70 100644 --- a/atest/acceptance/multiple_browsers_service_log_path.robot +++ b/atest/acceptance/multiple_browsers_service_log_path.robot @@ -5,7 +5,7 @@ Resource resource.robot *** Test Cases *** First Browser With Service Log Path [Documentation] - ... LOG 1:2 INFO STARTS: Browser driver log file created to: + ... LOG 1:3 INFO STARTS: Browser driver log file created to: [Setup] OperatingSystem.Remove Files ${OUTPUT DIR}/${BROWSER}.log Open Browser ${FRONT PAGE} ${BROWSER} service_log_path=${OUTPUT DIR}/${BROWSER}.log OperatingSystem.List Directories In Directory ${OUTPUT DIR}/ diff --git a/atest/acceptance/open_and_close.robot b/atest/acceptance/open_and_close.robot index aad19deb9..6a0d7a75e 100644 --- a/atest/acceptance/open_and_close.robot +++ b/atest/acceptance/open_and_close.robot @@ -16,8 +16,8 @@ Close Browser Does Nothing When No Browser Is Opened Browser Open With Not Well-Formed URL Should Close [Documentation] Verify after incomplete 'Open Browser' browser closes - ... LOG 1.1:35 DEBUG STARTS: Opened browser with session id - ... LOG 1.1:35 DEBUG REGEXP: .*but failed to open url.* + ... LOG 1.1:34 DEBUG STARTS: Opened browser with session id + ... LOG 1.1:34 DEBUG REGEXP: .*but failed to open url.* ... LOG 2:2 DEBUG STARTS: DELETE ... LOG 2:5 DEBUG STARTS: Finished Request Run Keyword And Expect Error * Open Browser bad.url.bad ${BROWSER} diff --git a/atest/acceptance/resource.robot b/atest/acceptance/resource.robot index 4bcaf38eb..b965d3611 100644 --- a/atest/acceptance/resource.robot +++ b/atest/acceptance/resource.robot @@ -3,15 +3,7 @@ Library SeleniumLibrary run_on_failure=Nothing implicit_wait=0.2 Library Collections Library OperatingSystem Library DateTime - -*** Variables *** -${SERVER}= localhost:7000 -${BROWSER}= firefox -${REMOTE_URL}= ${NONE} -${DESIRED_CAPABILITIES}= ${NONE} -${ROOT}= http://${SERVER}/html -${FRONT_PAGE}= ${ROOT}/ -${SPEED}= 0 +Resource variables.robot *** Keywords *** Open Browser To Start Page @@ -32,7 +24,7 @@ Open Browser To Start Page Without Testing Default Options ... desired_capabilities=${DESIRED_CAPABILITIES} alias=${alias} ${orig speed} = Set Selenium Speed ${SPEED} ${orig timeout} = Set Selenium Timeout 10 seconds - [Return] ${orig speed} 5 seconds + RETURN ${orig speed} 5 seconds Cannot Be Executed In IE [Documentation] Cannot Be Executed In IE diff --git a/atest/acceptance/variables.robot b/atest/acceptance/variables.robot new file mode 100644 index 000000000..b613ccb5a --- /dev/null +++ b/atest/acceptance/variables.robot @@ -0,0 +1,9 @@ +*** Variables *** +${PORT}= 7000 +${SERVER}= localhost:${PORT} +${BROWSER}= firefox +${REMOTE_URL}= ${NONE} +${DESIRED_CAPABILITIES}= ${NONE} +${ROOT}= http://${SERVER}/html +${FRONT_PAGE}= ${ROOT}/ +${SPEED}= 0 \ No newline at end of file diff --git a/atest/resources/html/javascript/wait_location.html b/atest/resources/html/javascript/wait_location.html index c4e96c147..68bc0478e 100644 --- a/atest/resources/html/javascript/wait_location.html +++ b/atest/resources/html/javascript/wait_location.html @@ -5,7 +5,8 @@ setTimeout('doLocation()', 1000) } function doLocation() { - self.location = 'http://localhost:7000/html/' + var base_url = window.location.origin; + self.location = `${base_url}/html/` } diff --git a/atest/resources/testlibs/get_driver_path.py b/atest/resources/testlibs/get_driver_path.py new file mode 100644 index 000000000..95c11e924 --- /dev/null +++ b/atest/resources/testlibs/get_driver_path.py @@ -0,0 +1,41 @@ +""" +>>> from selenium.webdriver.common import driver_finder +>>> drfind = driver_finder.DriverFinder() +>>> from selenium.webdriver.chrome.service import Service +>>> from selenium.webdriver.chrome.options import Options +>>> drfind.get_path(Service(),Options()) + + + def _import_service(self, browser): + browser = browser.replace("headless_", "", 1) + # Throw error is used with remote .. "They cannot be used with a Remote WebDriver session." [ref doc] + service = importlib.import_module(f"selenium.webdriver.{browser}.service") + return service.Service + + def _import_options(self, browser): + browser = browser.replace("headless_", "", 1) + options = importlib.import_module(f"selenium.webdriver.{browser}.options") + return options.Options + +""" +from selenium import webdriver +from selenium.webdriver.common import driver_finder +import importlib +import inspect + + +def get_driver_path(browser): + browser = browser.lower().replace("headless_", "", 1) + service = importlib.import_module(f"selenium.webdriver.{browser}.service") + options = importlib.import_module(f"selenium.webdriver.{browser}.options") + + args = inspect.signature(driver_finder.DriverFinder.__init__).parameters.keys() + if ('service' in args) and ('options' in args): + # Selenium V4.20.0 or greater + finder = driver_finder.DriverFinder(service.Service(), options.Options()) + return finder.get_driver_path() + else: + # Selenium v4.19.0 and prior + finder = driver_finder.DriverFinder() + func = getattr(finder, 'get_path') + return finder.get_path(service.Service(), options.Options()) diff --git a/atest/resources/testserver/testserver.py b/atest/resources/testserver/testserver.py index 565c6506f..b3e582e88 100644 --- a/atest/resources/testserver/testserver.py +++ b/atest/resources/testserver/testserver.py @@ -1,6 +1,7 @@ # Initially based on: # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/336012 +import argparse import os import sys @@ -40,11 +41,14 @@ def start_server(path, port=7000): if __name__ == "__main__": - if len(sys.argv) != 2 or sys.argv[1] not in ["start", "stop"]: - print("usage: %s start|stop" % sys.argv[0]) - sys.exit(1) - if sys.argv[1] == "start": + parser = argparse.ArgumentParser() + parser.add_argument("command", choices=["start", "stop"]) + parser.add_argument("--port", default=7000, type=int) + args = parser.parse_args() + port = args.port + command = args.command + if command == "start": path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - start_server(path) + start_server(path, port) else: - stop_server() + stop_server(port) diff --git a/atest/run.py b/atest/run.py index 2c86cf994..d386ea7db 100755 --- a/atest/run.py +++ b/atest/run.py @@ -53,6 +53,7 @@ from robot import rebot_cli from robot import __version__ as robot_version from selenium import __version__ as selenium_version +from selenium.webdriver.common.utils import free_port from robot.utils import is_truthy try: @@ -107,10 +108,12 @@ def acceptance_tests( if os.path.exists(RESULTS_DIR): shutil.rmtree(RESULTS_DIR) os.mkdir(RESULTS_DIR) + port = free_port() + print(f"Using port: {port}") if grid: hub, node = start_grid() - with http_server(interpreter): - execute_tests(interpreter, browser, rf_options, grid, event_firing) + with http_server(interpreter, port): + execute_tests(interpreter, browser, rf_options, grid, event_firing, port) failures = process_output(browser) if failures: print( @@ -178,23 +181,23 @@ def _grid_status(status=False, role="hub"): @contextmanager -def http_server(interpreter): +def http_server(interpreter, port:int): serverlog = open(os.path.join(RESULTS_DIR, "serverlog.txt"), "w") interpreter = "python" if not interpreter else interpreter process = subprocess.Popen( - [interpreter, HTTP_SERVER_FILE, "start"], + [interpreter, HTTP_SERVER_FILE, "start", "--port", str(port)], stdout=serverlog, stderr=subprocess.STDOUT, ) try: yield finally: - subprocess.call([interpreter, HTTP_SERVER_FILE, "stop"]) + subprocess.call([interpreter, HTTP_SERVER_FILE, "stop", "--port", str(port)]) process.wait() serverlog.close() -def execute_tests(interpreter, browser, rf_options, grid, event_firing): +def execute_tests(interpreter, browser, rf_options, grid, event_firing, port): options = [] if grid: runner = interpreter.split() + [ @@ -204,7 +207,11 @@ def execute_tests(interpreter, browser, rf_options, grid, event_firing): "2", ] else: - runner = interpreter.split() + ["-m", "robot.run"] + runner = interpreter.split() + ["-m", "robot.run", "--variable", f"PORT:{port}"] + if platform.system() == "Darwin": + runner.append("--exclude") + runner.append("SKIP_ON_MAC") + options.extend([opt.format(browser=browser) for opt in ROBOT_OPTIONS]) if rf_options: options += rf_options @@ -244,7 +251,7 @@ def process_output(browser): print("Verifying results...") options = [] output = os.path.join(RESULTS_DIR, "output.xml") - robotstatuschecker.process_output(output, verbose=False) + robotstatuschecker.process_output(output) options.extend([opt.format(browser=browser) for opt in REBOT_OPTIONS]) try: rebot_cli(options + [output]) diff --git a/docs/SeleniumLibrary-6.4.0.rst b/docs/SeleniumLibrary-6.4.0.rst new file mode 100644 index 000000000..c03214efb --- /dev/null +++ b/docs/SeleniumLibrary-6.4.0.rst @@ -0,0 +1,127 @@ +===================== +SeleniumLibrary 6.4.0 +===================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.4.0 is a new release with +enhancements around driver configuration and logging, printing pages as pdf, +and some bug fixes. + +If you have pip_ installed, just run + +:: + + pip install --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.4.0 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.4.0 was released on Wednesday May 22, 2024. SeleniumLibrary supports +Python 3.8 through 3.11, Selenium 4.16.0 through 4.21.0 and +Robot Framework 5.0.1, 6.1.1 and 7.0. + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.4.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Add new selenium 4 print page as PDF functionality (`#1824`_) + The print page as pdf functionality within Selenium 4 has been added into SeleniumLibrary + with a new keyword. See the keyword documentation for usage. +- Add driver Service Class into Open Browser (`#1900`_) + Selenium has shifted from a couple arguments for configuring the driver settings into the new + Service class. As with the options argument these changes allows for service class to be set + using a simlar string format. More information can be found in the `Open Browser` keyword + documentation and newly rearranged Introduction. +- Add warning about frame deselection when using `Page Should Contain` keyword. (`#1894`_) + In searching through the page, the `Page Should Contain` keyword will select and search + through frames. Thus it silently changes the frame context. Added warning within the keyword + documentation noting as such. +- Wrong Type Hint on some keywords. (`locator: Union[WebElement, None, str]`) (`#1880`_) + Several type hints on locator arguments denoted the argument allowed for none when indeed + they did not. This corrects those type hints. + +Deprecated features +=================== + +- Start Deprecation and Removal of Selenium2Library (deep) references/package (`#1826`_) + Removed references and instructions regarding Selenium2Library; moving some to an archived + VERSIONS.rst top level documentation. + +Acknowledgements +================ + +- We would like to thank `René Rohner `_ for discovering the + incorrect type hints on some keywords. (`locator: Union[WebElement, None, str]`) (`#1880`_) +- `SamMaksymyshyn `_, `Yuri Verweij `_ + and `Lisa Crispin `_ for helping to model and design the new + print page as PDF functionality (`#1824`_) +- `Tatu Aalto `_ for modeling and reviewing the added driver Service Class into Open Browser (`#1900`_) +- I want to thank `Eman `_ for pointing out that I wanted + deprecate and not devalue the Selenium2Library. I also want to thank everyone in their persistence + to push me to start deprecating the Selenium2Library package (`#1826`_) +- .. and Tatu for fixing the internal test run on Mac (`#1899`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1880`_ + - bug + - high + - Wrong Type Hint on some keywords. (`locator: Union[WebElement, None, str]`) + * - `#1824`_ + - enhancement + - high + - Add new selenium 4 print page as PDF functionality + * - `#1894`_ + - enhancement + - high + - Add warning about frame deselection when using `Page Should Contain` keyword. + * - `#1900`_ + - enhancement + - high + - Add driver Service Class into Open Browser + * - `#1826`_ + - --- + - high + - Start Deprecation and Removal of Selenium2Library (deep) references/package + * - `#1899`_ + - --- + - --- + - Make test run on Mac + +Altogether 6 issues. View on the `issue tracker `__. + +.. _#1880: https://github.com/robotframework/SeleniumLibrary/issues/1880 +.. _#1824: https://github.com/robotframework/SeleniumLibrary/issues/1824 +.. _#1894: https://github.com/robotframework/SeleniumLibrary/issues/1894 +.. _#1900: https://github.com/robotframework/SeleniumLibrary/issues/1900 +.. _#1826: https://github.com/robotframework/SeleniumLibrary/issues/1826 +.. _#1899: https://github.com/robotframework/SeleniumLibrary/issues/1899 diff --git a/docs/SeleniumLibrary-6.4.0rc1.html b/docs/SeleniumLibrary-6.4.0rc1.html new file mode 100644 index 000000000..bf0d7c9bb --- /dev/null +++ b/docs/SeleniumLibrary-6.4.0rc1.html @@ -0,0 +1,1873 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + diff --git a/docs/SeleniumLibrary-6.4.0rc1.rst b/docs/SeleniumLibrary-6.4.0rc1.rst new file mode 100644 index 000000000..f15b68a80 --- /dev/null +++ b/docs/SeleniumLibrary-6.4.0rc1.rst @@ -0,0 +1,128 @@ +======================== +SeleniumLibrary 6.4.0rc1 +======================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.4.0rc1 is a release candidate +with enhancements around driver configuration and logging, printing pages as pdf, +and some bug fixes. + +All issues targeted for SeleniumLibrary v6.4.0 can be found +from the `issue tracker`_. + +If you have pip_ installed, just run + +:: + + pip install --pre --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.4.0rc1 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.4.0rc1 was released on Sunday May 19, 2024. SeleniumLibrary supports +Python 3.8 through 3.11, Selenium 4.16.0 through 4.21.0 and +Robot Framework 5.0.1, 6.1.1 and 7.0. + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.4.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Add new selenium 4 print page as PDF functionality (`#1824`_) + The print page as pdf functionality within Selenium 4 has been added into SeleniumLibrary + with a new keyword. See the keyword documentation for usage. +- Add driver Service Class into Open Browser (`#1900`_) + Selenium has shifted from a couple arguments for configuring the driver settings into the new + Service class. As with the options argument these changes allows for service class to be set + using a simlar string format. More information can be found in the `Open Browser` keyword + documentation and newly rearranged Introduction. +- Add warning about frame deselection when using `Page Should Contain` keyword. (`#1894`_) + In searching through the page, the `Page Should Contain` keyword will select and search + through frames. Thus it silently changes the frame context. Added warning within the keyword + documentation noting as such. +- Wrong Type Hint on some keywords. (`locator: Union[WebElement, None, str]`) (`#1880`_) + Several type hints on locator arguments denoted the argument allowed for none when indeed + they did not. This corrects those type hints. + +Deprecated features +=================== + +- Start Deprecation and Removal of Selenium2Library (deep) references/package (`#1826`_) + Removed references and instructions regarding Selenium2Library; moving some to an archived + VERSIONS.rst top level documentation. + +Acknowledgements +================ + +- We would like to thank `René Rohner `_ for discovering the + incorrect type hints on some keywords. (`locator: Union[WebElement, None, str]`) (`#1880`_) +- `SamMaksymyshyn `_, `Yuri Verweij `_ + and `Lisa Crispin `_ for helping to model and design the new + print page as PDF functionality (`#1824`_) +- `Tatu Aalto `_ for modeling and reviewing the added driver Service Class into Open Browser (`#1900`_) +- Start Deprecation and Removal of Selenium2Library (deep) references/package (`#1826`_) +- .. and Tatu for fixing the internal test run on Mac (`#1899`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1880`_ + - bug + - high + - Wrong Type Hint on some keywords. (`locator: Union[WebElement, None, str]`) + * - `#1824`_ + - enhancement + - high + - Add new selenium 4 print page as PDF functionality + * - `#1894`_ + - enhancement + - high + - Add warning about frame deselection when using `Page Should Contain` keyword. + * - `#1900`_ + - enhancement + - high + - Add driver Service Class into Open Browser + * - `#1826`_ + - --- + - high + - Start Deprecation and Removal of Selenium2Library (deep) references/package + * - `#1899`_ + - --- + - --- + - Make test run on Mac + +Altogether 6 issues. View on the `issue tracker `__. + +.. _#1880: https://github.com/robotframework/SeleniumLibrary/issues/1880 +.. _#1824: https://github.com/robotframework/SeleniumLibrary/issues/1824 +.. _#1894: https://github.com/robotframework/SeleniumLibrary/issues/1894 +.. _#1900: https://github.com/robotframework/SeleniumLibrary/issues/1900 +.. _#1826: https://github.com/robotframework/SeleniumLibrary/issues/1826 +.. _#1899: https://github.com/robotframework/SeleniumLibrary/issues/1899 diff --git a/docs/SeleniumLibrary-6.5.0.rst b/docs/SeleniumLibrary-6.5.0.rst new file mode 100644 index 000000000..963bd12c6 --- /dev/null +++ b/docs/SeleniumLibrary-6.5.0.rst @@ -0,0 +1,98 @@ +===================== +SeleniumLibrary 6.5.0 +===================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.5.0 is a new release with +keyword and keyword documentation translations. + +If you have pip_ installed, just run + +:: + + pip install --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.5.0 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.5.0 was released on Saturday June 15, 2024. SeleniumLibrary supports +Python 3.8 through 3.11, Selenium 4.20.0 and 4.21.0 and +Robot Framework 5.0.1, 6.1.1 and 7.0. + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.5.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Keyword and keyword documentation translation (`#1908`_) + This brings in the ability to translate both the keyword names as well as + the keyword documentation. Details on how to create translations can be found + within the keyword documentation. In addition the introduction of the selib tool + allows for further enhancement like ``transform`` which will run Robotidy + alongside a (future) SeleniumLibrary transformer to automatically handle keyword + deprecations. + + A sample translation of the SeleniumLibrary keywords and documentation to Finnish + can be found in + `this marketsquare repo `_. + +Acknowledgements +================ + +I want to thank + +- jeromehuewe for noting the unspecified upper supported Python version (`#1903`_) +- `Tatu Aalto `_ for all the work around bringing in + the translation documentation functionality and the selib tool (`#1907`_) + +I also want to thank `Yuri Verweij `_ for his continued +collaboration on maintaining the SeleniumLibrary. + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1908`_ + - bug + - high + - Fix bug in etry point translation creation + * - `#1903`_ + - enhancement + - medium + - Specify supported Python version + * - `#1907`_ + - enhancement + - medium + - Translation documentation + +Altogether 3 issues. View on the `issue tracker `__. + +.. _#1908: https://github.com/robotframework/SeleniumLibrary/issues/1908 +.. _#1903: https://github.com/robotframework/SeleniumLibrary/issues/1903 +.. _#1907: https://github.com/robotframework/SeleniumLibrary/issues/1907 diff --git a/docs/SeleniumLibrary-6.5.0rc1.html b/docs/SeleniumLibrary-6.5.0rc1.html new file mode 100644 index 000000000..cdbc2a73b --- /dev/null +++ b/docs/SeleniumLibrary-6.5.0rc1.html @@ -0,0 +1,1873 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + diff --git a/docs/SeleniumLibrary-6.5.0rc1.rst b/docs/SeleniumLibrary-6.5.0rc1.rst new file mode 100644 index 000000000..368c4103c --- /dev/null +++ b/docs/SeleniumLibrary-6.5.0rc1.rst @@ -0,0 +1,95 @@ +======================== +SeleniumLibrary 6.5.0rc1 +======================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.5.0rc1 is a new release with +keyword and keyword documentation translations. + +All issues targeted for SeleniumLibrary v6.5.0 can be found +from the `issue tracker`_. + +If you have pip_ installed, just run + +:: + + pip install --pre --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.5.0rc1 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.5.0rc1 was released on Monday June 10, 2024. SeleniumLibrary supports +Python 3.8 through 3.11, Selenium 4.20.0 and 4.21.0 and +Robot Framework 5.0.1, 6.1.1 and 7.0. + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.5.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Translation documentation (`#1907`_) + This brings in the ability to translate both the keyword names as well as + the keyword documentation. Details on how to create translations can be found + within the keyword documenation. In addtion the introduction of the selib tool + allows for further enhancement like ``transform`` which will run Robotidy + alongside a (future) SeleniumLibrary transformer to automatically handle keyword + deprecations. + +Acknowledgements +================ + +I want to thank + +- jeromehuewe for noting the unspecified upper supported Python version (`#1903`_) +- `Tatu Aalto `_ for all the work around bringing in + the translation documentation functionality and the selib tool (`#1907`_) + +I also want to thank `Yuri Verweij `_ for his continued +collaboration on maintaining the SeleniumLibrary. + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + - Added + * - `#1903`_ + - enhancement + - medium + - Specify supported Python version + - rc�1 + * - `#1907`_ + - enhancement + - medium + - Translation documentation + - rc�1 + +Altogether 2 issues. View on the `issue tracker `__. + +.. _#1903: https://github.com/robotframework/SeleniumLibrary/issues/1903 +.. _#1907: https://github.com/robotframework/SeleniumLibrary/issues/1907 diff --git a/docs/SeleniumLibrary-6.6.0.rst b/docs/SeleniumLibrary-6.6.0.rst new file mode 100644 index 000000000..5e0b74f42 --- /dev/null +++ b/docs/SeleniumLibrary-6.6.0.rst @@ -0,0 +1,79 @@ +===================== +SeleniumLibrary 6.6.0 +===================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.6.0 is a new release which adds +Python 3.12 support. + +If you have pip_ installed, just run + +:: + + pip install --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.6.0 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.6.0 was released on Friday September 6, 2024. SeleniumLibrary supports +Python 3.8 through 3.12, Selenium 4.21.0 through 4.24.0 and +Robot Framework 6.1.1 and 7.0.1. + +*In addition this version of SeleniumLibrary has been tested against the upcoming Robot +Framework v7.1 release (using v7.1rc2) and was found compatible. We expect it to work +fine with the final release which should be coming out soon.* + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.6.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Support for Python 3.12 was added in this release. In addition we added Robot Framework 7.0.1 + while dropping 5.0.1 which did not officially support Python 3.12. In addition with the almost + monthly releases of Selenium we have caught up testing against and supporting Selenium versions + 4.21.0, 4.22.0, 4.23.1, and 4.24.0. (`#1906`_) + +Acknowledgements +================ + +- I want to thank grepwood, KotlinIsland, and Robin Mackaij for pushing support python 3.12 and + Yuri, Tatu and Lassi for reviewing the changes. (`#1906`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1906`_ + - enhancement + - high + - Support python 3.12 + +Altogether 1 issue. View on the `issue tracker `__. + +.. _#1906: https://github.com/robotframework/SeleniumLibrary/issues/1906 diff --git a/docs/SeleniumLibrary-6.6.1.rst b/docs/SeleniumLibrary-6.6.1.rst new file mode 100644 index 000000000..247858ff3 --- /dev/null +++ b/docs/SeleniumLibrary-6.6.1.rst @@ -0,0 +1,81 @@ +===================== +SeleniumLibrary 6.6.1 +===================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.6.1 is a new release which adds +Python 3.12 support. + +If you have pip_ installed, just run + +:: + + pip install --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.6.1 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.6.1 was released on Friday September 6, 2024. SeleniumLibrary supports +Python 3.8 through 3.12, Selenium 4.21.0 through 4.24.0 and +Robot Framework 6.1.1 and 7.0.1. + +*In addition this version of SeleniumLibrary has been tested against the upcoming Robot +Framework v7.1 release (using v7.1rc2) and was found compatible. We expect it to work +fine with the final release which should be coming out soon.* + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.6.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Support for Python 3.12 was added in this release. In addition we added Robot Framework 7.0.1 + while dropping 5.0.1 which did not officially support Python 3.12. In addition with the almost + monthly releases of Selenium we have caught up testing against and supporting Selenium versions + 4.21.0, 4.22.0, 4.23.1, and 4.24.0. (`#1906`_) +- SeleniumLibrary v6.6.1 fixes a bad required version for Python 3.12. v6.6.0 was only compatible + with Python 3.12.0 and not what was desired or any 3.12.x. The point release fixes that issue. + +Acknowledgements +================ + +- I want to thank grepwood, KotlinIsland, and Robin Mackaij for pushing support python 3.12 and + Yuri, Tatu and Lassi for reviewing the changes. (`#1906`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1906`_ + - enhancement + - high + - Support python 3.12 + +Altogether 1 issue. View on the `issue tracker `__. + +.. _#1906: https://github.com/robotframework/SeleniumLibrary/issues/1906 diff --git a/docs/SeleniumLibrary-6.7.0.rst b/docs/SeleniumLibrary-6.7.0.rst new file mode 100644 index 000000000..f1bf8d778 --- /dev/null +++ b/docs/SeleniumLibrary-6.7.0.rst @@ -0,0 +1,106 @@ +===================== +SeleniumLibrary 6.7.0 +===================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.7.0 is a new release with +some minor enhancements and bug fixes. This versions add support for Python 3.13. + + +If you have pip_ installed, just run + +:: + + pip install --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.7.0 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.7.0 was released on Monday January 6, 2025. SeleniumLibrary supports +Python 3.8 through 3.13, Selenium 4.24.0 through 4.27.1 and +Robot Framework 6.1.1 and 7.1.1. + +*Note: This release, v 6.7.0, has been tested against the latest release candidate of the +upcoming Robot Framework version, 7.2. It is compatible and expect to support 7.2 when the +final release is made.* + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.7.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Fixed _find_by_data_locator when more than one colon was within the locator. If one + used the data strategy and the locator had additional colon in it the locator parser + would incorrectly parse the locator. This has been fixed in this release. (`#1924`_) +- Make SeleniumLibrary support one or more translations from same localisation project (`#1917`_) +- Support for Python version 3.13 + +Acknowledgements +================ + +We want to thank + +- `Markus Leben `_ for discovering, reporting, and fixing + the _find_by_data_locator issue (`#1924`_) +- `The Great Simo `_ and `Pavel `_ + for updating the requirements (`#1849`_) +- `iarmhi `_ for correcting an error the docs (`#1913`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1924`_ + - bug + - high + - Fix _find_by_data_locator + * - `#1917`_ + - enhancement + - high + - Make SeleniumLibrary support one or more translation from same localisation project + * - `#1849`_ + - --- + - medium + - Update the rerequirements + * - `#1913`_ + - bug + - low + - Remove unneeded 'send_' in docs + * - `#1925`_ + - --- + - --- + - Latest Versions Oct2024 + +Altogether 5 issues. View on the `issue tracker `__. + +.. _#1924: https://github.com/robotframework/SeleniumLibrary/issues/1924 +.. _#1917: https://github.com/robotframework/SeleniumLibrary/issues/1917 +.. _#1849: https://github.com/robotframework/SeleniumLibrary/issues/1849 +.. _#1913: https://github.com/robotframework/SeleniumLibrary/issues/1913 +.. _#1925: https://github.com/robotframework/SeleniumLibrary/issues/1925 diff --git a/docs/SeleniumLibrary-6.7.0rc1.html b/docs/SeleniumLibrary-6.7.0rc1.html new file mode 100644 index 000000000..476977bda --- /dev/null +++ b/docs/SeleniumLibrary-6.7.0rc1.html @@ -0,0 +1,1873 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + diff --git a/docs/SeleniumLibrary-6.7.0rc1.rst b/docs/SeleniumLibrary-6.7.0rc1.rst new file mode 100644 index 000000000..cfc0c0665 --- /dev/null +++ b/docs/SeleniumLibrary-6.7.0rc1.rst @@ -0,0 +1,103 @@ +======================== +SeleniumLibrary 6.7.0rc1 +======================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.7.0rc1 is a new release with +some minor enhancements and bug fixes. + +All issues targeted for SeleniumLibrary v6.7.0 can be found +from the `issue tracker`_. + +If you have pip_ installed, just run + +:: + + pip install --pre --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.7.0rc1 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.7.0rc1 was released on Sunday December 29, 2024. SeleniumLibrary supports +Python 3.8 through 3.13, Selenium 4.24.0 through 4.27.1 and +Robot Framework 6.1.1 and 7.1.1. + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.7.0 + + +.. contents:: + :depth: 2 + :local: + +Most important enhancements +=========================== + +- Fixed _find_by_data_locator when more than one colon was within the locator. If one + used the data strategy and the locator had additional colon in it the locator parser + would incorrectly parse the locator. This has been fixed in this release. (`#1924`_) +- Make SeleniumLibrary support one or more translations from same localisation project (`#1917`_) + +Acknowledgements +================ + +We want to thank + +- `Markus Leben `_ for discovering, reporting, and fixing + the _find_by_data_locator issue (`#1924`_) +- `The Great Simo `_ and `Pavel `_ + for updating the requirements (`#1849`_) +- `iarmhi `_ for correcting an error the docs (`#1913`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1924`_ + - bug + - high + - Fix _find_by_data_locator + * - `#1917`_ + - enhancement + - high + - Make SeleniumLibrary support one or more tranlsation from same localisation project + * - `#1849`_ + - --- + - medium + - Update the rerequirements + * - `#1913`_ + - bug + - low + - Remove unneeded 'send_' in docs + * - `#1925`_ + - --- + - --- + - Latest Versions Oct2024 + +Altogether 5 issues. View on the `issue tracker `__. + +.. _#1924: https://github.com/robotframework/SeleniumLibrary/issues/1924 +.. _#1917: https://github.com/robotframework/SeleniumLibrary/issues/1917 +.. _#1849: https://github.com/robotframework/SeleniumLibrary/issues/1849 +.. _#1913: https://github.com/robotframework/SeleniumLibrary/issues/1913 +.. _#1925: https://github.com/robotframework/SeleniumLibrary/issues/1925 diff --git a/docs/SeleniumLibrary-6.7.1.rst b/docs/SeleniumLibrary-6.7.1.rst new file mode 100644 index 000000000..31c557f0a --- /dev/null +++ b/docs/SeleniumLibrary-6.7.1.rst @@ -0,0 +1,72 @@ +===================== +SeleniumLibrary 6.7.1 +===================== + + +.. default-role:: code + + +SeleniumLibrary_ is a web testing library for `Robot Framework`_ that utilizes +the Selenium_ tool internally. SeleniumLibrary 6.7.1 is a new release with +one minor change - downgrade the requirements on the click dependency. + +If you have pip_ installed, just run + +:: + + pip install --upgrade robotframework-seleniumlibrary + +to install the latest available release or use + +:: + + pip install robotframework-seleniumlibrary==6.7.1 + +to install exactly this version. Alternatively you can download the source +distribution from PyPI_ and install it manually. + +SeleniumLibrary 6.7.1 was released on Wednesday February 26, 2025. SeleniumLibrary supports +Python 3.8 through 3.13, Selenium 4.24.0 through 4.27.1 and +Robot Framework 6.1.1 and 7.1.1. + +.. _Robot Framework: http://robotframework.org +.. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary +.. _Selenium: http://seleniumhq.org +.. _pip: http://pip-installer.org +.. _PyPI: https://pypi.python.org/pypi/robotframework-seleniumlibrary +.. _issue tracker: https://github.com/robotframework/SeleniumLibrary/issues?q=milestone%3Av6.7.1 + + +.. contents:: + :depth: 2 + :local: + +Changes +======= + +- Downgrade the requirement on click to `click>=8.0`. (`#1932`_) + +Acknowledgements +================ + +I want to thank Oliver Boehmer for raising up this issue and Pekka Klärck and Tatu Aalto for +consultation and review. (`#1932`_) + +Full list of fixes and enhancements +=================================== + +.. list-table:: + :header-rows: 1 + + * - ID + - Type + - Priority + - Summary + * - `#1932`_ + - --- + - medium + - Downgrade requirements on click to `click>=8.0` + +Altogether 1 issue. View on the `issue tracker `__. + +.. _#1932: https://github.com/robotframework/SeleniumLibrary/issues/1932 diff --git a/docs/SeleniumLibrary.html b/docs/SeleniumLibrary.html index 095f88efd..4d6abc3b6 100644 --- a/docs/SeleniumLibrary.html +++ b/docs/SeleniumLibrary.html @@ -1,1873 +1,420 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening library documentation failed

-
    -
  • Verify that you have JavaScript enabled in your browser.
  • -
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • -
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • -
-
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • + Make sure you are using a modern enough browser. If using + Internet Explorer, version 11 is required. +
  • +
  • + Check are there messages in your browser's + JavaScript error log. Please report the problem if you suspect + you have encountered a bug. +
  • +
+
+ + + + + +
+ + + + + + + + + + + + + + + + diff --git a/docs/index.html b/docs/index.html index d2d1e7348..3a9904b77 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,299 +1,184 @@ - - - - - - -SeleniumLibrary - - - - -
-

SeleniumLibrary

- - -
-

Introduction

-

SeleniumLibrary is a web testing library for Robot Framework that -utilizes the Selenium tool internally. The project is hosted on GitHub -and downloads can be found from PyPI.

-

SeleniumLibrary works with Selenium 3 and 4. It supports Python 3.6 or -newer. In addition to the normal Python interpreter, it works also -with PyPy.

-

SeleniumLibrary is based on the old SeleniumLibrary that was forked to -Selenium2Library and then later renamed back to SeleniumLibrary. -See the Versions and History sections below for more information about -different versions and the overall project history.

-https://img.shields.io/pypi/v/robotframework-seleniumlibrary.svg?label=version -https://img.shields.io/pypi/dm/robotframework-seleniumlibrary.svg -https://img.shields.io/pypi/l/robotframework-seleniumlibrary.svg -https://github.com/robotframework/SeleniumLibrary/actions/workflows/CI.yml/badge.svg?branch=master -
-
-

Keyword Documentation

-

See keyword documentation for available keywords and more information -about the library in general.

-
-
-

Installation

-

The recommended installation method is using pip:

-
pip install --upgrade robotframework-seleniumlibrary
-

Running this command installs also the latest Selenium and Robot Framework -versions, but you still need to install browser drivers separately. -The --upgrade option can be omitted when installing the library for the -first time.

-

Those migrating from Selenium2Library can install SeleniumLibrary so that -it is exposed also as Selenium2Library:

-
pip install --upgrade robotframework-selenium2library
-

The above command installs the normal SeleniumLibrary as well as a new -Selenium2Library version that is just a thin wrapper to SeleniumLibrary. -That allows importing Selenium2Library in tests while migrating to -SeleniumLibrary.

-

To install the last legacy Selenium2Library version, use this command instead:

-
pip install robotframework-selenium2library==1.8.0
-

With recent versions of pip it is possible to install directly from the -GitHub repository. To install latest source from the master branch, use -this command:

-
pip install git+https://github.com/robotframework/SeleniumLibrary.git
-

Please note that installation will take some time, because pip will -clone the SeleniumLibrary project to a temporary directory and then -perform the installation.

-

See Robot Framework installation instructions for detailed information -about installing Python and Robot Framework itself. For more details about -using pip see its own documentation.

-
-
-

Browser drivers

-

After installing the library, you still need to install browser and -operating system specific browser drivers for all those browsers you -want to use in tests. These are the exact same drivers you need to use with -Selenium also when not using SeleniumLibrary. More information about -drivers can be found from Selenium documentation.

-

The general approach to install a browser driver is downloading a right -driver, such as chromedriver for Chrome, and placing it into -a directory that is in PATH. Drivers for different browsers -can be found via Selenium documentation or by using your favorite -search engine with a search term like selenium chrome browser driver. -New browser driver versions are released to support features in -new browsers, fix bug, or otherwise, and you need to keep an eye on them -to know when to update drivers you use.

-

Alternatively, you can use a tool called WebdriverManager which can -find the latest version or when required, any version of appropriate -webdrivers for you and then download and link/copy it into right -location. Tool can run on all major operating systems and supports -downloading of Chrome, Firefox, Opera & Edge webdrivers.

-

Here's an example:

-
pip install webdrivermanager
-webdrivermanager firefox chrome --linkpath /usr/local/bin
-
-
-

Usage

-

To use SeleniumLibrary in Robot Framework tests, the library needs to -first be imported using the Library setting as any other library. -The library accepts some import time arguments, which are documented -in the keyword documentation along with all the keywords provided -by the library.

-

When using Robot Framework, it is generally recommended to write as -easy-to-understand tests as possible. The keywords provided by -SeleniumLibrary is pretty low level, though, and often require -implementation-specific arguments like element locators to be passed -as arguments. It is thus typically a good idea to write tests using -Robot Framework's higher-level keywords that utilize SeleniumLibrary -keywords internally. This is illustrated by the following example -where SeleniumLibrary keywords like Input Text are primarily -used by higher-level keywords like Input Username.

-
*** Settings ***
-Documentation     Simple example using SeleniumLibrary.
-Library           SeleniumLibrary
-
-*** Variables ***
-${LOGIN URL}      http://localhost:7272
-${BROWSER}        Chrome
-
-*** Test Cases ***
-Valid Login
-    Open Browser To Login Page
-    Input Username    demo
-    Input Password    mode
-    Submit Credentials
-    Welcome Page Should Be Open
-    [Teardown]    Close Browser
-
-*** Keywords ***
-Open Browser To Login Page
-    Open Browser    ${LOGIN URL}    ${BROWSER}
-    Title Should Be    Login Page
-
-Input Username
-    [Arguments]    ${username}
-    Input Text    username_field    ${username}
-
-Input Password
-    [Arguments]    ${password}
-    Input Text    password_field    ${password}
-
-Submit Credentials
-    Click Button    login_button
-
-Welcome Page Should Be Open
-    Title Should Be    Welcome Page
-

The above example is a slightly modified version of an example in a -demo project that illustrates using Robot Framework and SeleniumLibrary. -See the demo for more examples that you can also execute on your own -machine. For more information about Robot Framework test data syntax in -general see the Robot Framework User Guide.

-
-
-

Extending SeleniumLibrary

-

Before creating your own library which extends the SeleniumLibrary, please consider would -the extension be also useful also for general usage. If it could be useful also for general -usage, please create a new issue describing the enhancement request and even better if the -issue is backed up by a pull request.

-

If the enhancement is not generally useful, example solution is domain specific, then the -SeleniumLibrary offers public APIs which can be used to build its own plugins and libraries. -Plugin API allows us to add new keywords, modify existing keywords and modify the internal -functionality of the library. Also new libraries can be built on top of the -SeleniumLibrary. Please see extending documentation for more details about the -available methods and for examples how the library can be extended.

-
-
-

Community

-

If the provided documentation is not enough, there are various community channels -available:

- -
-
-

Versions

-

SeleniumLibrary has over the years lived under SeleniumLibrary and -Selenium2Library names and different library versions have supported -different Selenium and Python versions. This is summarized in the table -below and the History section afterwards explains the project history -a bit more.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Project

Selenium Version

Python Version

Comment

SeleniumLibrary 2.9.2 and earlier

Selenium 1 and 2

Python 2.5-2.7

The original SeleniumLibrary using Selenium RC API.

Selenium2Library 1.8.0 and earlier

Selenium 2 and 3

Python 2.6-2.7

Fork of SeleniumLibrary using Selenium WebDriver API.

SeleniumLibrary 3.0 and 3.1

Selenium 2 and 3

Python 2.7 and 3.3+

Selenium2Library renamed and with Python 3 support and new architecture.

SeleniumLibrary 3.2

Selenium 3

Python 2.7 and 3.4+

Drops Selenium 2 support.

SeleniumLibrary 4.0

Selenium 3

Python 2.7 and 3.4+

Plugin API and support for event friging webdriver.

SeleniumLibrary 4.1

Selenium 3

Python 2.7 and 3.5+

Drops Python 3.4 support.

SeleniumLibrary 4.2

Selenium 3

Python 2.7 and 3.5+

Supports only Selenium 3.141.0 or newer.

SeleniumLibrary 4.4

Selenium 3 and 4

Python 2.7 and 3.6+

New PythonLibCore and dropped Python 3.5 support.

SeleniumLibrary 5.0

Selenium 3 and 4

Python 3.6+

Python 2 and Jython support is dropped.

SeleniumLibrary 5.1

Selenium 3 and 4

Python 3.6+

Robot Framework 3.1 support is dropped.

Selenium2Library 3.0

Depends on SeleniumLibrary

Depends on SeleniumLibrary

Thin wrapper for SeleniumLibrary 3.0 to ease transition.

-
-
-

History

-

SeleniumLibrary originally used the Selenium Remote Controller (RC) API. -When Selenium 2 was introduced with the new but backwards incompatible -WebDriver API, SeleniumLibrary kept using Selenium RC and separate -Selenium2Library using WebDriver was forked. These projects contained -mostly the same keywords and in most cases Selenium2Library was a drop-in -replacement for SeleniumLibrary.

-

Over the years development of the old SeleniumLibrary stopped and also -the Selenium RC API it used was deprecated. Selenium2Library was developed -further and replaced the old library as the de facto web testing library -for Robot Framework.

-

When Selenium 3 was released in 2016, it was otherwise backwards compatible -with Selenium 2, but the deprecated Selenium RC API was removed. This had two -important effects:

-
    -
  • The old SeleniumLibrary could not anymore be used with new Selenium versions. -This project was pretty much dead.

  • -
  • Selenium2Library was badly named as it supported Selenium 3 just fine. -This project needed a new name.

  • -
-

At the same time when Selenium 3 was released, Selenium2Library was going -through larger architecture changes in order to ease future maintenance and -to make adding Python 3 support easier. With all these big internal and -external changes, it made sense to rename Selenium2Library back to -SeleniumLibrary. This decision basically meant following changes:

-
    -
  • Create separate repository for the old SeleniumLibrary to preserve -its history since Selenium2Library was forked.

  • -
  • Rename Selenium2Library project and the library itself to SeleniumLibrary.

  • -
  • Add new Selenium2Library project to ease transitioning from Selenium2Library -to SeleniumLibrary.

  • -
-

Going forward, all new development will happen in the new SeleniumLibrary -project.

-
-
- - + + + + + + +SeleniumLibrary + + + + +
+

SeleniumLibrary

+ + +
+

Introduction

+

SeleniumLibrary is a web testing library for Robot Framework that +utilizes the Selenium tool internally. The project is hosted on GitHub +and downloads can be found from PyPI.

+

SeleniumLibrary currently works with Selenium 4. It supports Python 3.8 through 3.13. +In addition to the normal Python interpreter, it works also +with PyPy.

+

SeleniumLibrary is based on the "old SeleniumLibrary" that was forked to +Selenium2Library and then later renamed back to SeleniumLibrary. +See the VERSIONS.rst for more information about different versions and the +overall project history.

+ +https://img.shields.io/pypi/v/robotframework-seleniumlibrary.svg?label=version + + +https://img.shields.io/pypi/dm/robotframework-seleniumlibrary.svg + + +https://img.shields.io/pypi/l/robotframework-seleniumlibrary.svg + + +https://github.com/robotframework/SeleniumLibrary/actions/workflows/CI.yml/badge.svg?branch=master + +
+
+

Keyword Documentation

+

See keyword documentation for available keywords and more information +about the library in general.

+
+
+

Installation

+

The recommended installation method is using pip:

+
pip install --upgrade robotframework-seleniumlibrary
+

Running this command installs also the latest Selenium and Robot Framework +versions, but you still need to install browser drivers separately. +The --upgrade option can be omitted when installing the library for the +first time.

+

It is possible to install directly from the GitHub repository. To install +latest source from the master branch, use this command:

+
pip install git+https://github.com/robotframework/SeleniumLibrary.git
+

Please note that installation will take some time, because pip will +clone the SeleniumLibrary project to a temporary directory and then +perform the installation.

+

See Robot Framework installation instructions for detailed information +about installing Python and Robot Framework itself. For more details about +using pip see its own documentation.

+
+
+

Browser drivers

+

After installing the library, you still need to install browser and +operating system specific browser drivers for all those browsers you +want to use in tests. These are the exact same drivers you need to use with +Selenium also when not using SeleniumLibrary. More information about +drivers can be found from Selenium documentation.

+

The general approach to install a browser driver is downloading a right +driver, such as chromedriver for Chrome, and placing it into +a directory that is in PATH. Drivers for different browsers +can be found via Selenium documentation or by using your favorite +search engine with a search term like selenium chrome browser driver. +New browser driver versions are released to support features in +new browsers, fix bug, or otherwise, and you need to keep an eye on them +to know when to update drivers you use.

+

Alternatively, you can use a tool called WebdriverManager which can +find the latest version or when required, any version of appropriate +webdrivers for you and then download and link/copy it into right +location. Tool can run on all major operating systems and supports +downloading of Chrome, Firefox, Opera & Edge webdrivers.

+

Here's an example:

+
pip install webdrivermanager
+webdrivermanager firefox chrome --linkpath /usr/local/bin
+
+
+

Usage

+

To use SeleniumLibrary in Robot Framework tests, the library needs to +first be imported using the Library setting as any other library. +The library accepts some import time arguments, which are documented +in the keyword documentation along with all the keywords provided +by the library.

+

When using Robot Framework, it is generally recommended to write as +easy-to-understand tests as possible. The keywords provided by +SeleniumLibrary is pretty low level, though, and often require +implementation-specific arguments like element locators to be passed +as arguments. It is thus typically a good idea to write tests using +Robot Framework's higher-level keywords that utilize SeleniumLibrary +keywords internally. This is illustrated by the following example +where SeleniumLibrary keywords like Input Text are primarily +used by higher-level keywords like Input Username.

+
*** Settings ***
+Documentation     Simple example using SeleniumLibrary.
+Library           SeleniumLibrary
+
+*** Variables ***
+${LOGIN URL}      http://localhost:7272
+${BROWSER}        Chrome
+
+*** Test Cases ***
+Valid Login
+    Open Browser To Login Page
+    Input Username    demo
+    Input Password    mode
+    Submit Credentials
+    Welcome Page Should Be Open
+    [Teardown]    Close Browser
+
+*** Keywords ***
+Open Browser To Login Page
+    Open Browser    ${LOGIN URL}    ${BROWSER}
+    Title Should Be    Login Page
+
+Input Username
+    [Arguments]    ${username}
+    Input Text    username_field    ${username}
+
+Input Password
+    [Arguments]    ${password}
+    Input Text    password_field    ${password}
+
+Submit Credentials
+    Click Button    login_button
+
+Welcome Page Should Be Open
+    Title Should Be    Welcome Page
+

The above example is a slightly modified version of an example in a +demo project that illustrates using Robot Framework and SeleniumLibrary. +See the demo for more examples that you can also execute on your own +machine. For more information about Robot Framework test data syntax in +general see the Robot Framework User Guide.

+
+
+

Extending SeleniumLibrary

+

Before creating your own library which extends the SeleniumLibrary, please consider would +the extension be also useful also for general usage. If it could be useful also for general +usage, please create a new issue describing the enhancement request and even better if the +issue is backed up by a pull request.

+

If the enhancement is not generally useful, example solution is domain specific, then the +SeleniumLibrary offers public APIs which can be used to build its own plugins and libraries. +Plugin API allows us to add new keywords, modify existing keywords and modify the internal +functionality of the library. Also new libraries can be built on top of the +SeleniumLibrary. Please see extending documentation for more details about the +available methods and for examples how the library can be extended.

+
+
+

Community

+

If the provided documentation is not enough, there are various community channels +available:

+ +
+
+ + diff --git a/pyproject.toml b/pyproject.toml index de8c7c398..dd1b9775e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,3 +15,9 @@ exclude = ''' profile = "black" src_paths="." skip_glob = ["src/SeleniumLibrary/__init__.pyi"] + + +[tool.pytest.ini_options] +pythonpath = [ + "src" +] diff --git a/requirements-dev.txt b/requirements-dev.txt index 45d9b51e5..b04bb42bf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,25 +1,25 @@ # Requirements needed for SeleniumLibrary development but not by end users. # Creating releases has its own requirements listed in requirements-build.txt. -invoke >= 1.4.1 -mockito >= 1.2.2 -robotstatuschecker >= 2.0.3 +invoke >= 2.2.0 +mockito >= 1.4.0 +robotstatuschecker >= 3.0.1 approvaltests == 8.4.1 -empty_files >= 0.0.3 -pytest >= 6.0.2 +empty_files >= 0.0.9 +pytest >= 7.4.0 pytest-mockito >= 0.0.4 -pytest-approvaltests >= 0.2.0 -requests >= 2.24.0 -robotframework-pabot >= 1.10.0 +pytest-approvaltests >= 0.2.4 +requests >= 2.31.0 +robotframework-pabot >= 2.16.0 black >= 20.8b1 -flake8 >= 3.9.0 +flake8 >= 6.1.0 # Requirements needed when generating releases. See BUILD.rst for details. -rellu >= 0.6 -twine >= 3.2.0 -wheel >= 0.35.1 -docutils >= 0.14 +rellu >= 0.7 +twine >= 4.0.2 +wheel >= 0.41.1 +docutils >= 0.20.1 pygments -beautifulsoup4 >= 4.9.3 +beautifulsoup4 >= 4.12.2 # Include normal dependencies from requirements.txt. Makes it possible to use # requirements-dev.txt as a single requirement file in PyCharm and other IDEs. diff --git a/requirements.txt b/requirements.txt index cf7a70b10..502fafc26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ selenium >= 4.3.0 robotframework >= 4.1.3 -robotframework-pythonlibcore >= 3.0.0 +robotframework-pythonlibcore >= 4.4.1 +click >= 8.0 diff --git a/setup.py b/setup.py index e2a6492ff..a60681d30 100755 --- a/setup.py +++ b/setup.py @@ -13,9 +13,12 @@ Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 -Programming Language :: Python :: 3.6 -Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 +Programming Language :: Python :: 3.9 +Programming Language :: Python :: 3.10 +Programming Language :: Python :: 3.11 +Programming Language :: Python :: 3.12 +Programming Language :: Python :: 3.13 Programming Language :: Python :: 3 :: Only Topic :: Software Development :: Testing Framework :: Robot Framework @@ -33,17 +36,18 @@ version = VERSION, description = 'Web testing library for Robot Framework', long_description = DESCRIPTION, - author = 'Ed Manlove, Yuri Verweij, Lisa Crispin', + author = 'Ed Manlove, Yuri Verweij', author_email = 'emanlove@verizon.net', url = 'https://github.com/robotframework/SeleniumLibrary', license = 'Apache License 2.0', keywords = 'robotframework testing testautomation selenium webdriver web', platforms = 'any', classifiers = CLASSIFIERS, - python_requires = '>=3.6, <4', + python_requires = '>=3.8, <3.14', install_requires = REQUIREMENTS, package_dir = {'': 'src'}, packages = find_packages('src'), + entry_points = {"console_scripts": ["selib=SeleniumLibrary.entry.__main__:cli"]}, package_data ={ 'SeleniumLibrary': ['*.pyi'] diff --git a/src/SeleniumLibrary/__init__.py b/src/SeleniumLibrary/__init__.py index 24ae59b3f..0187df611 100644 --- a/src/SeleniumLibrary/__init__.py +++ b/src/SeleniumLibrary/__init__.py @@ -1,691 +1,875 @@ -# Copyright 2008-2011 Nokia Networks -# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors -# Copyright 2016- Robot Framework Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from collections import namedtuple -from datetime import timedelta -from inspect import getdoc, isclass -from typing import Optional, List - -from robot.api import logger -from robot.errors import DataError -from robot.libraries.BuiltIn import BuiltIn -from robot.utils import is_string -from robot.utils.importer import Importer - -from robotlibcore import DynamicCore -from selenium.webdriver.remote.webdriver import WebDriver -from selenium.webdriver.remote.webelement import WebElement - -from SeleniumLibrary.base import LibraryComponent -from SeleniumLibrary.errors import NoOpenBrowser, PluginError -from SeleniumLibrary.keywords import ( - AlertKeywords, - BrowserManagementKeywords, - CookieKeywords, - ElementKeywords, - ExpectedConditionKeywords, - FormElementKeywords, - FrameKeywords, - JavaScriptKeywords, - RunOnFailureKeywords, - ScreenshotKeywords, - SelectElementKeywords, - TableElementKeywords, - WaitingKeywords, - WebDriverCache, - WindowKeywords, -) -from SeleniumLibrary.keywords.screenshot import EMBED -from SeleniumLibrary.locators import ElementFinder -from SeleniumLibrary.utils import LibraryListener, is_truthy, _convert_timeout, _convert_delay - - -__version__ = "6.3.0" - - -class SeleniumLibrary(DynamicCore): - """SeleniumLibrary is a web testing library for Robot Framework. - - This document explains how to use keywords provided by SeleniumLibrary. - For information about installation, support, and more, please visit the - [https://github.com/robotframework/SeleniumLibrary|project pages]. - For more information about Robot Framework, see http://robotframework.org. - - SeleniumLibrary uses the Selenium WebDriver modules internally to - control a web browser. See http://seleniumhq.org for more information - about Selenium in general and SeleniumLibrary README.rst - [https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter] - for more details about WebDriver binary installation. - - %TOC% - - = Locating elements = - - All keywords in SeleniumLibrary that need to interact with an element - on a web page take an argument typically named ``locator`` that specifies - how to find the element. Most often the locator is given as a string - using the locator syntax described below, but `using WebElements` is - possible too. - - == Locator syntax == - - SeleniumLibrary supports finding elements based on different strategies - such as the element id, XPath expressions, or CSS selectors. The strategy - can either be explicitly specified with a prefix or the strategy can be - implicit. - - === Default locator strategy === - - By default, locators are considered to use the keyword specific default - locator strategy. All keywords support finding elements based on ``id`` - and ``name`` attributes, but some keywords support additional attributes - or other values that make sense in their context. For example, `Click - Link` supports the ``href`` attribute and the link text and addition - to the normal ``id`` and ``name``. - - Examples: - - | `Click Element` | example | # Match based on ``id`` or ``name``. | - | `Click Link` | example | # Match also based on link text and ``href``. | - | `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. | - - If a locator accidentally starts with a prefix recognized as `explicit - locator strategy` or `implicit XPath strategy`, it is possible to use - the explicit ``default`` prefix to enable the default strategy. - - Examples: - - | `Click Element` | name:foo | # Find element with name ``foo``. | - | `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. | - | `Click Element` | //foo | # Find element using XPath ``//foo``. | - | `Click Element` | default: //foo | # Use default strategy with value ``//foo``. | - - === Explicit locator strategy === - - The explicit locator strategy is specified with a prefix using either - syntax ``strategy:value`` or ``strategy=value``. The former syntax - is preferred because the latter is identical to Robot Framework's - [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax| - named argument syntax] and that can cause problems. Spaces around - the separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo`` - are all equivalent. - - Locator strategies that are supported by default are listed in the table - below. In addition to them, it is possible to register `custom locators`. - - | = Strategy = | = Match based on = | = Example = | - | id | Element ``id``. | ``id:example`` | - | name | ``name`` attribute. | ``name:example`` | - | identifier | Either ``id`` or ``name``. | ``identifier:example`` | - | class | Element ``class``. | ``class:example`` | - | tag | Tag name. | ``tag:div`` | - | xpath | XPath expression. | ``xpath://div[@id="example"]`` | - | css | CSS selector. | ``css:div#example`` | - | dom | DOM expression. | ``dom:document.images[5]`` | - | link | Exact text a link has. | ``link:The example`` | - | partial link | Partial link text. | ``partial link:he ex`` | - | sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` | - | data | Element ``data-*`` attribute | ``data:id:my_id`` | - | jquery | jQuery expression. | ``jquery:div.example`` | - | default | Keyword specific default behavior. | ``default:example`` | - - See the `Default locator strategy` section below for more information - about how the default strategy works. Using the explicit ``default`` - prefix is only necessary if the locator value itself accidentally - matches some of the explicit strategies. - - Different locator strategies have different pros and cons. Using ids, - either explicitly like ``id:foo`` or by using the `default locator - strategy` simply like ``foo``, is recommended when possible, because - the syntax is simple and locating elements by id is fast for browsers. - If an element does not have an id or the id is not stable, other - solutions need to be used. If an element has a unique tag name or class, - using ``tag``, ``class`` or ``css`` strategy like ``tag:h1``, - ``class:example`` or ``css:h1.example`` is often an easy solution. In - more complex cases using XPath expressions is typically the best - approach. They are very powerful but a downside is that they can also - get complex. - - Examples: - - | `Click Element` | id:foo | # Element with id 'foo'. | - | `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. | - | `Click Element` | xpath: //div[@id="foo"]//h1 | # Same as the above using XPath, not CSS. | - | `Click Element` | xpath: //*[contains(text(), "example")] | # Element containing text 'example'. | - - *NOTE:* - - - The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0 - and newer. - - Using the ``sizzle`` strategy or its alias ``jquery`` requires that - the system under test contains the jQuery library. - - Prior to SeleniumLibrary 3.0, table related keywords only supported - ``xpath``, ``css`` and ``sizzle/jquery`` strategies. - - ``data`` strategy is conveniance locator that will construct xpath from the parameters. - If you have element like `
`, you locate the element via - ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0 - - === Implicit XPath strategy === - - If the locator starts with ``//`` or multiple opening parenthesis in front - of the ``//``, the locator is considered to be an XPath expression. In other - words, using ``//div`` is equivalent to using explicit ``xpath://div`` and - ``((//div))`` is equivalent to using explicit ``xpath:((//div))`` - - Examples: - - | `Click Element` | //div[@id="foo"]//h1 | - | `Click Element` | (//div)[2] | - - The support for the ``(//`` prefix is new in SeleniumLibrary 3.0. - Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0. - - === Chaining locators === - - It is possible chain multiple locators together as single locator. Each chained locator must start with locator - strategy. Chained locators must be separated with single space, two greater than characters and followed with - space. It is also possible mix different locator strategies, example css or xpath. Also a list can also be - used to specify multiple locators. This is useful, is some part of locator would match as the locator separator - but it should not. Or if there is need to existing WebElement as locator. - - Although all locators support chaining, some locator strategies do not abey the chaining. This is because - some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context - and not for the element found be the previous locator. Chaining is supported by locator strategies which - are based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery - - Examples: - | `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class "bar" | - - List examples: - | ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), " >> "] | - | `Page Should Contain Element` | ${locator_list} | | | - | ${element} = | Get WebElement | xpath://*[text(), " >> "] | | - | ${locator_list} = | `Create List` | css:div#div_id | ${element} | - | `Page Should Contain Element` | ${locator_list} | | | - - Chaining locators in new in SeleniumLibrary 5.0 - - == Using WebElements == - - In addition to specifying a locator as a string, it is possible to use - Selenium's WebElement objects. This requires first getting a WebElement, - for example, by using the `Get WebElement` keyword. - - | ${elem} = | `Get WebElement` | id:example | - | `Click Element` | ${elem} | | - - == Custom locators == - - If more complex lookups are required than what is provided through the - default locators, custom lookup strategies can be created. Using custom - locators is a two part process. First, create a keyword that returns - a WebElement that should be acted on: - - | Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} | - | | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); | - | | [Return] | ${element} | - - This keyword is a reimplementation of the basic functionality of the - ``id`` locator where ``${browser}`` is a reference to a WebDriver - instance and ``${locator}`` is the name of the locator strategy. To use - this locator, it must first be registered by using the - `Add Location Strategy` keyword: - - | `Add Location Strategy` | custom | Custom Locator Strategy | - - The first argument of `Add Location Strategy` specifies the name of - the strategy and it must be unique. After registering the strategy, - the usage is the same as with other locators: - - | `Click Element` | custom:example | - - See the `Add Location Strategy` keyword for more details. - - = Browser and Window = - - There is different conceptual meaning when SeleniumLibrary talks - about windows or browsers. This chapter explains those differences. - - == Browser == - - When `Open Browser` or `Create WebDriver` keyword is called, it - will create a new Selenium WebDriver instance by using the - [https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver] - API. In SeleniumLibrary terms, a new browser is created. It is - possible to start multiple independent browsers (Selenium Webdriver - instances) at the same time, by calling `Open Browser` or - `Create WebDriver` multiple times. These browsers are usually - independent of each other and do not share data like cookies, - sessions or profiles. Typically when the browser starts, it - creates a single window which is shown to the user. - - == Window == - - Windows are the part of a browser that loads the web site and presents - it to the user. All content of the site is the content of the window. - Windows are children of a browser. In SeleniumLibrary browser is a - synonym for WebDriver instance. One browser may have multiple - windows. Windows can appear as tabs, as separate windows or pop-ups with - different position and size. Windows belonging to the same browser - typically share the sessions detail, like cookies. If there is a - need to separate sessions detail, example login with two different - users, two browsers (Selenium WebDriver instances) must be created. - New windows can be opened example by the application under test or - by example `Execute Javascript` keyword: - - | `Execute Javascript` window.open() # Opens a new window with location about:blank - - The example below opens multiple browsers and windows, - to demonstrate how the different keywords can be used to interact - with browsers, and windows attached to these browsers. - - Structure: - | BrowserA - | Window 1 (location=https://robotframework.org/) - | Window 2 (location=https://robocon.io/) - | Window 3 (location=https://github.com/robotframework/) - | - | BrowserB - | Window 1 (location=https://github.com/) - - Example: - | `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. | - | `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. | - | `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA | - | `Go To` | https://robocon.io | | | # Second window navigates to robocon site. | - | `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. | - | ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA | - | `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. | - | `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. | - | ${location} | `Get Location` | | | # ${location} is: https://www.github.com | - | `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. | - | ${location} | `Get Location` | | | # ${location} = https://robocon.io/ | - | @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). | - | @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. | - - The above example, @{locations 1} contains the following items: - https://robotframework.org/, https://robocon.io/ and - https://github.com/robotframework/'. The @{locations 2} - contains the following items: https://robotframework.org/, - https://robocon.io/, https://github.com/robotframework/' - and 'https://github.com/. - - = Timeouts, waits, and delays = - - This section discusses different ways how to wait for elements to - appear on web pages and to slow down execution speed otherwise. - It also explains the `time format` that can be used when setting various - timeouts, waits, and delays. - - == Timeout == - - SeleniumLibrary contains various keywords that have an optional - ``timeout`` argument that specifies how long these keywords should - wait for certain events or actions. These keywords include, for example, - ``Wait ...`` keywords and keywords related to alerts. Additionally - `Execute Async Javascript`. Although it does not have ``timeout``, - argument, uses a timeout to define how long asynchronous JavaScript - can run. - - The default timeout these keywords use can be set globally either by - using the `Set Selenium Timeout` keyword or with the ``timeout`` argument - when `importing` the library. If no default timeout is set globally, the - default is 5 seconds. If None is specified for the timeout argument in the - keywords, the default is used. See `time format` below for supported - timeout syntax. - - == Implicit wait == - - Implicit wait specifies the maximum time how long Selenium waits when - searching for elements. It can be set by using the `Set Selenium Implicit - Wait` keyword or with the ``implicit_wait`` argument when `importing` - the library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp| - Selenium documentation] for more information about this functionality. - - See `time format` below for supported syntax. - - == Page load == - Page load timeout is the amount of time to wait for page load to complete - until a timeout exception is raised. - - The default page load timeout can be set globally - when `importing` the library with the ``page_load_timeout`` argument - or by using the `Set Selenium Page Load Timeout` keyword. - - See `time format` below for supported timeout syntax. - - Support for page load is new in SeleniumLibrary 6.1 - - == Selenium speed == - - Selenium execution speed can be slowed down globally by using `Set - Selenium speed` keyword. This functionality is designed to be used for - demonstrating or debugging purposes. Using it to make sure that elements - appear on a page is not a good idea. The above-explained timeouts - and waits should be used instead. - - See `time format` below for supported syntax. - - == Time format == - - All timeouts and waits can be given as numbers considered seconds - (e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax - (e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about - the time syntax see the - [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide]. - - = Run-on-failure functionality = - - SeleniumLibrary has a handy feature that it can automatically execute - a keyword if any of its own keywords fails. By default, it uses the - `Capture Page Screenshot` keyword, but this can be changed either by - using the `Register Keyword To Run On Failure` keyword or with the - ``run_on_failure`` argument when `importing` the library. It is - possible to use any keyword from any imported library or resource file. - - The run-on-failure functionality can be disabled by using a special value - ``NOTHING`` or anything considered false (see `Boolean arguments`) - such as ``NONE``. - - = Boolean arguments = - - Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the - boolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint]. - More details in Robot Framework - [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide] - - Please note SeleniumLibrary 3 and 4 did have own custom methods to covert - arguments to boolean values. - - = EventFiringWebDriver = - - The SeleniumLibrary offers support for - [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver]. - See the Selenium and SeleniumLibrary - [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support] - documentation for further details. - - EventFiringWebDriver is new in SeleniumLibrary 4.0 - - = Thread support = - - SeleniumLibrary is not thread-safe. This is mainly due because the underlying - [https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe| - Selenium tool is not thread-safe] within one browser/driver instance. - Because of the limitation in the Selenium side, the keywords or the - API provided by the SeleniumLibrary is not thread-safe. - - = Plugins = - - SeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal - functionality without creating a new library or hacking the source code. See - [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API] - documentation for further details. - - Plugin API is new SeleniumLibrary 4.0 - """ - - ROBOT_LIBRARY_SCOPE = "GLOBAL" - ROBOT_LIBRARY_VERSION = __version__ - - def __init__( - self, - timeout=timedelta(seconds=5), - implicit_wait=timedelta(seconds=0), - run_on_failure="Capture Page Screenshot", - screenshot_root_directory: Optional[str] = None, - plugins: Optional[str] = None, - event_firing_webdriver: Optional[str] = None, - page_load_timeout=timedelta(minutes=5), - action_chain_delay=timedelta(seconds=0.25), - ): - """SeleniumLibrary can be imported with several optional arguments. - - - ``timeout``: - Default value for `timeouts` used with ``Wait ...`` keywords. - - ``implicit_wait``: - Default value for `implicit wait` used when locating elements. - - ``run_on_failure``: - Default action for the `run-on-failure functionality`. - - ``screenshot_root_directory``: - Path to folder where possible screenshots are created or EMBED. - See `Set Screenshot Directory` keyword for further details about EMBED. - If not given, the directory where the log file is written is used. - - ``plugins``: - Allows extending the SeleniumLibrary with external Python classes. - - ``event_firing_webdriver``: - Class for wrapping Selenium with - [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver] - - ``page_load_timeout``: - Default value to wait for page load to complete until a timeout exception is raised. - - ``action_chain_delay``: - Default value for `ActionChains` delay to wait in between actions. - """ - self.timeout = _convert_timeout(timeout) - self.implicit_wait = _convert_timeout(implicit_wait) - self.action_chain_delay = _convert_delay(action_chain_delay) - self.page_load_timeout = _convert_timeout(page_load_timeout) - self.speed = 0.0 - self.run_on_failure_keyword = RunOnFailureKeywords.resolve_keyword( - run_on_failure - ) - self._running_on_failure_keyword = False - self.screenshot_root_directory = screenshot_root_directory - self._resolve_screenshot_root_directory() - self._element_finder = ElementFinder(self) - self._plugin_keywords = [] - libraries = [ - AlertKeywords(self), - BrowserManagementKeywords(self), - CookieKeywords(self), - ElementKeywords(self), - ExpectedConditionKeywords(self), - FormElementKeywords(self), - FrameKeywords(self), - JavaScriptKeywords(self), - RunOnFailureKeywords(self), - ScreenshotKeywords(self), - SelectElementKeywords(self), - TableElementKeywords(self), - WaitingKeywords(self), - WindowKeywords(self), - ] - self.ROBOT_LIBRARY_LISTENER = LibraryListener() - self._running_keyword = None - self.event_firing_webdriver = None - if is_truthy(event_firing_webdriver): - self.event_firing_webdriver = self._parse_listener(event_firing_webdriver) - self._plugins = [] - if is_truthy(plugins): - plugin_libs = self._parse_plugins(plugins) - self._plugins = plugin_libs - libraries = libraries + plugin_libs - self._drivers = WebDriverCache() - DynamicCore.__init__(self, libraries) - - def run_keyword(self, name: str, args: tuple, kwargs: dict): - try: - return DynamicCore.run_keyword(self, name, args, kwargs) - except Exception: - self.failure_occurred() - raise - - def get_keyword_tags(self, name: str) -> list: - tags = list(DynamicCore.get_keyword_tags(self, name)) - if name in self._plugin_keywords: - tags.append("plugin") - return tags - - def get_keyword_documentation(self, name: str) -> str: - if name == "__intro__": - return self._get_intro_documentation() - return DynamicCore.get_keyword_documentation(self, name) - - def _parse_plugin_doc(self): - Doc = namedtuple("Doc", "doc, name") - for plugin in self._plugins: - yield Doc( - doc=getdoc(plugin) or "No plugin documentation found.", - name=plugin.__class__.__name__, - ) - - def _get_intro_documentation(self): - intro = DynamicCore.get_keyword_documentation(self, "__intro__") - for plugin_doc in self._parse_plugin_doc(): - intro = f"{intro}\n\n" - intro = f"{intro}= Plugin: {plugin_doc.name} =\n\n" - intro = f"{intro}{plugin_doc.doc}" - return intro - - def register_driver(self, driver: WebDriver, alias: str): - """Add's a `driver` to the library WebDriverCache. - - :param driver: Instance of the Selenium `WebDriver`. - :type driver: selenium.webdriver.remote.webdriver.WebDriver - :param alias: Alias given for this `WebDriver` instance. - :type alias: str - :return: The index of the `WebDriver` instance. - :rtype: int - """ - return self._drivers.register(driver, alias) - - def failure_occurred(self): - """Method that is executed when a SeleniumLibrary keyword fails. - - By default, executes the registered run-on-failure keyword. - Libraries extending SeleniumLibrary can overwrite this hook - method if they want to provide custom functionality instead. - """ - if self._running_on_failure_keyword or not self.run_on_failure_keyword: - return - try: - self._running_on_failure_keyword = True - if self.run_on_failure_keyword.lower() == "capture page screenshot": - self.capture_page_screenshot() - else: - BuiltIn().run_keyword(self.run_on_failure_keyword) - except Exception as err: - logger.warn( - f"Keyword '{self.run_on_failure_keyword}' could not be run on failure: {err}" - ) - finally: - self._running_on_failure_keyword = False - - @property - def driver(self) -> WebDriver: - """Current active driver. - - :rtype: selenium.webdriver.remote.webdriver.WebDriver - :raises SeleniumLibrary.errors.NoOpenBrowser: If browser is not open. - """ - if not self._drivers.current: - raise NoOpenBrowser("No browser is open.") - return self._drivers.current - - def find_element( - self, locator: str, parent: Optional[WebElement] = None - ) -> WebElement: - """Find element matching `locator`. - - :param locator: Locator to use when searching the element. - See library documentation for the supported locator syntax. - :type locator: str or selenium.webdriver.remote.webelement.WebElement - :param parent: Optional parent `WebElememt` to search child elements - from. By default, search starts from the root using `WebDriver`. - :type parent: selenium.webdriver.remote.webelement.WebElement - :return: Found `WebElement`. - :rtype: selenium.webdriver.remote.webelement.WebElement - :raises SeleniumLibrary.errors.ElementNotFound: If element not found. - """ - return self._element_finder.find(locator, parent=parent) - - def find_elements( - self, locator: str, parent: WebElement = None - ) -> List[WebElement]: - """Find all elements matching `locator`. - - :param locator: Locator to use when searching the element. - See library documentation for the supported locator syntax. - :type locator: str or selenium.webdriver.remote.webelement.WebElement - :param parent: Optional parent `WebElememt` to search child elements - from. By default, search starts from the root using `WebDriver`. - :type parent: selenium.webdriver.remote.webelement.WebElement - :return: list of found `WebElement` or e,mpty if elements are not found. - :rtype: list[selenium.webdriver.remote.webelement.WebElement] - """ - return self._element_finder.find( - locator, first_only=False, required=False, parent=parent - ) - - def _parse_plugins(self, plugins): - libraries = [] - importer = Importer("test library") - for parsed_plugin in self._string_to_modules(plugins): - plugin = importer.import_class_or_module(parsed_plugin.module) - if not isclass(plugin): - message = f"Importing test library: '{parsed_plugin.module}' failed." - raise DataError(message) - plugin = plugin(self, *parsed_plugin.args, **parsed_plugin.kw_args) - if not isinstance(plugin, LibraryComponent): - message = ( - "Plugin does not inherit SeleniumLibrary.base.LibraryComponent" - ) - raise PluginError(message) - self._store_plugin_keywords(plugin) - libraries.append(plugin) - return libraries - - def _parse_listener(self, event_firing_webdriver): - listener_module = self._string_to_modules(event_firing_webdriver) - listener_count = len(listener_module) - if listener_count > 1: - message = f"Is is possible import only one listener but there was {listener_count} listeners." - raise ValueError(message) - listener_module = listener_module[0] - importer = Importer("test library") - listener = importer.import_class_or_module(listener_module.module) - if not isclass(listener): - message = f"Importing test Selenium lister class '{listener_module.module}' failed." - raise DataError(message) - return listener - - def _string_to_modules(self, modules): - Module = namedtuple("Module", "module, args, kw_args") - parsed_modules = [] - for module in modules.split(","): - module = module.strip() - module_and_args = module.split(";") - module_name = module_and_args.pop(0) - kw_args = {} - args = [] - for argument in module_and_args: - if "=" in argument: - key, value = argument.split("=") - kw_args[key] = value - else: - args.append(argument) - module = Module(module=module_name, args=args, kw_args=kw_args) - parsed_modules.append(module) - return parsed_modules - - def _store_plugin_keywords(self, plugin): - dynamic_core = DynamicCore([plugin]) - self._plugin_keywords.extend(dynamic_core.get_keyword_names()) - - def _resolve_screenshot_root_directory(self): - screenshot_root_directory = self.screenshot_root_directory - if is_string(screenshot_root_directory): - if screenshot_root_directory.upper() == EMBED: - self.screenshot_root_directory = EMBED +# Copyright 2008-2011 Nokia Networks +# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors +# Copyright 2016- Robot Framework Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from collections import namedtuple +from datetime import timedelta +import importlib +from inspect import getdoc, isclass +from pathlib import Path +import pkgutil +from typing import Optional, List, Union + +from robot.api import logger +from robot.errors import DataError +from robot.libraries.BuiltIn import BuiltIn +from robot.utils import is_string +from robot.utils.importer import Importer + +from robotlibcore import DynamicCore +from selenium.webdriver.remote.webdriver import WebDriver +from selenium.webdriver.remote.webelement import WebElement + +from SeleniumLibrary.base import LibraryComponent +from SeleniumLibrary.errors import NoOpenBrowser, PluginError +from SeleniumLibrary.keywords import ( + AlertKeywords, + BrowserManagementKeywords, + CookieKeywords, + ElementKeywords, + ExpectedConditionKeywords, + FormElementKeywords, + FrameKeywords, + JavaScriptKeywords, + RunOnFailureKeywords, + ScreenshotKeywords, + SelectElementKeywords, + TableElementKeywords, + WaitingKeywords, + WebDriverCache, + WindowKeywords, +) +from SeleniumLibrary.keywords.screenshot import EMBED +from SeleniumLibrary.locators import ElementFinder +from SeleniumLibrary.utils import LibraryListener, is_truthy, _convert_timeout, _convert_delay + + +__version__ = "6.7.1" + + +class SeleniumLibrary(DynamicCore): + """SeleniumLibrary is a web testing library for Robot Framework. + + This document explains how to use keywords provided by SeleniumLibrary. + For information about installation, support, and more, please visit the + [https://github.com/robotframework/SeleniumLibrary|project pages]. + For more information about Robot Framework, see http://robotframework.org. + + SeleniumLibrary uses the Selenium WebDriver modules internally to + control a web browser. See http://seleniumhq.org for more information + about Selenium in general and SeleniumLibrary README.rst + [https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter] + for more details about WebDriver binary installation. + + %TOC% + + = Locating elements = + + All keywords in SeleniumLibrary that need to interact with an element + on a web page take an argument typically named ``locator`` that specifies + how to find the element. Most often the locator is given as a string + using the locator syntax described below, but `using WebElements` is + possible too. + + == Locator syntax == + + SeleniumLibrary supports finding elements based on different strategies + such as the element id, XPath expressions, or CSS selectors. The strategy + can either be explicitly specified with a prefix or the strategy can be + implicit. + + === Default locator strategy === + + By default, locators are considered to use the keyword specific default + locator strategy. All keywords support finding elements based on ``id`` + and ``name`` attributes, but some keywords support additional attributes + or other values that make sense in their context. For example, `Click + Link` supports the ``href`` attribute and the link text and addition + to the normal ``id`` and ``name``. + + Examples: + + | `Click Element` | example | # Match based on ``id`` or ``name``. | + | `Click Link` | example | # Match also based on link text and ``href``. | + | `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. | + + If a locator accidentally starts with a prefix recognized as `explicit + locator strategy` or `implicit XPath strategy`, it is possible to use + the explicit ``default`` prefix to enable the default strategy. + + Examples: + + | `Click Element` | name:foo | # Find element with name ``foo``. | + | `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. | + | `Click Element` | //foo | # Find element using XPath ``//foo``. | + | `Click Element` | default: //foo | # Use default strategy with value ``//foo``. | + + === Explicit locator strategy === + + The explicit locator strategy is specified with a prefix using either + syntax ``strategy:value`` or ``strategy=value``. The former syntax + is preferred because the latter is identical to Robot Framework's + [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax| + named argument syntax] and that can cause problems. Spaces around + the separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo`` + are all equivalent. + + Locator strategies that are supported by default are listed in the table + below. In addition to them, it is possible to register `custom locators`. + + | = Strategy = | = Match based on = | = Example = | + | id | Element ``id``. | ``id:example`` | + | name | ``name`` attribute. | ``name:example`` | + | identifier | Either ``id`` or ``name``. | ``identifier:example`` | + | class | Element ``class``. | ``class:example`` | + | tag | Tag name. | ``tag:div`` | + | xpath | XPath expression. | ``xpath://div[@id="example"]`` | + | css | CSS selector. | ``css:div#example`` | + | dom | DOM expression. | ``dom:document.images[5]`` | + | link | Exact text a link has. | ``link:The example`` | + | partial link | Partial link text. | ``partial link:he ex`` | + | sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` | + | data | Element ``data-*`` attribute | ``data:id:my_id`` | + | jquery | jQuery expression. | ``jquery:div.example`` | + | default | Keyword specific default behavior. | ``default:example`` | + + See the `Default locator strategy` section below for more information + about how the default strategy works. Using the explicit ``default`` + prefix is only necessary if the locator value itself accidentally + matches some of the explicit strategies. + + Different locator strategies have different pros and cons. Using ids, + either explicitly like ``id:foo`` or by using the `default locator + strategy` simply like ``foo``, is recommended when possible, because + the syntax is simple and locating elements by id is fast for browsers. + If an element does not have an id or the id is not stable, other + solutions need to be used. If an element has a unique tag name or class, + using ``tag``, ``class`` or ``css`` strategy like ``tag:h1``, + ``class:example`` or ``css:h1.example`` is often an easy solution. In + more complex cases using XPath expressions is typically the best + approach. They are very powerful but a downside is that they can also + get complex. + + Examples: + + | `Click Element` | id:foo | # Element with id 'foo'. | + | `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. | + | `Click Element` | xpath: //div[@id="foo"]//h1 | # Same as the above using XPath, not CSS. | + | `Click Element` | xpath: //*[contains(text(), "example")] | # Element containing text 'example'. | + + *NOTE:* + + - The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0 + and newer. + - Using the ``sizzle`` strategy or its alias ``jquery`` requires that + the system under test contains the jQuery library. + - Prior to SeleniumLibrary 3.0, table related keywords only supported + ``xpath``, ``css`` and ``sizzle/jquery`` strategies. + - ``data`` strategy is conveniance locator that will construct xpath from the parameters. + If you have element like `
`, you locate the element via + ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0 + + === Implicit XPath strategy === + + If the locator starts with ``//`` or multiple opening parenthesis in front + of the ``//``, the locator is considered to be an XPath expression. In other + words, using ``//div`` is equivalent to using explicit ``xpath://div`` and + ``((//div))`` is equivalent to using explicit ``xpath:((//div))`` + + Examples: + + | `Click Element` | //div[@id="foo"]//h1 | + | `Click Element` | (//div)[2] | + + The support for the ``(//`` prefix is new in SeleniumLibrary 3.0. + Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0. + + === Chaining locators === + + It is possible chain multiple locators together as single locator. Each chained locator must start with locator + strategy. Chained locators must be separated with single space, two greater than characters and followed with + space. It is also possible mix different locator strategies, example css or xpath. Also a list can also be + used to specify multiple locators. This is useful, is some part of locator would match as the locator separator + but it should not. Or if there is need to existing WebElement as locator. + + Although all locators support chaining, some locator strategies do not abey the chaining. This is because + some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context + and not for the element found be the previous locator. Chaining is supported by locator strategies which + are based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery + + Examples: + | `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class "bar" | + + List examples: + | ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), " >> "] | + | `Page Should Contain Element` | ${locator_list} | | | + | ${element} = | Get WebElement | xpath://*[text(), " >> "] | | + | ${locator_list} = | `Create List` | css:div#div_id | ${element} | + | `Page Should Contain Element` | ${locator_list} | | | + + Chaining locators in new in SeleniumLibrary 5.0 + + == Using WebElements == + + In addition to specifying a locator as a string, it is possible to use + Selenium's WebElement objects. This requires first getting a WebElement, + for example, by using the `Get WebElement` keyword. + + | ${elem} = | `Get WebElement` | id:example | + | `Click Element` | ${elem} | | + + == Custom locators == + + If more complex lookups are required than what is provided through the + default locators, custom lookup strategies can be created. Using custom + locators is a two part process. First, create a keyword that returns + a WebElement that should be acted on: + + | Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} | + | | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); | + | | RETURN | ${element} | + + This keyword is a reimplementation of the basic functionality of the + ``id`` locator where ``${browser}`` is a reference to a WebDriver + instance and ``${locator}`` is the name of the locator strategy. To use + this locator, it must first be registered by using the + `Add Location Strategy` keyword: + + | `Add Location Strategy` | custom | Custom Locator Strategy | + + The first argument of `Add Location Strategy` specifies the name of + the strategy and it must be unique. After registering the strategy, + the usage is the same as with other locators: + + | `Click Element` | custom:example | + + See the `Add Location Strategy` keyword for more details. + + = Browser and Window = + + There is different conceptual meaning when SeleniumLibrary talks + about windows or browsers. This chapter explains those differences. + + == Browser == + + When `Open Browser` or `Create WebDriver` keyword is called, it + will create a new Selenium WebDriver instance by using the + [https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver] + API. In SeleniumLibrary terms, a new browser is created. It is + possible to start multiple independent browsers (Selenium Webdriver + instances) at the same time, by calling `Open Browser` or + `Create WebDriver` multiple times. These browsers are usually + independent of each other and do not share data like cookies, + sessions or profiles. Typically when the browser starts, it + creates a single window which is shown to the user. + + == Window == + + Windows are the part of a browser that loads the web site and presents + it to the user. All content of the site is the content of the window. + Windows are children of a browser. In SeleniumLibrary browser is a + synonym for WebDriver instance. One browser may have multiple + windows. Windows can appear as tabs, as separate windows or pop-ups with + different position and size. Windows belonging to the same browser + typically share the sessions detail, like cookies. If there is a + need to separate sessions detail, example login with two different + users, two browsers (Selenium WebDriver instances) must be created. + New windows can be opened example by the application under test or + by example `Execute Javascript` keyword: + + | `Execute Javascript` window.open() # Opens a new window with location about:blank + + The example below opens multiple browsers and windows, + to demonstrate how the different keywords can be used to interact + with browsers, and windows attached to these browsers. + + Structure: + | BrowserA + | Window 1 (location=https://robotframework.org/) + | Window 2 (location=https://robocon.io/) + | Window 3 (location=https://github.com/robotframework/) + | + | BrowserB + | Window 1 (location=https://github.com/) + + Example: + | `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. | + | `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. | + | `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA | + | `Go To` | https://robocon.io | | | # Second window navigates to robocon site. | + | `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. | + | ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA | + | `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. | + | `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. | + | ${location} | `Get Location` | | | # ${location} is: https://www.github.com | + | `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. | + | ${location} | `Get Location` | | | # ${location} = https://robocon.io/ | + | @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). | + | @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. | + + The above example, @{locations 1} contains the following items: + https://robotframework.org/, https://robocon.io/ and + https://github.com/robotframework/'. The @{locations 2} + contains the following items: https://robotframework.org/, + https://robocon.io/, https://github.com/robotframework/' + and 'https://github.com/. + + = Browser and Driver options and service class = + + This section talks about how to configure either the browser or + the driver using the options and service arguments of the `Open + Browser` keyword. + + == Configuring the browser using the Selenium Options == + + As noted within the keyword documentation for `Open Browser`, its + ``options`` argument accepts Selenium options in two different + formats: as a string and as Python object which is an instance of + the Selenium options class. + + === Options string format === + + The string format allows defining Selenium options methods + or attributes and their arguments in Robot Framework test data. + The method and attributes names are case and space sensitive and + must match to the Selenium options methods and attributes names. + When defining a method, it must be defined in a similar way as in + python: method name, opening parenthesis, zero to many arguments + and closing parenthesis. If there is a need to define multiple + arguments for a single method, arguments must be separated with + comma, just like in Python. Example: `add_argument("--headless")` + or `add_experimental_option("key", "value")`. Attributes are + defined in a similar way as in Python: attribute name, equal sign, + and attribute value. Example, `headless=True`. Multiple methods + and attributes must be separated by a semicolon. Example: + `add_argument("--headless");add_argument("--start-maximized")`. + + Arguments allow defining Python data types and arguments are + evaluated by using Python + [https://docs.python.org/3/library/ast.html#ast.literal_eval|ast.literal_eval]. + Strings must be quoted with single or double quotes, example "value" + or 'value'. It is also possible to define other Python builtin + data types, example `True` or `None`, by not using quotes + around the arguments. + + The string format is space friendly. Usually, spaces do not alter + the defining methods or attributes. There are two exceptions. + In some Robot Framework test data formats, two or more spaces are + considered as cell separator and instead of defining a single + argument, two or more arguments may be defined. Spaces in string + arguments are not removed and are left as is. Example + `add_argument ( "--headless" )` is same as + `add_argument("--headless")`. But `add_argument(" --headless ")` is + not same same as `add_argument ( "--headless" )`, because + spaces inside of quotes are not removed. Please note that if + options string contains backslash, example a Windows OS path, + the backslash needs escaping both in Robot Framework data and + in Python side. This means single backslash must be writen using + four backslash characters. Example, Windows path: + "C:\\path\\to\\profile" must be written as + "C:\\\\\\\\path\\\\\\to\\\\\\\\profile". Another way to write + backslash is use Python + [https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals|raw strings] + and example write: r"C:\\\\path\\\\to\\\\profile". + + === Selenium Options as Python class === + + As last format, ``options`` argument also supports receiving + the Selenium options as Python class instance. In this case, the + instance is used as-is and the SeleniumLibrary will not convert + the instance to other formats. + For example, if the following code return value is saved to + `${options}` variable in the Robot Framework data: + | options = webdriver.ChromeOptions() + | options.add_argument('--disable-dev-shm-usage') + | return options + + Then the `${options}` variable can be used as an argument to + ``options``. + + Example the ``options`` argument can be used to launch Chomium-based + applications which utilize the + [https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver|Chromium Embedded Framework] + . To launch Chromium-based application, use ``options`` to define + `binary_location` attribute and use `add_argument` method to define + `remote-debugging-port` port for the application. Once the browser + is opened, the test can interact with the embedded web-content of + the system under test. + + == Configuring the driver using the Service class == + + With the ``service`` argument, one can setup and configure the driver. For example + one can set the driver location and/port or specify the command line arguments. There + are several browser specific attributes related to logging as well. For the various + Service Class attributes refer to + [https://www.selenium.dev/documentation/webdriver/drivers/service/|the Selenium documentation] + . Currently the ``service`` argument only accepts Selenium service in the string format. + + === Service string format === + + The string format allows for defining Selenium service attributes + and their values in the `Open Browser` keyword. The attributes names + are case and space sensitive and must match to the Selenium attributes + names. Attributes are defined in a similar way as in Python: attribute + name, equal sign, and attribute value. Example, `port=1234`. Multiple + attributes must be separated by a semicolon. Example: + `executable_path='/path/to/driver';port=1234`. Don't have duplicate + attributes, like `service_args=['--append-log', '--readable-timestamp']; + service_args=['--log-level=DEBUG']` as the second will override the first. + Instead combine them as in + `service_args=['--append-log', '--readable-timestamp', '--log-level=DEBUG']` + + Arguments allow defining Python data types and arguments are + evaluated by using Python. Strings must be quoted with single + or double quotes, example "value" or 'value' + + = Timeouts, waits, and delays = + + This section discusses different ways how to wait for elements to + appear on web pages and to slow down execution speed otherwise. + It also explains the `time format` that can be used when setting various + timeouts, waits, and delays. + + == Timeout == + + SeleniumLibrary contains various keywords that have an optional + ``timeout`` argument that specifies how long these keywords should + wait for certain events or actions. These keywords include, for example, + ``Wait ...`` keywords and keywords related to alerts. Additionally + `Execute Async Javascript`. Although it does not have ``timeout``, + argument, uses a timeout to define how long asynchronous JavaScript + can run. + + The default timeout these keywords use can be set globally either by + using the `Set Selenium Timeout` keyword or with the ``timeout`` argument + when `importing` the library. If no default timeout is set globally, the + default is 5 seconds. If None is specified for the timeout argument in the + keywords, the default is used. See `time format` below for supported + timeout syntax. + + == Implicit wait == + + Implicit wait specifies the maximum time how long Selenium waits when + searching for elements. It can be set by using the `Set Selenium Implicit + Wait` keyword or with the ``implicit_wait`` argument when `importing` + the library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp| + Selenium documentation] for more information about this functionality. + + See `time format` below for supported syntax. + + == Page load == + Page load timeout is the amount of time to wait for page load to complete + until a timeout exception is raised. + + The default page load timeout can be set globally + when `importing` the library with the ``page_load_timeout`` argument + or by using the `Set Selenium Page Load Timeout` keyword. + + See `time format` below for supported timeout syntax. + + Support for page load is new in SeleniumLibrary 6.1 + + == Selenium speed == + + Selenium execution speed can be slowed down globally by using `Set + Selenium speed` keyword. This functionality is designed to be used for + demonstrating or debugging purposes. Using it to make sure that elements + appear on a page is not a good idea. The above-explained timeouts + and waits should be used instead. + + See `time format` below for supported syntax. + + == Time format == + + All timeouts and waits can be given as numbers considered seconds + (e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax + (e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about + the time syntax see the + [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide]. + + = Run-on-failure functionality = + + SeleniumLibrary has a handy feature that it can automatically execute + a keyword if any of its own keywords fails. By default, it uses the + `Capture Page Screenshot` keyword, but this can be changed either by + using the `Register Keyword To Run On Failure` keyword or with the + ``run_on_failure`` argument when `importing` the library. It is + possible to use any keyword from any imported library or resource file. + + The run-on-failure functionality can be disabled by using a special value + ``NOTHING`` or anything considered false (see `Boolean arguments`) + such as ``NONE``. + + = Boolean arguments = + + Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the + boolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint]. + More details in Robot Framework + [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide] + + Please note SeleniumLibrary 3 and 4 did have own custom methods to covert + arguments to boolean values. + + = EventFiringWebDriver = + + The SeleniumLibrary offers support for + [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver]. + See the Selenium and SeleniumLibrary + [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support] + documentation for further details. + + EventFiringWebDriver is new in SeleniumLibrary 4.0 + + = Thread support = + + SeleniumLibrary is not thread-safe. This is mainly due because the underlying + [https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe| + Selenium tool is not thread-safe] within one browser/driver instance. + Because of the limitation in the Selenium side, the keywords or the + API provided by the SeleniumLibrary is not thread-safe. + + = Plugins = + + SeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal + functionality without creating a new library or hacking the source code. See + [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API] + documentation for further details. + + Plugin API is new SeleniumLibrary 4.0 + + = Language = + + SeleniumLibrary offers the possibility to translate keyword names and documentation to new language. If language + is defined, SeleniumLibrary will search from + [https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path | module search path] + for Python packages starting with `robotframework-seleniumlibrary-translation` by using the + [https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/ | Python pluging API]. The Library + is using naming convention to find Python plugins. + + The package must implement a single API call, ``get_language`` without any arguments. The method must return a + dictionary containing two keys: ``language`` and ``path``. The language key value defines which language + the package contains. Also the value should match (case insensitive) the library ``language`` import parameter. + The path parameter value should be full path to the translation file. + + == Translation file == + + The file name or extension is not important, but data must be in [https://www.json.org/json-en.html | json] + format. The keys of json are the methods names, not the keyword names, which implements keywords. Value of + key is json object which contains two keys: ``name`` and ``doc``. The ``name`` key contains the keyword + translated name and `doc` contains translated documentation. Providing doc and name are optional, example + translation json file can only provide translations to keyword names or only to documentation. But it is + always recommended to provide translation to both name and doc. Special key ``__intro__`` is for class level + documentation and ``__init__`` is for init level documentation. These special values ``name`` can not be + translated, instead ``name`` should be kept the same. + + == Generating template translation file == + + Template translation file, with English language can be created by running: + `rfselib translation /path/to/translation.json` command. Command does not provide translations to other + languages, it only provides easy way to create full list keywords and their documentation in correct + format. It is also possible to add keywords from library plugins by providing `--plugins` arguments + to command. Example: `rfselib translation --plugins myplugin.SomePlugin /path/to/translation.json` The + generated json file contains `sha256` key, which contains the sha256 sum of the library documentation. + The sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares + the translation to the library and prints outs a table which tells if there are changes needed for + the translation file. + + Example project for translation can be found from + [https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi] + repository. + """ + + ROBOT_LIBRARY_SCOPE = "GLOBAL" + ROBOT_LIBRARY_VERSION = __version__ + + def __init__( + self, + timeout=timedelta(seconds=5), + implicit_wait=timedelta(seconds=0), + run_on_failure="Capture Page Screenshot", + screenshot_root_directory: Optional[str] = None, + plugins: Optional[str] = None, + event_firing_webdriver: Optional[str] = None, + page_load_timeout=timedelta(minutes=5), + action_chain_delay=timedelta(seconds=0.25), + language: Optional[str] = None, + ): + """SeleniumLibrary can be imported with several optional arguments. + + - ``timeout``: + Default value for `timeouts` used with ``Wait ...`` keywords. + - ``implicit_wait``: + Default value for `implicit wait` used when locating elements. + - ``run_on_failure``: + Default action for the `run-on-failure functionality`. + - ``screenshot_root_directory``: + Path to folder where possible screenshots are created or EMBED. + See `Set Screenshot Directory` keyword for further details about EMBED. + If not given, the directory where the log file is written is used. + - ``plugins``: + Allows extending the SeleniumLibrary with external Python classes. + - ``event_firing_webdriver``: + Class for wrapping Selenium with + [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver] + - ``page_load_timeout``: + Default value to wait for page load to complete until a timeout exception is raised. + - ``action_chain_delay``: + Default value for `ActionChains` delay to wait in between actions. + - ``language``: + Defines language which is used to translate keyword names and documentation. + """ + self.timeout = _convert_timeout(timeout) + self.implicit_wait = _convert_timeout(implicit_wait) + self.action_chain_delay = _convert_delay(action_chain_delay) + self.page_load_timeout = _convert_timeout(page_load_timeout) + self.speed = 0.0 + self.run_on_failure_keyword = RunOnFailureKeywords.resolve_keyword( + run_on_failure + ) + self._running_on_failure_keyword = False + self.screenshot_root_directory = screenshot_root_directory + self._resolve_screenshot_root_directory() + self._element_finder = ElementFinder(self) + self._plugin_keywords = [] + libraries = [ + AlertKeywords(self), + BrowserManagementKeywords(self), + CookieKeywords(self), + ElementKeywords(self), + ExpectedConditionKeywords(self), + FormElementKeywords(self), + FrameKeywords(self), + JavaScriptKeywords(self), + RunOnFailureKeywords(self), + ScreenshotKeywords(self), + SelectElementKeywords(self), + TableElementKeywords(self), + WaitingKeywords(self), + WindowKeywords(self), + ] + self.ROBOT_LIBRARY_LISTENER = LibraryListener() + self._running_keyword = None + self.event_firing_webdriver = None + if is_truthy(event_firing_webdriver): + self.event_firing_webdriver = self._parse_listener(event_firing_webdriver) + self._plugins = [] + if is_truthy(plugins): + plugin_libs = self._parse_plugins(plugins) + self._plugins = plugin_libs + libraries = libraries + plugin_libs + self._drivers = WebDriverCache() + translation_file = self._get_translation(language) + DynamicCore.__init__(self, libraries, translation_file) + + def run_keyword(self, name: str, args: tuple, kwargs: dict): + try: + return DynamicCore.run_keyword(self, name, args, kwargs) + except Exception: + self.failure_occurred() + raise + + def get_keyword_tags(self, name: str) -> list: + tags = list(DynamicCore.get_keyword_tags(self, name)) + if name in self._plugin_keywords: + tags.append("plugin") + return tags + + def get_keyword_documentation(self, name: str) -> str: + if name == "__intro__": + return self._get_intro_documentation() + return DynamicCore.get_keyword_documentation(self, name) + + def _parse_plugin_doc(self): + Doc = namedtuple("Doc", "doc, name") + for plugin in self._plugins: + yield Doc( + doc=getdoc(plugin) or "No plugin documentation found.", + name=plugin.__class__.__name__, + ) + + def _get_intro_documentation(self): + intro = DynamicCore.get_keyword_documentation(self, "__intro__") + for plugin_doc in self._parse_plugin_doc(): + intro = f"{intro}\n\n" + intro = f"{intro}= Plugin: {plugin_doc.name} =\n\n" + intro = f"{intro}{plugin_doc.doc}" + return intro + + def register_driver(self, driver: WebDriver, alias: str): + """Add's a `driver` to the library WebDriverCache. + + :param driver: Instance of the Selenium `WebDriver`. + :type driver: selenium.webdriver.remote.webdriver.WebDriver + :param alias: Alias given for this `WebDriver` instance. + :type alias: str + :return: The index of the `WebDriver` instance. + :rtype: int + """ + return self._drivers.register(driver, alias) + + def failure_occurred(self): + """Method that is executed when a SeleniumLibrary keyword fails. + + By default, executes the registered run-on-failure keyword. + Libraries extending SeleniumLibrary can overwrite this hook + method if they want to provide custom functionality instead. + """ + if self._running_on_failure_keyword or not self.run_on_failure_keyword: + return + try: + self._running_on_failure_keyword = True + if self.run_on_failure_keyword.lower() == "capture page screenshot": + self.capture_page_screenshot() + else: + BuiltIn().run_keyword(self.run_on_failure_keyword) + except Exception as err: + logger.warn( + f"Keyword '{self.run_on_failure_keyword}' could not be run on failure: {err}" + ) + finally: + self._running_on_failure_keyword = False + + @property + def driver(self) -> WebDriver: + """Current active driver. + + :rtype: selenium.webdriver.remote.webdriver.WebDriver + :raises SeleniumLibrary.errors.NoOpenBrowser: If browser is not open. + """ + if not self._drivers.current: + raise NoOpenBrowser("No browser is open.") + return self._drivers.current + + def find_element( + self, locator: str, parent: Optional[WebElement] = None + ) -> WebElement: + """Find element matching `locator`. + + :param locator: Locator to use when searching the element. + See library documentation for the supported locator syntax. + :type locator: str or selenium.webdriver.remote.webelement.WebElement + :param parent: Optional parent `WebElememt` to search child elements + from. By default, search starts from the root using `WebDriver`. + :type parent: selenium.webdriver.remote.webelement.WebElement + :return: Found `WebElement`. + :rtype: selenium.webdriver.remote.webelement.WebElement + :raises SeleniumLibrary.errors.ElementNotFound: If element not found. + """ + return self._element_finder.find(locator, parent=parent) + + def find_elements( + self, locator: str, parent: WebElement = None + ) -> List[WebElement]: + """Find all elements matching `locator`. + + :param locator: Locator to use when searching the element. + See library documentation for the supported locator syntax. + :type locator: str or selenium.webdriver.remote.webelement.WebElement + :param parent: Optional parent `WebElememt` to search child elements + from. By default, search starts from the root using `WebDriver`. + :type parent: selenium.webdriver.remote.webelement.WebElement + :return: list of found `WebElement` or e,mpty if elements are not found. + :rtype: list[selenium.webdriver.remote.webelement.WebElement] + """ + return self._element_finder.find( + locator, first_only=False, required=False, parent=parent + ) + + def _parse_plugins(self, plugins): + libraries = [] + importer = Importer("test library") + for parsed_plugin in self._string_to_modules(plugins): + plugin = importer.import_class_or_module(parsed_plugin.module) + if not isclass(plugin): + message = f"Importing test library: '{parsed_plugin.module}' failed." + raise DataError(message) + plugin = plugin(self, *parsed_plugin.args, **parsed_plugin.kw_args) + if not isinstance(plugin, LibraryComponent): + message = ( + "Plugin does not inherit SeleniumLibrary.base.LibraryComponent" + ) + raise PluginError(message) + self._store_plugin_keywords(plugin) + libraries.append(plugin) + return libraries + + def _parse_listener(self, event_firing_webdriver): + listener_module = self._string_to_modules(event_firing_webdriver) + listener_count = len(listener_module) + if listener_count > 1: + message = f"Is is possible import only one listener but there was {listener_count} listeners." + raise ValueError(message) + listener_module = listener_module[0] + importer = Importer("test library") + listener = importer.import_class_or_module(listener_module.module) + if not isclass(listener): + message = f"Importing test Selenium lister class '{listener_module.module}' failed." + raise DataError(message) + return listener + + def _string_to_modules(self, modules): + Module = namedtuple("Module", "module, args, kw_args") + parsed_modules = [] + for module in modules.split(","): + module = module.strip() + module_and_args = module.split(";") + module_name = module_and_args.pop(0) + kw_args = {} + args = [] + for argument in module_and_args: + if "=" in argument: + key, value = argument.split("=") + kw_args[key] = value + else: + args.append(argument) + module = Module(module=module_name, args=args, kw_args=kw_args) + parsed_modules.append(module) + return parsed_modules + + def _store_plugin_keywords(self, plugin): + dynamic_core = DynamicCore([plugin]) + self._plugin_keywords.extend(dynamic_core.get_keyword_names()) + + def _resolve_screenshot_root_directory(self): + screenshot_root_directory = self.screenshot_root_directory + if is_string(screenshot_root_directory): + if screenshot_root_directory.upper() == EMBED: + self.screenshot_root_directory = EMBED + + @staticmethod + def _get_translation(language: Union[str, None]) -> Union[Path, None]: + if not language: + return None + discovered_plugins = { + name: importlib.import_module(name) + for _, name, _ in pkgutil.iter_modules() + if name.startswith("robotframework_seleniumlibrary_translation") + } + lang = language.lower() + for plugin in discovered_plugins.values(): + try: + data = plugin.get_language() + except AttributeError: + continue + if ( + isinstance(data, dict) + and data.get("language", "").lower() == lang + and data.get("path") + ): + return Path(data.get("path")).absolute() + if isinstance(data, list): + for item in data: + if item.get("language", "").lower() == lang and item.get("path"): + return Path(item.get("path")).absolute() + return None diff --git a/src/SeleniumLibrary/__init__.pyi b/src/SeleniumLibrary/__init__.pyi index 5e5ec005e..45998d55a 100644 --- a/src/SeleniumLibrary/__init__.pyi +++ b/src/SeleniumLibrary/__init__.pyi @@ -1,212 +1,213 @@ -from datetime import timedelta -from typing import Any, Optional, Union - -import selenium -from selenium.webdriver.remote.webdriver import WebDriver -from selenium.webdriver.remote.webelement import WebElement - -class SeleniumLibrary: - def __init__(self, timeout = timedelta(seconds=5.0), implicit_wait = timedelta(seconds=0.0), run_on_failure = 'Capture Page Screenshot', screenshot_root_directory: Optional[Optional] = None, plugins: Optional[Optional] = None, event_firing_webdriver: Optional[Optional] = None, page_load_timeout = timedelta(seconds=300.0), action_chain_delay = timedelta(seconds=0.25)): ... - def add_cookie(self, name: str, value: str, path: Optional[Optional] = None, domain: Optional[Optional] = None, secure: Optional[Optional] = None, expiry: Optional[Optional] = None): ... - def add_location_strategy(self, strategy_name: str, strategy_keyword: str, persist: bool = False): ... - def alert_should_be_present(self, text: str = '', action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... - def alert_should_not_be_present(self, action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... - def assign_id_to_element(self, locator: Union, id: str): ... - def capture_element_screenshot(self, locator: Union, filename: str = 'selenium-element-screenshot-{index}.png'): ... - def capture_page_screenshot(self, filename: str = 'selenium-screenshot-{index}.png'): ... - def checkbox_should_be_selected(self, locator: Union): ... - def checkbox_should_not_be_selected(self, locator: Union): ... - def choose_file(self, locator: Union, file_path: str): ... - def clear_element_text(self, locator: Union): ... - def click_button(self, locator: Union, modifier: Union = False): ... - def click_element(self, locator: Union, modifier: Union = False, action_chain: bool = False): ... - def click_element_at_coordinates(self, locator: Union, xoffset: int, yoffset: int): ... - def click_image(self, locator: Union, modifier: Union = False): ... - def click_link(self, locator: Union, modifier: Union = False): ... - def close_all_browsers(self): ... - def close_browser(self): ... - def close_window(self): ... - def cover_element(self, locator: Union): ... - def create_webdriver(self, driver_name: str, alias: Optional[Optional] = None, kwargs: Optional[Optional] = None, **init_kwargs): ... - def current_frame_should_contain(self, text: str, loglevel: str = 'TRACE'): ... - def current_frame_should_not_contain(self, text: str, loglevel: str = 'TRACE'): ... - def delete_all_cookies(self): ... - def delete_cookie(self, name): ... - def double_click_element(self, locator: Union): ... - def drag_and_drop(self, locator: Union, target: Union): ... - def drag_and_drop_by_offset(self, locator: Union, xoffset: int, yoffset: int): ... - def element_attribute_value_should_be(self, locator: Union, attribute: str, expected: Optional, message: Optional[Optional] = None): ... - def element_should_be_disabled(self, locator: Union): ... - def element_should_be_enabled(self, locator: Union): ... - def element_should_be_focused(self, locator: Union): ... - def element_should_be_visible(self, locator: Union, message: Optional[Optional] = None): ... - def element_should_contain(self, locator: Union, expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... - def element_should_not_be_visible(self, locator: Union, message: Optional[Optional] = None): ... - def element_should_not_contain(self, locator: Union, expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... - def element_text_should_be(self, locator: Union, expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... - def element_text_should_not_be(self, locator: Union, not_expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... - def execute_async_javascript(self, *code: Any): ... - def execute_javascript(self, *code: Any): ... - def frame_should_contain(self, locator: Union, text: str, loglevel: str = 'TRACE'): ... - def get_action_chain_delay(self): ... - def get_all_links(self): ... - def get_browser_aliases(self): ... - def get_browser_ids(self): ... - def get_cookie(self, name: str): ... - def get_cookies(self, as_dict: bool = False): ... - def get_dom_attribute(self, locator: Union, attribute: str): ... - def get_element_attribute(self, locator: Union, attribute: str): ... - def get_element_count(self, locator: Union): ... - def get_element_size(self, locator: Union): ... - def get_horizontal_position(self, locator: Union): ... - def get_list_items(self, locator: Union, values: bool = False): ... - def get_location(self): ... - def get_locations(self, browser: str = 'CURRENT'): ... - def get_property(self, locator: Union, property: str): ... - def get_selected_list_label(self, locator: Union): ... - def get_selected_list_labels(self, locator: Union): ... - def get_selected_list_value(self, locator: Union): ... - def get_selected_list_values(self, locator: Union): ... - def get_selenium_implicit_wait(self): ... - def get_selenium_page_load_timeout(self): ... - def get_selenium_speed(self): ... - def get_selenium_timeout(self): ... - def get_session_id(self): ... - def get_source(self): ... - def get_table_cell(self, locator: Union, row: int, column: int, loglevel: str = 'TRACE'): ... - def get_text(self, locator: Union): ... - def get_title(self): ... - def get_value(self, locator: Union): ... - def get_vertical_position(self, locator: Union): ... - def get_webelement(self, locator: Union): ... - def get_webelements(self, locator: Union): ... - def get_window_handles(self, browser: str = 'CURRENT'): ... - def get_window_identifiers(self, browser: str = 'CURRENT'): ... - def get_window_names(self, browser: str = 'CURRENT'): ... - def get_window_position(self): ... - def get_window_size(self, inner: bool = False): ... - def get_window_titles(self, browser: str = 'CURRENT'): ... - def go_back(self): ... - def go_to(self, url): ... - def handle_alert(self, action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... - def input_password(self, locator: Union, password: str, clear: bool = True): ... - def input_text(self, locator: Union, text: str, clear: bool = True): ... - def input_text_into_alert(self, text: str, action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... - def list_selection_should_be(self, locator: Union, *expected: str): ... - def list_should_have_no_selections(self, locator: Union): ... - def location_should_be(self, url: str, message: Optional[Optional] = None): ... - def location_should_contain(self, expected: str, message: Optional[Optional] = None): ... - def log_location(self): ... - def log_source(self, loglevel: str = 'INFO'): ... - def log_title(self): ... - def maximize_browser_window(self): ... - def minimize_browser_window(self): ... - def mouse_down(self, locator: Union): ... - def mouse_down_on_image(self, locator: Union): ... - def mouse_down_on_link(self, locator: Union): ... - def mouse_out(self, locator: Union): ... - def mouse_over(self, locator: Union): ... - def mouse_up(self, locator: Union): ... - def open_browser(self, url: Optional[Optional] = None, browser: str = 'firefox', alias: Optional[Optional] = None, remote_url: Union = False, desired_capabilities: Optional[Union] = None, ff_profile_dir: Optional[Union] = None, options: Optional[Any] = None, service_log_path: Optional[Optional] = None, executable_path: Optional[Optional] = None): ... - def open_context_menu(self, locator: Union): ... - def page_should_contain(self, text: str, loglevel: str = 'TRACE'): ... - def page_should_contain_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_contain_checkbox(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_contain_element(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE', limit: Optional[Optional] = None): ... - def page_should_contain_image(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_contain_link(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_contain_list(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_contain_radio_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_contain_textfield(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain(self, text: str, loglevel: str = 'TRACE'): ... - def page_should_not_contain_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_checkbox(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_element(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_image(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_link(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_list(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_radio_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def page_should_not_contain_textfield(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... - def press_key(self, locator: Union, key: str): ... - def press_keys(self, locator: Optional[Union] = None, *keys: str): ... - def radio_button_should_be_set_to(self, group_name: str, value: str): ... - def radio_button_should_not_be_selected(self, group_name: str): ... - def register_keyword_to_run_on_failure(self, keyword: Optional): ... - def reload_page(self): ... - def remove_location_strategy(self, strategy_name: str): ... - def scroll_element_into_view(self, locator: Union): ... - def select_all_from_list(self, locator: Union): ... - def select_checkbox(self, locator: Union): ... - def select_frame(self, locator: Union): ... - def select_from_list_by_index(self, locator: Union, *indexes: str): ... - def select_from_list_by_label(self, locator: Union, *labels: str): ... - def select_from_list_by_value(self, locator: Union, *values: str): ... - def select_radio_button(self, group_name: str, value: str): ... - def set_action_chain_delay(self, value: timedelta): ... - def set_browser_implicit_wait(self, value: timedelta): ... - def set_focus_to_element(self, locator: Union): ... - def set_screenshot_directory(self, path: Optional): ... - def set_selenium_implicit_wait(self, value: timedelta): ... - def set_selenium_page_load_timeout(self, value: timedelta): ... - def set_selenium_speed(self, value: timedelta): ... - def set_selenium_timeout(self, value: timedelta): ... - def set_window_position(self, x: int, y: int): ... - def set_window_size(self, width: int, height: int, inner: bool = False): ... - def simulate_event(self, locator: Union, event: str): ... - def submit_form(self, locator: Optional[Union] = None): ... - def switch_browser(self, index_or_alias: str): ... - def switch_window(self, locator: Union = MAIN, timeout: Optional[Optional] = None, browser: str = 'CURRENT'): ... - def table_cell_should_contain(self, locator: Union, row: int, column: int, expected: str, loglevel: str = 'TRACE'): ... - def table_column_should_contain(self, locator: Union, column: int, expected: str, loglevel: str = 'TRACE'): ... - def table_footer_should_contain(self, locator: Union, expected: str, loglevel: str = 'TRACE'): ... - def table_header_should_contain(self, locator: Union, expected: str, loglevel: str = 'TRACE'): ... - def table_row_should_contain(self, locator: Union, row: int, expected: str, loglevel: str = 'TRACE'): ... - def table_should_contain(self, locator: Union, expected: str, loglevel: str = 'TRACE'): ... - def textarea_should_contain(self, locator: Union, expected: str, message: Optional[Optional] = None): ... - def textarea_value_should_be(self, locator: Union, expected: str, message: Optional[Optional] = None): ... - def textfield_should_contain(self, locator: Union, expected: str, message: Optional[Optional] = None): ... - def textfield_value_should_be(self, locator: Union, expected: str, message: Optional[Optional] = None): ... - def title_should_be(self, title: str, message: Optional[Optional] = None): ... - def unselect_all_from_list(self, locator: Union): ... - def unselect_checkbox(self, locator: Union): ... - def unselect_frame(self): ... - def unselect_from_list_by_index(self, locator: Union, *indexes: str): ... - def unselect_from_list_by_label(self, locator: Union, *labels: str): ... - def unselect_from_list_by_value(self, locator: Union, *values: str): ... - def wait_for_condition(self, condition: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_for_expected_condition(self, condition: string, *args, timeout: Optional = 10): ... - def wait_until_element_contains(self, locator: Union, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_element_does_not_contain(self, locator: Union, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_element_is_enabled(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_element_is_not_visible(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_element_is_visible(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_location_contains(self, expected: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... - def wait_until_location_does_not_contain(self, location: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... - def wait_until_location_is(self, expected: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... - def wait_until_location_is_not(self, location: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... - def wait_until_page_contains(self, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_page_contains_element(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None, limit: Optional[Optional] = None): ... - def wait_until_page_does_not_contain(self, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... - def wait_until_page_does_not_contain_element(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None, limit: Optional[Optional] = None): ... - # methods from library. - def add_library_components(self, library_components): ... - def get_keyword_names(self): ... - def run_keyword(self, name: str, args: tuple, kwargs: Optional[dict] = None): ... - def get_keyword_arguments(self, name: str): ... - def get_keyword_tags(self, name: str): ... - def get_keyword_documentation(self, name: str): ... - def get_keyword_types(self, name: str): ... - def get_keyword_source(self, keyword_name: str): ... - def failure_occurred(self): ... - def register_driver(self, driver: WebDriver, alias: str): ... - @property - def driver(self) -> WebDriver: ... - def find_element(self, locator: str, parent: Optional[WebElement] = None): ... - def find_elements(self, locator: str, parent: WebElement = None): ... - def _parse_plugins(self, plugins: Any): ... - def _parse_plugin_doc(self): ... - def _get_intro_documentation(self): ... - def _parse_listener(self, event_firing_webdriver: Any): ... - def _string_to_modules(self, modules: Any): ... - def _store_plugin_keywords(self, plugin): ... - def _resolve_screenshot_root_directory(self): ... +from datetime import timedelta +from typing import Any, Optional, Union + +import selenium +from selenium.webdriver.remote.webdriver import WebDriver +from selenium.webdriver.remote.webelement import WebElement + +class SeleniumLibrary: + def __init__(self, timeout = timedelta(seconds=5.0), implicit_wait = timedelta(seconds=0.0), run_on_failure = 'Capture Page Screenshot', screenshot_root_directory: Optional[Optional] = None, plugins: Optional[Optional] = None, event_firing_webdriver: Optional[Optional] = None, page_load_timeout = timedelta(seconds=300.0), action_chain_delay = timedelta(seconds=0.25), language: Optional[Optional] = None): ... + def add_cookie(self, name: str, value: str, path: Optional[Optional] = None, domain: Optional[Optional] = None, secure: Optional[Optional] = None, expiry: Optional[Optional] = None): ... + def add_location_strategy(self, strategy_name: str, strategy_keyword: str, persist: bool = False): ... + def alert_should_be_present(self, text: str = '', action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... + def alert_should_not_be_present(self, action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... + def assign_id_to_element(self, locator: Union, id: str): ... + def capture_element_screenshot(self, locator: Union, filename: str = 'selenium-element-screenshot-{index}.png'): ... + def capture_page_screenshot(self, filename: str = 'selenium-screenshot-{index}.png'): ... + def checkbox_should_be_selected(self, locator: Union): ... + def checkbox_should_not_be_selected(self, locator: Union): ... + def choose_file(self, locator: Union, file_path: str): ... + def clear_element_text(self, locator: Union): ... + def click_button(self, locator: Union, modifier: Union = False): ... + def click_element(self, locator: Union, modifier: Union = False, action_chain: bool = False): ... + def click_element_at_coordinates(self, locator: Union, xoffset: int, yoffset: int): ... + def click_image(self, locator: Union, modifier: Union = False): ... + def click_link(self, locator: Union, modifier: Union = False): ... + def close_all_browsers(self): ... + def close_browser(self): ... + def close_window(self): ... + def cover_element(self, locator: Union): ... + def create_webdriver(self, driver_name: str, alias: Optional[Optional] = None, kwargs: Optional[Optional] = None, **init_kwargs): ... + def current_frame_should_contain(self, text: str, loglevel: str = 'TRACE'): ... + def current_frame_should_not_contain(self, text: str, loglevel: str = 'TRACE'): ... + def delete_all_cookies(self): ... + def delete_cookie(self, name): ... + def double_click_element(self, locator: Union): ... + def drag_and_drop(self, locator: Union, target: Union): ... + def drag_and_drop_by_offset(self, locator: Union, xoffset: int, yoffset: int): ... + def element_attribute_value_should_be(self, locator: Union, attribute: str, expected: Optional, message: Optional[Optional] = None): ... + def element_should_be_disabled(self, locator: Union): ... + def element_should_be_enabled(self, locator: Union): ... + def element_should_be_focused(self, locator: Union): ... + def element_should_be_visible(self, locator: Union, message: Optional[Optional] = None): ... + def element_should_contain(self, locator: Union, expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... + def element_should_not_be_visible(self, locator: Union, message: Optional[Optional] = None): ... + def element_should_not_contain(self, locator: Union, expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... + def element_text_should_be(self, locator: Union, expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... + def element_text_should_not_be(self, locator: Union, not_expected: Optional, message: Optional[Optional] = None, ignore_case: bool = False): ... + def execute_async_javascript(self, *code: Any): ... + def execute_javascript(self, *code: Any): ... + def frame_should_contain(self, locator: Union, text: str, loglevel: str = 'TRACE'): ... + def get_action_chain_delay(self): ... + def get_all_links(self): ... + def get_browser_aliases(self): ... + def get_browser_ids(self): ... + def get_cookie(self, name: str): ... + def get_cookies(self, as_dict: bool = False): ... + def get_dom_attribute(self, locator: Union, attribute: str): ... + def get_element_attribute(self, locator: Union, attribute: str): ... + def get_element_count(self, locator: Union): ... + def get_element_size(self, locator: Union): ... + def get_horizontal_position(self, locator: Union): ... + def get_list_items(self, locator: Union, values: bool = False): ... + def get_location(self): ... + def get_locations(self, browser: str = 'CURRENT'): ... + def get_property(self, locator: Union, property: str): ... + def get_selected_list_label(self, locator: Union): ... + def get_selected_list_labels(self, locator: Union): ... + def get_selected_list_value(self, locator: Union): ... + def get_selected_list_values(self, locator: Union): ... + def get_selenium_implicit_wait(self): ... + def get_selenium_page_load_timeout(self): ... + def get_selenium_speed(self): ... + def get_selenium_timeout(self): ... + def get_session_id(self): ... + def get_source(self): ... + def get_table_cell(self, locator: Union, row: int, column: int, loglevel: str = 'TRACE'): ... + def get_text(self, locator: Union): ... + def get_title(self): ... + def get_value(self, locator: Union): ... + def get_vertical_position(self, locator: Union): ... + def get_webelement(self, locator: Union): ... + def get_webelements(self, locator: Union): ... + def get_window_handles(self, browser: str = 'CURRENT'): ... + def get_window_identifiers(self, browser: str = 'CURRENT'): ... + def get_window_names(self, browser: str = 'CURRENT'): ... + def get_window_position(self): ... + def get_window_size(self, inner: bool = False): ... + def get_window_titles(self, browser: str = 'CURRENT'): ... + def go_back(self): ... + def go_to(self, url): ... + def handle_alert(self, action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... + def input_password(self, locator: Union, password: str, clear: bool = True): ... + def input_text(self, locator: Union, text: str, clear: bool = True): ... + def input_text_into_alert(self, text: str, action: str = 'ACCEPT', timeout: Optional[Optional] = None): ... + def list_selection_should_be(self, locator: Union, *expected: str): ... + def list_should_have_no_selections(self, locator: Union): ... + def location_should_be(self, url: str, message: Optional[Optional] = None): ... + def location_should_contain(self, expected: str, message: Optional[Optional] = None): ... + def log_location(self): ... + def log_source(self, loglevel: str = 'INFO'): ... + def log_title(self): ... + def maximize_browser_window(self): ... + def minimize_browser_window(self): ... + def mouse_down(self, locator: Union): ... + def mouse_down_on_image(self, locator: Union): ... + def mouse_down_on_link(self, locator: Union): ... + def mouse_out(self, locator: Union): ... + def mouse_over(self, locator: Union): ... + def mouse_up(self, locator: Union): ... + def open_browser(self, url: Optional[Optional] = None, browser: str = 'firefox', alias: Optional[Optional] = None, remote_url: Union = False, desired_capabilities: Optional[Union] = None, ff_profile_dir: Optional[Union] = None, options: Optional[Any] = None, service_log_path: Optional[Optional] = None, executable_path: Optional[Optional] = None, service: Optional[Any] = None): ... + def open_context_menu(self, locator: Union): ... + def page_should_contain(self, text: str, loglevel: str = 'TRACE'): ... + def page_should_contain_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_contain_checkbox(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_contain_element(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE', limit: Optional[Optional] = None): ... + def page_should_contain_image(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_contain_link(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_contain_list(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_contain_radio_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_contain_textfield(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain(self, text: str, loglevel: str = 'TRACE'): ... + def page_should_not_contain_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_checkbox(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_element(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_image(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_link(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_list(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_radio_button(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def page_should_not_contain_textfield(self, locator: Union, message: Optional[Optional] = None, loglevel: str = 'TRACE'): ... + def press_key(self, locator: Union, key: str): ... + def press_keys(self, locator: Optional[Union] = None, *keys: str): ... + def print_page_as_pdf(self, filename: str = 'selenium-page-{index}.pdf', background: Optional[Optional] = None, margin_bottom: Optional[Optional] = None, margin_left: Optional[Optional] = None, margin_right: Optional[Optional] = None, margin_top: Optional[Optional] = None, orientation: Optional[Optional] = None, page_height: Optional[Optional] = None, page_ranges: Optional[Optional] = None, page_width: Optional[Optional] = None, scale: Optional[Optional] = None, shrink_to_fit: Optional[Optional] = None): ... + def radio_button_should_be_set_to(self, group_name: str, value: str): ... + def radio_button_should_not_be_selected(self, group_name: str): ... + def register_keyword_to_run_on_failure(self, keyword: Optional): ... + def reload_page(self): ... + def remove_location_strategy(self, strategy_name: str): ... + def scroll_element_into_view(self, locator: Union): ... + def select_all_from_list(self, locator: Union): ... + def select_checkbox(self, locator: Union): ... + def select_frame(self, locator: Union): ... + def select_from_list_by_index(self, locator: Union, *indexes: str): ... + def select_from_list_by_label(self, locator: Union, *labels: str): ... + def select_from_list_by_value(self, locator: Union, *values: str): ... + def select_radio_button(self, group_name: str, value: str): ... + def set_action_chain_delay(self, value: timedelta): ... + def set_browser_implicit_wait(self, value: timedelta): ... + def set_focus_to_element(self, locator: Union): ... + def set_screenshot_directory(self, path: Optional): ... + def set_selenium_implicit_wait(self, value: timedelta): ... + def set_selenium_page_load_timeout(self, value: timedelta): ... + def set_selenium_speed(self, value: timedelta): ... + def set_selenium_timeout(self, value: timedelta): ... + def set_window_position(self, x: int, y: int): ... + def set_window_size(self, width: int, height: int, inner: bool = False): ... + def simulate_event(self, locator: Union, event: str): ... + def submit_form(self, locator: Optional[Union] = None): ... + def switch_browser(self, index_or_alias: str): ... + def switch_window(self, locator: Union = MAIN, timeout: Optional[Optional] = None, browser: str = 'CURRENT'): ... + def table_cell_should_contain(self, locator: Union, row: int, column: int, expected: str, loglevel: str = 'TRACE'): ... + def table_column_should_contain(self, locator: Union, column: int, expected: str, loglevel: str = 'TRACE'): ... + def table_footer_should_contain(self, locator: Union, expected: str, loglevel: str = 'TRACE'): ... + def table_header_should_contain(self, locator: Union, expected: str, loglevel: str = 'TRACE'): ... + def table_row_should_contain(self, locator: Union, row: int, expected: str, loglevel: str = 'TRACE'): ... + def table_should_contain(self, locator: Union, expected: str, loglevel: str = 'TRACE'): ... + def textarea_should_contain(self, locator: Union, expected: str, message: Optional[Optional] = None): ... + def textarea_value_should_be(self, locator: Union, expected: str, message: Optional[Optional] = None): ... + def textfield_should_contain(self, locator: Union, expected: str, message: Optional[Optional] = None): ... + def textfield_value_should_be(self, locator: Union, expected: str, message: Optional[Optional] = None): ... + def title_should_be(self, title: str, message: Optional[Optional] = None): ... + def unselect_all_from_list(self, locator: Union): ... + def unselect_checkbox(self, locator: Union): ... + def unselect_frame(self): ... + def unselect_from_list_by_index(self, locator: Union, *indexes: str): ... + def unselect_from_list_by_label(self, locator: Union, *labels: str): ... + def unselect_from_list_by_value(self, locator: Union, *values: str): ... + def wait_for_condition(self, condition: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_for_expected_condition(self, condition: string, *args, timeout: Optional = 10): ... + def wait_until_element_contains(self, locator: Union, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_element_does_not_contain(self, locator: Union, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_element_is_enabled(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_element_is_not_visible(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_element_is_visible(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_location_contains(self, expected: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... + def wait_until_location_does_not_contain(self, location: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... + def wait_until_location_is(self, expected: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... + def wait_until_location_is_not(self, location: str, timeout: Optional[Optional] = None, message: Optional[Optional] = None): ... + def wait_until_page_contains(self, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_page_contains_element(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None, limit: Optional[Optional] = None): ... + def wait_until_page_does_not_contain(self, text: str, timeout: Optional[Optional] = None, error: Optional[Optional] = None): ... + def wait_until_page_does_not_contain_element(self, locator: Union, timeout: Optional[Optional] = None, error: Optional[Optional] = None, limit: Optional[Optional] = None): ... + # methods from library. + def add_library_components(self, library_components): ... + def get_keyword_names(self): ... + def run_keyword(self, name: str, args: tuple, kwargs: Optional[dict] = None): ... + def get_keyword_arguments(self, name: str): ... + def get_keyword_tags(self, name: str): ... + def get_keyword_documentation(self, name: str): ... + def get_keyword_types(self, name: str): ... + def get_keyword_source(self, keyword_name: str): ... + def failure_occurred(self): ... + def register_driver(self, driver: WebDriver, alias: str): ... + @property + def driver(self) -> WebDriver: ... + def find_element(self, locator: str, parent: Optional[WebElement] = None): ... + def find_elements(self, locator: str, parent: WebElement = None): ... + def _parse_plugins(self, plugins: Any): ... + def _parse_plugin_doc(self): ... + def _get_intro_documentation(self): ... + def _parse_listener(self, event_firing_webdriver: Any): ... + def _string_to_modules(self, modules: Any): ... + def _store_plugin_keywords(self, plugin): ... + def _resolve_screenshot_root_directory(self): ... diff --git a/src/SeleniumLibrary/entry/__init__.py b/src/SeleniumLibrary/entry/__init__.py new file mode 100644 index 000000000..d83559d8d --- /dev/null +++ b/src/SeleniumLibrary/entry/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2008-2011 Nokia Networks +# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors +# Copyright 2016- Robot Framework Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/SeleniumLibrary/entry/__main__.py b/src/SeleniumLibrary/entry/__main__.py new file mode 100644 index 000000000..47e049233 --- /dev/null +++ b/src/SeleniumLibrary/entry/__main__.py @@ -0,0 +1,105 @@ +# Copyright 2008-2011 Nokia Networks +# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors +# Copyright 2016- Robot Framework Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +from pathlib import Path +from typing import Optional +import click + +from .get_versions import get_version +from .translation import compare_translation, get_library_translation + + +CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]} +VERSION = get_version() + + +@click.group() +@click.version_option(VERSION) +def cli(): + """Robot Framework SeleniumLibrary command line tool. + + Possible commands are: + + translation + will generate template translation json file from library keywords. + + See each command argument help for more details what (optional) arguments that command supports. + """ + pass + + +@cli.command() +@click.argument( + "filename", + type=click.Path(exists=False, dir_okay=False, path_type=Path), + required=True, +) +@click.option( + "--plugins", + help="Same as plugins argument in the library import.", + default=None, + type=str, +) +@click.option( + "--compare", + help="Compares the translation file sha256 sum to library documentation.", + default=False, + is_flag=True, + show_default=True, +) +def translation( + filename: Path, + plugins: Optional[str] = None, + compare: bool = False, +): + """Default translation file from library keywords. + + This will help users to create their own translation as Python plugins. Command + will populate json file with English language. To create proper translation + file, users needs to translate the keyword name and doc arguments values in + json file. + + The filename argument will tell where the default json file is saved. + + The --plugins argument will add plugin keywords in addition to the library keywords + into the default translation json file. It is used the same as plugins argument in + the library import. + + If the --compare flag is set, then command does not generate template + translation file. Instead it compares sha256 sums from the filename + to the one read from the library documentation. It will print out a list + of keywords for which the documentation sha256 does not match. This will ease + translating projects to identify keywords which needs updating. + """ + lib_translation = get_library_translation(plugins) + if compare: + if table := compare_translation(filename, lib_translation): + print( + "Found differences between translation and library, see below for details." + ) + for line in table: + print(line) + else: + print("Translation is valid, no updated needed.") + else: + with filename.open("w") as file: + json.dump(lib_translation, file, indent=4) + print(f"Translation file created in {filename.absolute()}") + + +if __name__ == "__main__": + cli() diff --git a/src/SeleniumLibrary/entry/get_versions.py b/src/SeleniumLibrary/entry/get_versions.py new file mode 100644 index 000000000..51e68da7a --- /dev/null +++ b/src/SeleniumLibrary/entry/get_versions.py @@ -0,0 +1,51 @@ +# Copyright 2008-2011 Nokia Networks +# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors +# Copyright 2016- Robot Framework Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pathlib import Path +import re +import subprocess +import sys + +from selenium import __version__ + +INSTALL_DIR = Path(__file__).parent.parent + + +def get_rf_version() -> str: + process = subprocess.run( + [sys.executable, "-m", "robot", "--version"], capture_output=True, check=False + ) + return process.stdout.decode("utf-8").split(" ")[2] + + +def get_library_version() -> str: + init_file = INSTALL_DIR / "__init__.py" + with init_file.open("r") as file: + data = file.read() + return re.search('\n__version__ = "(.*)"', data).group(1) + + +def get_version(): + """Display Python, Robot Framework, SeleniumLibrary and selenium versions""" + python_version = ( + f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" + ) + return ( + f"\nUsed Python is: {sys.executable}\n\tVersion: {python_version}\n" + f'Robot Framework version: "{get_rf_version()}"\n' + f"Installed SeleniumLibrary version is: {get_library_version()}\n" + f"Installed selenium version is: {__version__}\n" + ) diff --git a/src/SeleniumLibrary/entry/translation.py b/src/SeleniumLibrary/entry/translation.py new file mode 100644 index 000000000..3c98dddaa --- /dev/null +++ b/src/SeleniumLibrary/entry/translation.py @@ -0,0 +1,122 @@ +# Copyright 2008-2011 Nokia Networks +# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors +# Copyright 2016- Robot Framework Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import hashlib +import inspect +import json +from pathlib import Path +from typing import List, Optional + +KEYWORD_NAME = "Keyword name" +DOC_CHANGED = "Documentation update needed" +NO_LIB_KEYWORD = "Keyword not found from library" +MISSING_TRANSLATION = "Keyword is missing translation" +MISSING_CHECKSUM = "Keyword translation is missing checksum" +MAX_REASON_LEN = max( + len(DOC_CHANGED), + len(NO_LIB_KEYWORD), + len(MISSING_TRANSLATION), + len(MISSING_CHECKSUM), +) + + +def get_library_translation(plugins: Optional[str] = None) -> dict: + from SeleniumLibrary import SeleniumLibrary + + selib = SeleniumLibrary(plugins=plugins) + translation = {} + for function in selib.attributes.values(): + translation[function.__name__] = { + "name": function.__name__, + "doc": function.__doc__, + "sha256": hashlib.sha256(function.__doc__.encode("utf-16")).hexdigest(), + } + translation["__init__"] = { + "name": "__init__", + "doc": inspect.getdoc(selib), + "sha256": hashlib.sha256(inspect.getdoc(selib).encode("utf-16")).hexdigest(), # type: ignore + } + translation["__intro__"] = { + "name": "__intro__", + "doc": selib.__doc__, + "sha256": hashlib.sha256(selib.__doc__.encode("utf-16")).hexdigest(), # type: ignore + } + return translation + + +def _max_kw_name_length(project_translation: dict) -> int: + max_lenght = 0 + for keyword_data in project_translation.values(): + if (current_kw_length := len(keyword_data["name"])) > max_lenght: + max_lenght = current_kw_length + return max_lenght + + +def _get_heading(max_kw_length: int) -> List[str]: + heading = f"| {KEYWORD_NAME} " + next_line = f"| {'-' * len(KEYWORD_NAME)}" + if (padding := max_kw_length - len(KEYWORD_NAME)) > 0: + heading = f"{heading}{' ' * padding}" + next_line = f"{next_line}{'-' * padding}" + reason = "Reason" + reason_padding = MAX_REASON_LEN - len(reason) + heading = f"{heading}| {reason}{' ' * reason_padding} |" + next_line = f"{next_line} | {'-' * MAX_REASON_LEN} |" + return [heading, next_line] + + +def _table_doc_updated(lib_kw: str, max_name_lenght: int, reason: str) -> str: + line = f"| {lib_kw} " + if (padding := max_name_lenght - len(lib_kw) - 0) > 0: + line = f"{line}{' ' * padding}| {reason} " + else: + line = f"{line}| {reason} " + if reason_padding := MAX_REASON_LEN - len(reason): + line = f"{line}{' ' * reason_padding}" + return f"{line}|" + + +def compare_translation(filename: Path, library_translation: dict): + with filename.open("r") as file: + project_translation = json.load(file) + max_kw_length = _max_kw_name_length(library_translation) + table_body = [] + for lib_kw, lib_kw_data in library_translation.items(): + project_kw_data = project_translation.get(lib_kw) + if not project_kw_data: + table_body.append( + _table_doc_updated(lib_kw, max_kw_length, MISSING_TRANSLATION) + ) + continue + sha256_value = project_kw_data.get("sha256") + if not sha256_value: + table_body.append( + _table_doc_updated(lib_kw, max_kw_length, MISSING_CHECKSUM) + ) + continue + if project_kw_data["sha256"] != lib_kw_data["sha256"]: + table_body.append(_table_doc_updated(lib_kw, max_kw_length, DOC_CHANGED)) + for project_kw in project_translation: + if project_kw not in library_translation: + table_body.append( + _table_doc_updated(project_kw, max_kw_length, NO_LIB_KEYWORD) + ) + if not table_body: + return [] + + table = _get_heading(max_kw_length) + table.extend(table_body) + return table diff --git a/src/SeleniumLibrary/keywords/browsermanagement.py b/src/SeleniumLibrary/keywords/browsermanagement.py index 665ffe89b..c8114d484 100644 --- a/src/SeleniumLibrary/keywords/browsermanagement.py +++ b/src/SeleniumLibrary/keywords/browsermanagement.py @@ -68,6 +68,7 @@ def open_browser( options: Any = None, service_log_path: Optional[str] = None, executable_path: Optional[str] = None, + service: Any = None, ) -> str: """Opens a new browser instance to the optional ``url``. @@ -87,13 +88,18 @@ def open_browser( To be able to actually use one of these browsers, you need to have a matching Selenium browser driver available. See the [https://github.com/robotframework/SeleniumLibrary#browser-drivers| - project documentation] for more details. Headless Firefox and - Headless Chrome are new additions in SeleniumLibrary 3.1.0 - and require Selenium 3.8.0 or newer. + project documentation] for more details. After opening the browser, it is possible to use optional ``url`` to navigate the browser to the desired address. + Examples: + | `Open Browser` | http://example.com | Chrome | | + | `Open Browser` | http://example.com | Firefox | alias=Firefox | + | `Open Browser` | http://example.com | Edge | remote_url=http://127.0.0.1:4444/wd/hub | + | `Open Browser` | about:blank | | | + | `Open Browser` | browser=Chrome | | | + Optional ``alias`` is an alias given for this browser instance and it can be used for switching between browsers. When same ``alias`` is given with two `Open Browser` keywords, the first keyword will @@ -107,18 +113,26 @@ def open_browser( browsers are opened, and reset back to 1 when `Close All Browsers` is called. See `Switch Browser` for more information and examples. + Alias examples: + | ${1_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Opens new browser because alias is new. | + | ${2_index} = | `Open Browser` | http://example.com | Firefox | | # Opens new browser because alias is not defined. | + | ${3_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Switches to the browser with Chrome alias. | + | ${4_index} = | `Open Browser` | http://example.com | Chrome | alias=${1_index} | # Switches to the browser with Chrome alias. | + | Should Be Equal | ${1_index} | ${3_index} | | | | + | Should Be Equal | ${1_index} | ${4_index} | | | | + | Should Be Equal | ${2_index} | ${2} | | | | + Optional ``remote_url`` is the URL for a [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid]. - Optional ``desired_capabilities`` is deprecated and will be ignored. Capabilities of each - individual browser is now done through options or services. Please refer to those arguments + Optional ``desired_capabilities`` is deprecated and will be removed + in the next release. Capabilities of each individual browser is now + done through options or services. Please refer to those arguments for configuring specific browsers. Optional ``ff_profile_dir`` is the path to the Firefox profile directory if you wish to overwrite the default profile Selenium - uses. Notice that prior to SeleniumLibrary 3.0, the library - contained its own profile that was used by default. The - ``ff_profile_dir`` can also be an instance of the + uses. The ``ff_profile_dir`` can also be an instance of the [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html|selenium.webdriver.FirefoxProfile] . As a third option, it is possible to use `FirefoxProfile` methods and attributes to define the profile using methods and attributes @@ -127,148 +141,68 @@ def open_browser( profile settings. See ``options`` argument documentation in below how to handle backslash escaping. + Example for FirefoxProfile + | `Open Browser` | http://example.com | Firefox | ff_profile_dir=/path/to/profile | # Using profile from disk. | + | `Open Browser` | http://example.com | Firefox | ff_profile_dir=${FirefoxProfile_instance} | # Using instance of FirefoxProfile. | + | `Open Browser` | http://example.com | Firefox | ff_profile_dir=set_preference("key", "value");set_preference("other", "setting") | # Defining profile using FirefoxProfile mehtods. | + Optional ``options`` argument allows defining browser specific Selenium options. Example for Chrome, the ``options`` argument allows defining the following [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|methods and attributes] and for Firefox these [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.options.html?highlight=firefox#selenium.webdriver.firefox.options.Options|methods and attributes] - are available. Please note that not all browsers, supported by the - SeleniumLibrary, have Selenium options available. Therefore please - consult the Selenium documentation which browsers do support - the Selenium options. Selenium options are also supported, when ``remote_url`` + are available. Selenium options are also supported, when ``remote_url`` argument is used. The SeleniumLibrary ``options`` argument accepts Selenium options in two different formats: as a string and as Python object which is an instance of the Selenium options class. - The string format allows defining Selenium options methods - or attributes and their arguments in Robot Framework test data. - The method and attributes names are case and space sensitive and - must match to the Selenium options methods and attributes names. - When defining a method, it must be defined in a similar way as in - python: method name, opening parenthesis, zero to many arguments - and closing parenthesis. If there is a need to define multiple - arguments for a single method, arguments must be separated with - comma, just like in Python. Example: `add_argument("--headless")` - or `add_experimental_option("key", "value")`. Attributes are - defined in a similar way as in Python: attribute name, equal sign, - and attribute value. Example, `headless=True`. Multiple methods - and attributes must be separated by a semicolon. Example: - `add_argument("--headless");add_argument("--start-maximized")`. - - Arguments allow defining Python data types and arguments are - evaluated by using Python - [https://docs.python.org/3/library/ast.html#ast.literal_eval|ast.literal_eval]. - Strings must be quoted with single or double quotes, example "value" - or 'value'. It is also possible to define other Python builtin - data types, example `True` or `None`, by not using quotes - around the arguments. - - The string format is space friendly. Usually, spaces do not alter - the defining methods or attributes. There are two exceptions. - In some Robot Framework test data formats, two or more spaces are - considered as cell separator and instead of defining a single - argument, two or more arguments may be defined. Spaces in string - arguments are not removed and are left as is. Example - `add_argument ( "--headless" )` is same as - `add_argument("--headless")`. But `add_argument(" --headless ")` is - not same same as `add_argument ( "--headless" )`, because - spaces inside of quotes are not removed. Please note that if - options string contains backslash, example a Windows OS path, - the backslash needs escaping both in Robot Framework data and - in Python side. This means single backslash must be writen using - four backslash characters. Example, Windows path: - "C:\\path\\to\\profile" must be written as - "C:\\\\\\\\path\\\\\\to\\\\\\\\profile". Another way to write - backslash is use Python - [https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals|raw strings] - and example write: r"C:\\\\path\\\\to\\\\profile". - - As last format, ``options`` argument also supports receiving - the Selenium options as Python class instance. In this case, the - instance is used as-is and the SeleniumLibrary will not convert - the instance to other formats. - For example, if the following code return value is saved to - `${options}` variable in the Robot Framework data: - | options = webdriver.ChromeOptions() - | options.add_argument('--disable-dev-shm-usage') - | return options - - Then the `${options}` variable can be used as an argument to - ``options``. - - Example the ``options`` argument can be used to launch Chomium-based - applications which utilize the - [https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver|Chromium Embedded Framework] - . To lauch Chomium-based application, use ``options`` to define - `binary_location` attribute and use `add_argument` method to define - `remote-debugging-port` port for the application. Once the browser - is opened, the test can interact with the embedded web-content of - the system under test. - - Optional ``service_log_path`` argument defines the name of the - file where to write the browser driver logs. If the - ``service_log_path`` argument contain a marker ``{index}``, it + The string format uses a Python like syntax to define Selenium options + methods or attributes. + + Example when using + [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|Chrome options] + method: + | `Open Browser` | http://example.com | Chrome | options=add_argument("--disable-popup-blocking"); add_argument("--ignore-certificate-errors") | # Sting format. | + | `Open Browser` | None | Chrome | options=binary_location="/path/to/binary";add_argument("remote-debugging-port=port") | # Start Chomium-based application. | + | `Open Browser` | None | Chrome | options=binary_location=r"C:\\\\path\\\\to\\\\binary" | # Windows OS path escaping. | + + ``options`` argument also supports receiving the Selenium + options as Python class instance. + + See the `Browser and Driver options` section for more details on how to use + the either the string format or Python object syntax with the ``options`` argument. + + Optional ``service_log_path`` will be deprecated in the next release. Please + use the browser specific ``service`` attribute instead. The ``service_log_path`` + argument defines the name of the file where to write the browser driver logs. + If the ``service_log_path`` argument contains a marker ``{index}``, it will be automatically replaced with unique running index preventing files to be overwritten. Indices start's from 1, and how they are represented can be customized using Python's [https://docs.python.org/3/library/string.html#format-string-syntax| format string syntax]. - Optional ``executable_path`` argument defines the path to the driver + Optional ``executable_path`` will be deprecated in the next release. Please + use the `executable_path` and, if needed, `port` attribute on the ``service`` + argument instead. The ``executable_path`` argument defines the path to the driver executable, example to a chromedriver or a geckodriver. If not defined it is assumed the executable is in the [https://en.wikipedia.org/wiki/PATH_(variable)|$PATH]. - Examples: - | `Open Browser` | http://example.com | Chrome | | - | `Open Browser` | http://example.com | Firefox | alias=Firefox | - | `Open Browser` | http://example.com | Edge | remote_url=http://127.0.0.1:4444/wd/hub | - | `Open Browser` | about:blank | | | - | `Open Browser` | browser=Chrome | | | - - Alias examples: - | ${1_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Opens new browser because alias is new. | - | ${2_index} = | `Open Browser` | http://example.com | Firefox | | # Opens new browser because alias is not defined. | - | ${3_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Switches to the browser with Chrome alias. | - | ${4_index} = | `Open Browser` | http://example.com | Chrome | alias=${1_index} | # Switches to the browser with Chrome alias. | - | Should Be Equal | ${1_index} | ${3_index} | | | | - | Should Be Equal | ${1_index} | ${4_index} | | | | - | Should Be Equal | ${2_index} | ${2} | | | | - - Example when using - [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|Chrome options] - method: - | `Open Browser` | http://example.com | Chrome | options=add_argument("--disable-popup-blocking"); add_argument("--ignore-certificate-errors") | # Sting format. | - | ${options} = | Get Options | | | # Selenium options instance. | - | `Open Browser` | http://example.com | Chrome | options=${options} | | - | `Open Browser` | None | Chrome | options=binary_location="/path/to/binary";add_argument("remote-debugging-port=port") | # Start Chomium-based application. | - | `Open Browser` | None | Chrome | options=binary_location=r"C:\\\\path\\\\to\\\\binary" | # Windows OS path escaping. | - - Example for FirefoxProfile - | `Open Browser` | http://example.com | Firefox | ff_profile_dir=/path/to/profile | # Using profile from disk. | - | `Open Browser` | http://example.com | Firefox | ff_profile_dir=${FirefoxProfile_instance} | # Using instance of FirefoxProfile. | - | `Open Browser` | http://example.com | Firefox | ff_profile_dir=set_preference("key", "value");set_preference("other", "setting") | # Defining profile using FirefoxProfile mehtods. | + Optional ``service`` argument allows for managing the local drivers + as well as setting some browser specific settings like logging. Service + classes are not supported when ``remote_url`` argument is used. See the + `Browser and Driver options` section for more details on how to use + the ``service`` argument. If the provided configuration options are not enough, it is possible to use `Create Webdriver` to customize browser initialization even more. - Applying ``desired_capabilities`` argument also for local browser is - new in SeleniumLibrary 3.1. - - Using ``alias`` to decide, is the new browser opened is new - in SeleniumLibrary 4.0. The ``options`` and ``service_log_path`` - are new in SeleniumLibrary 4.0. Support for ``ff_profile_dir`` - accepting an instance of the `selenium.webdriver.FirefoxProfile` - and support defining FirefoxProfile with methods and - attributes are new in SeleniumLibrary 4.0. - - Making ``url`` optional is new in SeleniumLibrary 4.1. - - The ``executable_path`` argument is new in SeleniumLibrary 4.2. + The ``service`` argument is new in SeleniumLibrary 6.4. """ index = self.drivers.get_index(alias) if index: @@ -279,6 +213,10 @@ def open_browser( return index if desired_capabilities: self.warn("desired_capabilities has been deprecated and removed. Please use options to configure browsers as per documentation.") + if service_log_path: + self.warn("service_log_path is being deprecated. Please use service to configure log_output or equivalent service attribute.") + if executable_path: + self.warn("exexcutable_path is being deprecated. Please use service to configure the driver's executable_path as per documentation.") return self._make_new_browser( url, browser, @@ -289,6 +227,7 @@ def open_browser( options, service_log_path, executable_path, + service, ) def _make_new_browser( @@ -302,6 +241,7 @@ def _make_new_browser( options=None, service_log_path=None, executable_path=None, + service=None, ): if remote_url: self.info( @@ -318,6 +258,7 @@ def _make_new_browser( options, service_log_path, executable_path, + service, ) driver = self._wrap_event_firing_webdriver(driver) index = self.ctx.register_driver(driver, alias) @@ -763,6 +704,7 @@ def _make_driver( options=None, service_log_path=None, executable_path=None, + service=None, ): driver = self._webdriver_creator.create_driver( browser=browser, @@ -772,6 +714,7 @@ def _make_driver( options=options, service_log_path=service_log_path, executable_path=executable_path, + service=service, ) driver.set_script_timeout(self.ctx.timeout) driver.implicitly_wait(self.ctx.implicit_wait) diff --git a/src/SeleniumLibrary/keywords/element.py b/src/SeleniumLibrary/keywords/element.py index d277791f5..831ebfaf2 100644 --- a/src/SeleniumLibrary/keywords/element.py +++ b/src/SeleniumLibrary/keywords/element.py @@ -132,6 +132,12 @@ def page_should_contain(self, text: str, loglevel: str = "TRACE"): argument. Valid log levels are ``TRACE`` (default), ``DEBUG``, ``INFO``, ``WARN``, and ``NONE``. If the log level is ``NONE`` or below the current active log level the source will not be logged. + + !! WARNING !! If you have an iframe selected, `Page Should Contain` + will reset the frame reference back to the main frame. This is due + to the fact that is searches for the ``text`` in all frames. To locate + an element in an iframe after calling `Page Should Contian` one needs + to (re)select the frame. """ if not self._page_contains(text): self.ctx.log_source(loglevel) @@ -143,7 +149,7 @@ def page_should_contain(self, text: str, loglevel: str = "TRACE"): @keyword def page_should_contain_element( self, - locator: Union[WebElement, str], + locator: Union[WebElement, str, List[Union[WebElement,str]]], message: Optional[str] = None, loglevel: str = "TRACE", limit: Optional[int] = None, @@ -917,7 +923,6 @@ def press_key(self, locator: Union[WebElement, str], key: str): using the selenium send_keys method. Although one is not recommended over the other if `Press Key` does not work we recommend trying `Press Keys`. - send_ """ if key.startswith("\\") and len(key) > 1: key = self._map_ascii_key_code_to_key(int(key[1:])) diff --git a/src/SeleniumLibrary/keywords/expectedconditions.py b/src/SeleniumLibrary/keywords/expectedconditions.py index 7b896fd6c..c0272ae75 100644 --- a/src/SeleniumLibrary/keywords/expectedconditions.py +++ b/src/SeleniumLibrary/keywords/expectedconditions.py @@ -26,7 +26,7 @@ def wait_for_expected_condition(self, condition: string, *args, timeout: Optiona The condition must be one of selenium's expected condition which can be found within the selenium - [https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions Python API] + [https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions|Python API] documentation. The expected condition can written as snake_case (ex title_is) or it can be space delimited (ex Title Is). Some conditions require additional arguments or ``args`` which should diff --git a/src/SeleniumLibrary/keywords/screenshot.py b/src/SeleniumLibrary/keywords/screenshot.py index 628361c8a..8cd8dc299 100644 --- a/src/SeleniumLibrary/keywords/screenshot.py +++ b/src/SeleniumLibrary/keywords/screenshot.py @@ -14,10 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. import os -from typing import Union +from typing import Optional, Union +from base64 import b64decode from robot.utils import get_link_path from selenium.webdriver.remote.webelement import WebElement +from selenium.webdriver.common.print_page_options import PrintOptions, Orientation from SeleniumLibrary.base import LibraryComponent, keyword from SeleniumLibrary.utils.path_formatter import _format_path @@ -25,6 +27,7 @@ DEFAULT_FILENAME_PAGE = "selenium-screenshot-{index}.png" DEFAULT_FILENAME_ELEMENT = "selenium-element-screenshot-{index}.png" EMBED = "EMBED" +DEFAULT_FILENAME_PDF = "selenium-page-{index}.pdf" class ScreenshotKeywords(LibraryComponent): @@ -128,7 +131,7 @@ def _capture_page_screen_to_log(self): @keyword def capture_element_screenshot( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], filename: str = DEFAULT_FILENAME_ELEMENT, ) -> str: """Captures a screenshot from the element identified by ``locator`` and embeds it into log file. @@ -235,3 +238,100 @@ def _embed_to_log_as_file(self, path, width): f'', html=True, ) + + @keyword + def print_page_as_pdf(self, + filename: str = DEFAULT_FILENAME_PDF, + background: Optional[bool] = None, + margin_bottom: Optional[float] = None, + margin_left: Optional[float] = None, + margin_right: Optional[float] = None, + margin_top: Optional[float] = None, + orientation: Optional[Orientation] = None, + page_height: Optional[float] = None, + page_ranges: Optional[list] = None, + page_width: Optional[float] = None, + scale: Optional[float] = None, + shrink_to_fit: Optional[bool] = None, + # path_to_file=None, + ): + """ Print the current page as a PDF + + ``page_ranges`` defaults to `['-']` or "all" pages. ``page_ranges`` takes a list of + strings indicating the ranges. + + The page size defaults to 21.59 for ``page_width`` and 27.94 for ``page_height``. + This is the equivalent size of US-Letter. The assumed units on these parameters + is centimeters. + + The default margin for top, left, bottom, right is `1`. The assumed units on + these parameters is centimeters. + + The default ``orientation`` is `portrait`. ``orientation`` can be either `portrait` + or `landscape`. + + The default ``scale`` is `1`. ``scale`` must be greater than or equal to `0.1` and + less than or equal to `2`. + + ``background`` and ``scale_to_fit`` can be either `${True}` or `${False}`.. + + If all print options are None then a pdf will fail to print silently. + """ + + if page_ranges is None: + page_ranges = ['-'] + + print_options = PrintOptions() + if background is not None: + print_options.background = background + if margin_bottom is not None: + print_options.margin_bottom = margin_bottom + if margin_left is not None: + print_options.margin_left = margin_left + if margin_right is not None: + print_options.margin_right = margin_right + if margin_top is not None: + print_options.margin_top = margin_top + if orientation is not None: + print_options.orientation = orientation + if page_height is not None: + print_options.page_height = page_height + if page_ranges is not None: + print_options.page_ranges = page_ranges + if page_width is not None: + print_options.page_width = page_width + if scale is not None: + print_options.scale = scale + if shrink_to_fit is not None: + print_options.shrink_to_fit = shrink_to_fit + + if not self.drivers.current: + self.info("Cannot print page to pdf because no browser is open.") + return + return self._print_page_as_pdf_to_file(filename, print_options) + + def _print_page_as_pdf_to_file(self, filename, options): + path = self._get_pdf_path(filename) + self._create_directory(path) + pdfdata = self.driver.print_page(options) + if not pdfdata: + raise RuntimeError(f"Failed to print page.") + self._save_pdf_to_file(pdfdata, path) + return path + + def _save_pdf_to_file(self, pdfbase64, path): + pdfdata = b64decode(pdfbase64) + with open(path, mode='wb') as pdf: + pdf.write(pdfdata) + + def _get_pdf_path(self, filename): + directory = self.log_dir + filename = filename.replace("/", os.sep) + index = 0 + while True: + index += 1 + formatted = _format_path(filename, index) + path = os.path.join(directory, formatted) + # filename didn't contain {index} or unique path was found + if formatted == filename or not os.path.exists(path): + return path diff --git a/src/SeleniumLibrary/keywords/tableelement.py b/src/SeleniumLibrary/keywords/tableelement.py index ce4a74836..e054e9d77 100644 --- a/src/SeleniumLibrary/keywords/tableelement.py +++ b/src/SeleniumLibrary/keywords/tableelement.py @@ -25,7 +25,7 @@ class TableElementKeywords(LibraryComponent): @keyword def get_table_cell( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], row: int, column: int, loglevel: str = "TRACE", @@ -89,7 +89,7 @@ def _get_rows(self, locator, count): @keyword def table_cell_should_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], row: int, column: int, expected: str, @@ -112,7 +112,7 @@ def table_cell_should_contain( @keyword def table_column_should_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], column: int, expected: str, loglevel: str = "TRACE", @@ -143,7 +143,7 @@ def table_column_should_contain( @keyword def table_footer_should_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], expected: str, loglevel: str = "TRACE", ): @@ -168,7 +168,7 @@ def table_footer_should_contain( @keyword def table_header_should_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], expected: str, loglevel: str = "TRACE", ): @@ -193,7 +193,7 @@ def table_header_should_contain( @keyword def table_row_should_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], row: int, expected: str, loglevel: str = "TRACE", @@ -224,7 +224,7 @@ def table_row_should_contain( @keyword def table_should_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], expected: str, loglevel: str = "TRACE", ): diff --git a/src/SeleniumLibrary/keywords/waiting.py b/src/SeleniumLibrary/keywords/waiting.py index 62c84c9f2..eeec6756e 100644 --- a/src/SeleniumLibrary/keywords/waiting.py +++ b/src/SeleniumLibrary/keywords/waiting.py @@ -222,7 +222,7 @@ def wait_until_page_does_not_contain( @keyword def wait_until_page_contains_element( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], timeout: Optional[timedelta] = None, error: Optional[str] = None, limit: Optional[int] = None, @@ -260,7 +260,7 @@ def wait_until_page_contains_element( @keyword def wait_until_page_does_not_contain_element( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], timeout: Optional[timedelta] = None, error: Optional[str] = None, limit: Optional[int] = None, @@ -298,7 +298,7 @@ def wait_until_page_does_not_contain_element( @keyword def wait_until_element_is_visible( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], timeout: Optional[timedelta] = None, error: Optional[str] = None, ): @@ -321,7 +321,7 @@ def wait_until_element_is_visible( @keyword def wait_until_element_is_not_visible( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], timeout: Optional[timedelta] = None, error: Optional[str] = None, ): @@ -344,7 +344,7 @@ def wait_until_element_is_not_visible( @keyword def wait_until_element_is_enabled( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], timeout: Optional[timedelta] = None, error: Optional[str] = None, ): @@ -372,7 +372,7 @@ def wait_until_element_is_enabled( @keyword def wait_until_element_contains( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], text: str, timeout: Optional[timedelta] = None, error: Optional[str] = None, @@ -396,7 +396,7 @@ def wait_until_element_contains( @keyword def wait_until_element_does_not_contain( self, - locator: Union[WebElement, None, str], + locator: Union[WebElement, str], text: str, timeout: Optional[timedelta] = None, error: Optional[str] = None, diff --git a/src/SeleniumLibrary/keywords/webdrivertools/__init__.py b/src/SeleniumLibrary/keywords/webdrivertools/__init__.py index e95ee378f..9d55ab897 100644 --- a/src/SeleniumLibrary/keywords/webdrivertools/__init__.py +++ b/src/SeleniumLibrary/keywords/webdrivertools/__init__.py @@ -17,4 +17,5 @@ from .webdrivertools import WebDriverCreator # noqa from .webdrivertools import WebDriverCache # noqa from .webdrivertools import SeleniumOptions # noqa +from .webdrivertools import SeleniumService # noqa from .sl_file_detector import SelLibLocalFileDetector # noqa diff --git a/src/SeleniumLibrary/keywords/webdrivertools/webdrivertools.py b/src/SeleniumLibrary/keywords/webdrivertools/webdrivertools.py index 1cab9d36a..3e05294ae 100644 --- a/src/SeleniumLibrary/keywords/webdrivertools/webdrivertools.py +++ b/src/SeleniumLibrary/keywords/webdrivertools/webdrivertools.py @@ -58,7 +58,7 @@ class WebDriverCreator: def __init__(self, log_dir): self.log_dir = log_dir self.selenium_options = SeleniumOptions() - #self.selenium_service = SeleniumService() + self.selenium_service = SeleniumService() def create_driver( self, @@ -69,12 +69,14 @@ def create_driver( options=None, service_log_path=None, executable_path=None, + service=None, ): browser = self._normalise_browser_name(browser) creation_method = self._get_creator_method(browser) desired_capabilities = self._parse_capabilities(desired_capabilities, browser) service_log_path = self._get_log_path(service_log_path) options = self.selenium_options.create(self.browser_names.get(browser), options) + service = self.selenium_service.create(self.browser_names.get(browser), service) if service_log_path: logger.info(f"Browser driver log file created to: {service_log_path}") self._create_directory(service_log_path) @@ -89,6 +91,7 @@ def create_driver( options=options, service_log_path=service_log_path, executable_path=executable_path, + service=service, ) return creation_method( desired_capabilities, @@ -96,6 +99,7 @@ def create_driver( options=options, service_log_path=service_log_path, executable_path=executable_path, + service=service, ) def _get_creator_method(self, browser): @@ -148,6 +152,7 @@ def create_chrome( options=None, service_log_path=None, executable_path="chromedriver", + service=None, ): if remote_url: if not options: @@ -156,7 +161,8 @@ def create_chrome( if not executable_path: executable_path = self._get_executable_path(webdriver.chrome.service.Service) log_method = self._get_log_method(ChromeService, service_log_path) - service = ChromeService(executable_path=executable_path, **log_method) + if not service: + service = ChromeService(executable_path=executable_path, **log_method) return webdriver.Chrome( options=options, service=service, @@ -169,12 +175,13 @@ def create_headless_chrome( options=None, service_log_path=None, executable_path="chromedriver", + service=None, ): if not options: options = webdriver.ChromeOptions() options.add_argument('--headless=new') return self.create_chrome( - desired_capabilities, remote_url, options, service_log_path, executable_path + desired_capabilities, remote_url, options, service_log_path, executable_path, service ) def _get_executable_path(self, webdriver): @@ -193,6 +200,7 @@ def create_firefox( options=None, service_log_path=None, executable_path="geckodriver", + service=None, ): profile = self._get_ff_profile(ff_profile_dir) if not options: @@ -209,7 +217,8 @@ def create_firefox( if not executable_path: executable_path = self._get_executable_path(webdriver.firefox.service.Service) log_method = self._get_log_method(FirefoxService, service_log_path or self._geckodriver_log) - service = FirefoxService(executable_path=executable_path, **log_method) + if service is None: + service = FirefoxService(executable_path=executable_path, **log_method) return webdriver.Firefox( options=options, service=service, @@ -250,6 +259,7 @@ def create_headless_firefox( options=None, service_log_path=None, executable_path="geckodriver", + service=None, ): if not options: options = webdriver.FirefoxOptions() @@ -261,6 +271,7 @@ def create_headless_firefox( options, service_log_path, executable_path, + service, ) def create_ie( @@ -270,6 +281,7 @@ def create_ie( options=None, service_log_path=None, executable_path="IEDriverServer.exe", + service=None, ): if remote_url: if not options: @@ -278,7 +290,8 @@ def create_ie( if not executable_path: executable_path = self._get_executable_path(webdriver.ie.service.Service) log_method = self._get_log_method(IeService, service_log_path) - service = IeService(executable_path=executable_path, **log_method) + if service is None: + service = IeService(executable_path=executable_path, **log_method) return webdriver.Ie( options=options, service=service, @@ -296,6 +309,7 @@ def create_edge( options=None, service_log_path=None, executable_path="msedgedriver", + service=None, ): if remote_url: if not options: @@ -304,7 +318,8 @@ def create_edge( if not executable_path: executable_path = self._get_executable_path(webdriver.edge.service.Service) log_method = self._get_log_method(EdgeService, service_log_path) - service = EdgeService(executable_path=executable_path, **log_method) + if service is None: + service = EdgeService(executable_path=executable_path, **log_method) return webdriver.Edge( options=options, service=service, @@ -318,6 +333,7 @@ def create_safari( options=None, service_log_path=None, executable_path="/usr/bin/safaridriver", + service=None, ): if remote_url: if not options: @@ -326,7 +342,8 @@ def create_safari( if not executable_path: executable_path = self._get_executable_path(webdriver.Safari) log_method = self._get_log_method(SafariService, service_log_path) - service = SafariService(executable_path=executable_path, **log_method) + if service is None: + service = SafariService(executable_path=executable_path, **log_method) return webdriver.Safari(options=options, service=service) def _remote(self, remote_url, options): @@ -444,53 +461,58 @@ def _get_index(self, alias_or_index): except ValueError: return None -# Temporarily removing as not going to use with initial 4.10.0 hotfixq -# class SeleniumService: -# """ executable_path: str = DEFAULT_EXECUTABLE_PATH, -# port: int = 0, -# log_path: typing.Optional[str] = None, -# service_args: typing.Optional[typing.List[str]] = None, -# env: typing.Optional[typing.Mapping[str, str]] = None, -# **kwargs, - -# executable_path = None, port, service_log_path, service_args, env -# """ -# def create(self, browser, -# executable_path=None, -# port=0, -# service_log_path=None, -# service_args=None, -# env=None, -# start_error_message=None, # chromium, chrome, edge -# quiet=False, reuse_service=False, # safari -# ): -# selenium_service = self._import_service(browser) -# # chrome, chromium, firefox, edge -# if any(chromium_based in browser.lower() for chromium_based in ('chromium', 'chrome', 'edge')): -# service = selenium_service(executable_path=executable_path, port=port,log_path=service_log_path, -# service_args=service_args,env=env,start_error_message=start_error_message -# ) -# return service -# elif 'safari' in browser.lower(): -# service = selenium_service(executable_path=executable_path, port=port,log_path=service_log_path, -# service_args=service_args,env=env,quiet=quiet,reuse_service=reuse_service -# ) -# return service -# elif 'firefox' in browser.lower(): -# service = selenium_service(executable_path=executable_path, port=port,log_path=service_log_path, -# service_args=service_args,env=env -# ) -# return service -# else: -# service = selenium_service(executable_path=executable_path, port=port,log_path=service_log_path, -# service_args=service_args,env=env -# ) -# return service - -# def _import_service(self, browser): -# browser = browser.replace("headless_", "", 1) -# service = importlib.import_module(f"selenium.webdriver.{browser}.service") -# return service.Service +class SeleniumService: + """ + + """ + def create(self, browser, service): + if not service: + return None + selenium_service = self._import_service(browser) + if not isinstance(service, str): + return service + + # Throw error is used with remote .. "They cannot be used with a Remote WebDriver session." [ref doc] + attrs = self._parse(service) + # verify attribute a member of service class parameters + service_parameters = inspect.signature(selenium_service).parameters + for key in attrs: + if key not in service_parameters: + service_module = '.'.join((selenium_service.__module__, selenium_service.__qualname__)) + raise ValueError(f"{key} is not a member of {service_module} Service class") + selenium_service_inst = selenium_service(**attrs) + return selenium_service_inst + + def _parse(self, service): + """The service argument parses slightly different than the options argument. As of + Selenium v4.20.0, all the service items are arguments applied to the service class + instantiation. Thus each item is split instead parsed as done with options. + """ + result = {} + for item in self._split(service,';'): + try: + attr, val = self._split(item, '=') + result[attr]=ast.literal_eval(val) + except (ValueError, SyntaxError): + raise ValueError(f'Unable to parse service: "{item}"') + return result + + def _import_service(self, browser): + browser = browser.replace("headless_", "", 1) + # Throw error is used with remote .. "They cannot be used with a Remote WebDriver session." [ref doc] + service = importlib.import_module(f"selenium.webdriver.{browser}.service") + return service.Service + + def _split(self, service_or_attr, splittok): + split_string = [] + start_position = 0 + tokens = generate_tokens(StringIO(service_or_attr).readline) + for toknum, tokval, tokpos, _, _ in tokens: + if toknum == token.OP and tokval == splittok: + split_string.append(service_or_attr[start_position : tokpos[1]].strip()) + start_position = tokpos[1] + 1 + split_string.append(service_or_attr[start_position:]) + return split_string class SeleniumOptions: def create(self, browser, options): @@ -518,6 +540,36 @@ def _import_options(self, browser): options = importlib.import_module(f"selenium.webdriver.{browser}.options") return options.Options + def _parse_to_tokens(self, item): + result = {} + index, method = self._get_arument_index(item) + if index == -1: + result[item] = [] + return result + if method: + args_as_string = item[index + 1 : -1].strip() + if args_as_string: + args = ast.literal_eval(args_as_string) + else: + args = args_as_string + is_tuple = args_as_string.startswith("(") + else: + args_as_string = item[index + 1 :].strip() + args = ast.literal_eval(args_as_string) + is_tuple = args_as_string.startswith("(") + method_or_attribute = item[:index].strip() + result[method_or_attribute] = self._parse_arguments(args, is_tuple) + return result + + def _parse_arguments(self, argument, is_tuple=False): + if argument == "": + return [] + if is_tuple: + return [argument] + if not is_tuple and isinstance(argument, tuple): + return list(argument) + return [argument] + def _parse(self, options): result = [] for item in self._split(options): diff --git a/src/SeleniumLibrary/locators/elementfinder.py b/src/SeleniumLibrary/locators/elementfinder.py index d74486a3e..e48f63f87 100644 --- a/src/SeleniumLibrary/locators/elementfinder.py +++ b/src/SeleniumLibrary/locators/elementfinder.py @@ -223,7 +223,7 @@ def _find_by_tag_name(self, criteria, tag, constraints, parent): def _find_by_data_locator(self, criteria, tag, constraints, parent): try: - name, value = criteria.split(":", 2) + name, value = criteria.split(":", 1) if "" in [name, value]: raise ValueError except ValueError: diff --git a/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt b/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt index 391a5a73e..1a204d3bb 100644 --- a/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt +++ b/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt @@ -177,7 +177,7 @@ a WebElement that should be acted on: | Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} | | | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); | -| | [Return] | ${element} | +| | RETURN | ${element} | This keyword is a reimplementation of the basic functionality of the ``id`` locator where ``${browser}`` is a reference to a WebDriver @@ -264,6 +264,115 @@ contains the following items: https://robotframework.org/, https://robocon.io/, https://github.com/robotframework/' and 'https://github.com/. += Browser and Driver options and service class = + +This section talks about how to configure either the browser or +the driver using the options and service arguments of the `Open +Browser` keyword. + +== Configuring the browser using the Selenium Options == + +As noted within the keyword documentation for `Open Browser`, its +``options`` argument accepts Selenium options in two different +formats: as a string and as Python object which is an instance of +the Selenium options class. + +=== Options string format === + +The string format allows defining Selenium options methods +or attributes and their arguments in Robot Framework test data. +The method and attributes names are case and space sensitive and +must match to the Selenium options methods and attributes names. +When defining a method, it must be defined in a similar way as in +python: method name, opening parenthesis, zero to many arguments +and closing parenthesis. If there is a need to define multiple +arguments for a single method, arguments must be separated with +comma, just like in Python. Example: `add_argument("--headless")` +or `add_experimental_option("key", "value")`. Attributes are +defined in a similar way as in Python: attribute name, equal sign, +and attribute value. Example, `headless=True`. Multiple methods +and attributes must be separated by a semicolon. Example: +`add_argument("--headless");add_argument("--start-maximized")`. + +Arguments allow defining Python data types and arguments are +evaluated by using Python +[https://docs.python.org/3/library/ast.html#ast.literal_eval|ast.literal_eval]. +Strings must be quoted with single or double quotes, example "value" +or 'value'. It is also possible to define other Python builtin +data types, example `True` or `None`, by not using quotes +around the arguments. + +The string format is space friendly. Usually, spaces do not alter +the defining methods or attributes. There are two exceptions. +In some Robot Framework test data formats, two or more spaces are +considered as cell separator and instead of defining a single +argument, two or more arguments may be defined. Spaces in string +arguments are not removed and are left as is. Example +`add_argument ( "--headless" )` is same as +`add_argument("--headless")`. But `add_argument(" --headless ")` is +not same same as `add_argument ( "--headless" )`, because +spaces inside of quotes are not removed. Please note that if +options string contains backslash, example a Windows OS path, +the backslash needs escaping both in Robot Framework data and +in Python side. This means single backslash must be writen using +four backslash characters. Example, Windows path: +"C:\path\to\profile" must be written as +"C:\\\\path\\\to\\\\profile". Another way to write +backslash is use Python +[https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals|raw strings] +and example write: r"C:\\path\\to\\profile". + +=== Selenium Options as Python class === + +As last format, ``options`` argument also supports receiving +the Selenium options as Python class instance. In this case, the +instance is used as-is and the SeleniumLibrary will not convert +the instance to other formats. +For example, if the following code return value is saved to +`${options}` variable in the Robot Framework data: +| options = webdriver.ChromeOptions() +| options.add_argument('--disable-dev-shm-usage') +| return options + +Then the `${options}` variable can be used as an argument to +``options``. + +Example the ``options`` argument can be used to launch Chomium-based +applications which utilize the +[https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver|Chromium Embedded Framework] +. To launch Chromium-based application, use ``options`` to define +`binary_location` attribute and use `add_argument` method to define +`remote-debugging-port` port for the application. Once the browser +is opened, the test can interact with the embedded web-content of +the system under test. + +== Configuring the driver using the Service class == + +With the ``service`` argument, one can setup and configure the driver. For example +one can set the driver location and/port or specify the command line arguments. There +are several browser specific attributes related to logging as well. For the various +Service Class attributes refer to +[https://www.selenium.dev/documentation/webdriver/drivers/service/|the Selenium documentation] +. Currently the ``service`` argument only accepts Selenium service in the string format. + +=== Service string format === + +The string format allows for defining Selenium service attributes +and their values in the `Open Browser` keyword. The attributes names +are case and space sensitive and must match to the Selenium attributes +names. Attributes are defined in a similar way as in Python: attribute +name, equal sign, and attribute value. Example, `port=1234`. Multiple +attributes must be separated by a semicolon. Example: +`executable_path='/path/to/driver';port=1234`. Don't have duplicate +attributes, like `service_args=['--append-log', '--readable-timestamp']; +service_args=['--log-level=DEBUG']` as the second will override the first. +Instead combine them as in +`service_args=['--append-log', '--readable-timestamp', '--log-level=DEBUG']` + +Arguments allow defining Python data types and arguments are +evaluated by using Python. Strings must be quoted with single +or double quotes, example "value" or 'value' + = Timeouts, waits, and delays = This section discusses different ways how to wait for elements to @@ -378,6 +487,47 @@ documentation for further details. Plugin API is new SeleniumLibrary 4.0 += Language = + +SeleniumLibrary offers the possibility to translate keyword names and documentation to new language. If language +is defined, SeleniumLibrary will search from +[https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path | module search path] +for Python packages starting with `robotframework-seleniumlibrary-translation` by using the +[https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/ | Python pluging API]. The Library +is using naming convention to find Python plugins. + +The package must implement a single API call, ``get_language`` without any arguments. The method must return a +dictionary containing two keys: ``language`` and ``path``. The language key value defines which language +the package contains. Also the value should match (case insensitive) the library ``language`` import parameter. +The path parameter value should be full path to the translation file. + +== Translation file == + +The file name or extension is not important, but data must be in [https://www.json.org/json-en.html | json] +format. The keys of json are the methods names, not the keyword names, which implements keywords. Value of +key is json object which contains two keys: ``name`` and ``doc``. The ``name`` key contains the keyword +translated name and `doc` contains translated documentation. Providing doc and name are optional, example +translation json file can only provide translations to keyword names or only to documentation. But it is +always recommended to provide translation to both name and doc. Special key ``__intro__`` is for class level +documentation and ``__init__`` is for init level documentation. These special values ``name`` can not be +translated, instead ``name`` should be kept the same. + +== Generating template translation file == + +Template translation file, with English language can be created by running: +`rfselib translation /path/to/translation.json` command. Command does not provide translations to other +languages, it only provides easy way to create full list keywords and their documentation in correct +format. It is also possible to add keywords from library plugins by providing `--plugins` arguments +to command. Example: `rfselib translation --plugins myplugin.SomePlugin /path/to/translation.json` The +generated json file contains `sha256` key, which contains the sha256 sum of the library documentation. +The sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares +the translation to the library and prints outs a table which tells if there are changes needed for +the translation file. + +Example project for translation can be found from +[https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi] +repository. + = Plugin: my_lib = Some dummy documentation. diff --git a/utest/test/api/approved_files/PluginDocumentation.test_parse_plugin_init_doc.approved.txt b/utest/test/api/approved_files/PluginDocumentation.test_parse_plugin_init_doc.approved.txt index db0eb9db6..935242b1e 100644 --- a/utest/test/api/approved_files/PluginDocumentation.test_parse_plugin_init_doc.approved.txt +++ b/utest/test/api/approved_files/PluginDocumentation.test_parse_plugin_init_doc.approved.txt @@ -19,3 +19,5 @@ SeleniumLibrary can be imported with several optional arguments. Default value to wait for page load to complete until a timeout exception is raised. - ``action_chain_delay``: Default value for `ActionChains` delay to wait in between actions. +- ``language``: + Defines language which is used to translate keyword names and documentation. diff --git a/utest/test/api/test_plugins.py b/utest/test/api/test_plugins.py index 2a07a1156..c8241d8ba 100644 --- a/utest/test/api/test_plugins.py +++ b/utest/test/api/test_plugins.py @@ -22,7 +22,7 @@ def setUpClass(cls): def test_no_libraries(self): for item in [None, "None", ""]: sl = SeleniumLibrary(plugins=item) - self.assertEqual(len(sl.get_keyword_names()), 181) + self.assertEqual(len(sl.get_keyword_names()), 182) def test_parse_library(self): plugin = "path.to.MyLibrary" diff --git a/utest/test/approved_files/test_entry_point.test_compare_translation.received.txt b/utest/test/approved_files/test_entry_point.test_compare_translation.received.txt new file mode 100644 index 000000000..9f77dc182 --- /dev/null +++ b/utest/test/approved_files/test_entry_point.test_compare_translation.received.txt @@ -0,0 +1,2 @@ +No changes + diff --git a/utest/test/entry/__init__.py b/utest/test/entry/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/utest/test/entry/approvaltests_config.json b/utest/test/entry/approvaltests_config.json new file mode 100644 index 000000000..550e66434 --- /dev/null +++ b/utest/test/entry/approvaltests_config.json @@ -0,0 +1,3 @@ +{ + "subdirectory": "approved_files" +} diff --git a/utest/test/entry/approved_files/test_entry_point.test_compare_translation.approved.txt b/utest/test/entry/approved_files/test_entry_point.test_compare_translation.approved.txt new file mode 100644 index 000000000..9f77dc182 --- /dev/null +++ b/utest/test/entry/approved_files/test_entry_point.test_compare_translation.approved.txt @@ -0,0 +1,2 @@ +No changes + diff --git a/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt b/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt new file mode 100644 index 000000000..3feb0a024 --- /dev/null +++ b/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt @@ -0,0 +1,6 @@ +Changes + +0) | Keyword name | Reason | +1) | ---------------------------------------- | --------------------------------------- | +2) | alert_should_be_present | Documentation update needed | +3) | handle_alert | Keyword is missing translation | diff --git a/utest/test/entry/test_entry_point.py b/utest/test/entry/test_entry_point.py new file mode 100644 index 000000000..fcbc10bbf --- /dev/null +++ b/utest/test/entry/test_entry_point.py @@ -0,0 +1,52 @@ +import json +from pathlib import Path +import sys + +from approvaltests import verify_all + +from SeleniumLibrary.entry.get_versions import get_version +from SeleniumLibrary.entry.translation import ( + compare_translation, + get_library_translation, +) + + +def test_version(): + lines = get_version().splitlines() + python_version = ( + f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" + ) + assert len(lines) == 6 + assert "Used Python is: " in lines[1], lines[1] + assert python_version in lines[2], lines[2] + assert 'Robot Framework version: "' in lines[3], lines[3] + assert "Installed SeleniumLibrary version is: " in lines[4], lines[4] + assert "Installed selenium version is: " in lines[5], lines[5] + + +def test_get_translation(): + data = get_library_translation() + for item in data.values(): + assert item["name"], item["name"] + assert item["doc"], item["doc"] + assert item["sha256"], item["sha256"] + + +def test_compare_translation(tmp_path: Path): + translation = tmp_path / "translation.json" + data = get_library_translation() + with translation.open("w") as file: + json.dump(data, file, indent=4) + table = compare_translation(translation, data) + verify_all("No changes", table) + + +def test_compare_translation_changes(tmp_path: Path): + translation = tmp_path / "translation.json" + data = get_library_translation() + data.pop("handle_alert", None) + data["alert_should_be_present"]["sha256"] = "foo" + with translation.open("w") as file: + json.dump(data, file, indent=4) + table = compare_translation(translation, get_library_translation()) + verify_all("Changes", table) diff --git a/utest/test/keywords/approved_files/test_selenium_options_parser.test_parse_options_string_errors_py3_12.approved.txt b/utest/test/keywords/approved_files/test_selenium_options_parser.test_parse_options_string_errors_py3_12.approved.txt new file mode 100644 index 000000000..d57473c22 --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_options_parser.test_parse_options_string_errors_py3_12.approved.txt @@ -0,0 +1,8 @@ +Selenium options string errors + +0) method("arg1) ('unterminated string literal (detected at line 1)', (1, 8)) +1) method(arg1") ('unterminated string literal (detected at line 1)', (1, 12)) +2) method(arg1) Unable to parse option: "method(arg1)" +3) attribute=arg1 Unable to parse option: "attribute=arg1" +4) attribute=webdriver Unable to parse option: "attribute=webdriver" +5) method(argument="value") Unable to parse option: "method(argument="value")" diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_importer.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_importer.approved.txt new file mode 100644 index 000000000..f71cb14d5 --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_importer.approved.txt @@ -0,0 +1,9 @@ +Selenium service import + +0) +1) +2) +3) +4) +5) +6) diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string.approved.txt new file mode 100644 index 000000000..f0f0cdb4f --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string.approved.txt @@ -0,0 +1,8 @@ +Selenium service string to dict + +0) {'attribute': 'arg1'} +1) {'attribute': True} +2) {'attribute': 'arg4'} +3) {'attribute': 'C:\\path\to\\profile'} +4) {'attribute': 'C:\\path\\to\\profile'} +5) {'attribute': None} diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string_errors.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string_errors.approved.txt new file mode 100644 index 000000000..e7bf1c5ad --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string_errors.approved.txt @@ -0,0 +1,8 @@ +Selenium service string errors + +0) attribute=arg1 Unable to parse service: "attribute=arg1" +1) attribute='arg1 Unable to parse service: "attribute='arg1" +2) attribute=['arg1' ('EOF in multi-line statement', (2, 0)) +3) attribute=['arg1';'arg2'] ('EOF in multi-line statement', (2, 0)) +4) attribute['arg1'] Unable to parse service: "attribute['arg1']" +5) attribute=['arg1'] attribute=['arg2'] Unable to parse service: "attribute=['arg1'] attribute=['arg2']" diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string_errors_py3_12.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string_errors_py3_12.approved.txt new file mode 100644 index 000000000..44dc032d0 --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_parse_service_string_errors_py3_12.approved.txt @@ -0,0 +1,8 @@ +Selenium service string errors + +0) attribute=arg1 Unable to parse service: "attribute=arg1" +1) attribute='arg1 ('unterminated string literal (detected at line 1)', (1, 11)) +2) attribute=['arg1' ('unexpected EOF in multi-line statement', (1, 0)) +3) attribute=['arg1';'arg2'] ('unexpected EOF in multi-line statement', (1, 0)) +4) attribute['arg1'] Unable to parse service: "attribute['arg1']" +5) attribute=['arg1'] attribute=['arg2'] Unable to parse service: "attribute=['arg1'] attribute=['arg2']" diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_service_create.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_service_create.approved.txt new file mode 100644 index 000000000..678b8a6ba --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_service_create.approved.txt @@ -0,0 +1,5 @@ +Selenium service + +0) ['--log-level=DEBUG'] +1) ['--append-log', '--readable-timestamp'] +2) ['--disable-build-check'] diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_split_attribute.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_split_attribute.approved.txt new file mode 100644 index 000000000..f0bb0c6cb --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_split_attribute.approved.txt @@ -0,0 +1,5 @@ +Selenium service attribute string splitting + +0) ['attribute', "'arg1'"] +1) ['attribute', "['arg1','arg2']"] +2) ['attribute', " [ 'arg1' , 'arg2' ]"] diff --git a/utest/test/keywords/approved_files/test_selenium_service_parser.test_split_service.approved.txt b/utest/test/keywords/approved_files/test_selenium_service_parser.test_split_service.approved.txt new file mode 100644 index 000000000..8f2026ad8 --- /dev/null +++ b/utest/test/keywords/approved_files/test_selenium_service_parser.test_split_service.approved.txt @@ -0,0 +1,6 @@ +Selenium service string splitting + +0) ["attribute='arg1'"] +1) ["attribute='arg1'", "attribute='arg2'"] +2) ["attribute=['arg1','arg2']", "attribute='arg3'"] +3) ["attribute = 'arg1'", " attribute = 'arg2' "] diff --git a/utest/test/keywords/test_keyword_arguments_browsermanagement.py b/utest/test/keywords/test_keyword_arguments_browsermanagement.py index 97439ca58..0d730878a 100644 --- a/utest/test/keywords/test_keyword_arguments_browsermanagement.py +++ b/utest/test/keywords/test_keyword_arguments_browsermanagement.py @@ -22,13 +22,13 @@ def test_open_browser(self): remote_url = '"http://localhost:4444/wd/hub"' browser = mock() when(self.brorser)._make_driver( - "firefox", None, None, False, None, None, None + "firefox", None, None, False, None, None, None, None ).thenReturn(browser) alias = self.brorser.open_browser(url) self.assertEqual(alias, None) when(self.brorser)._make_driver( - "firefox", None, None, remote_url, None, None, None + "firefox", None, None, remote_url, None, None, None, None ).thenReturn(browser) alias = self.brorser.open_browser(url, alias="None", remote_url=remote_url) self.assertEqual(alias, None) @@ -47,7 +47,7 @@ def test_same_alias(self): def test_open_browser_no_get(self): browser = mock() when(self.brorser)._make_driver( - "firefox", None, None, False, None, None, None + "firefox", None, None, False, None, None, None, None ).thenReturn(browser) self.brorser.open_browser() verify(browser, times=0).get(ANY) diff --git a/utest/test/keywords/test_selenium_options_parser.py b/utest/test/keywords/test_selenium_options_parser.py index 40e51bdd9..b61fff029 100644 --- a/utest/test/keywords/test_selenium_options_parser.py +++ b/utest/test/keywords/test_selenium_options_parser.py @@ -1,4 +1,5 @@ import os +import sys import unittest import pytest @@ -102,7 +103,8 @@ def test_parse_arguemnts(options, reporter): verify_all("Parse arguments from complex object", results, reporter=reporter) -@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds") +@pytest.mark.skipif(sys.version_info > (3, 11), reason="Errors change with Python 3.12") def test_parse_options_string_errors(options, reporter): results = [] results.append(error_formatter(options._parse, 'method("arg1)', True)) @@ -114,6 +116,19 @@ def test_parse_options_string_errors(options, reporter): verify_all("Selenium options string errors", results, reporter=reporter) +@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds") +@pytest.mark.skipif(sys.version_info < (3, 12), reason="Errors change with Python 3.12") +def test_parse_options_string_errors_py3_12(options, reporter): + results = [] + results.append(error_formatter(options._parse, 'method("arg1)', True)) + results.append(error_formatter(options._parse, 'method(arg1")', True)) + results.append(error_formatter(options._parse, "method(arg1)", True)) + results.append(error_formatter(options._parse, "attribute=arg1", True)) + results.append(error_formatter(options._parse, "attribute=webdriver", True)) + results.append(error_formatter(options._parse, 'method(argument="value")', True)) + verify_all("Selenium options string errors", results, reporter=reporter) + + @unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") def test_split_options(options, reporter): results = [] @@ -203,8 +218,6 @@ def output_dir(): output_dir = os.path.abspath(os.path.join(curr_dir, "..", "..", "output_dir")) return output_dir -from selenium.webdriver.chrome.service import Service as ChromeService - def test_create_chrome_with_options(creator): options = mock() diff --git a/utest/test/keywords/test_selenium_service_parser.py b/utest/test/keywords/test_selenium_service_parser.py new file mode 100644 index 000000000..095a8c2c2 --- /dev/null +++ b/utest/test/keywords/test_selenium_service_parser.py @@ -0,0 +1,141 @@ +import os +import sys +import unittest + +import pytest +from approvaltests.approvals import verify_all +from approvaltests.reporters.generic_diff_reporter_factory import ( + GenericDiffReporterFactory, +) +from mockito import mock, when, unstub, ANY +from robot.utils import WINDOWS +from selenium import webdriver + +from SeleniumLibrary.keywords.webdrivertools import SeleniumService, WebDriverCreator + + +@pytest.fixture(scope="module") +def service(): + return SeleniumService() + +@pytest.fixture(scope="module") +def reporter(): + path = os.path.dirname(__file__) + reporter_json = os.path.abspath( + os.path.join(path, "..", "approvals_reporters.json") + ) + factory = GenericDiffReporterFactory() + factory.load(reporter_json) + return factory.get_first_working() + + +def teardown_function(): + unstub() + + +@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +def test_parse_service_string(service, reporter): + results = [] + results.append(service._parse('attribute="arg1"')) + # results.append(service._parse(" attribute = True ")) # need to resolve issues with spaces in service string. + results.append(service._parse('attribute="arg1";attribute=True')) + results.append(service._parse('attribute=["arg1","arg2","arg3"] ; attribute=True ; attribute="arg4"')) + results.append( + service._parse( + 'attribute="C:\\\\path\\to\\\\profile"' + ) + ) + results.append( + service._parse( + r'attribute="arg1"; attribute="C:\\path\\to\\profile"' + ) + ) + results.append(service._parse("attribute=None")) + verify_all("Selenium service string to dict", results, reporter=reporter) + + +# @unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +# @unittest.skipIf(sys.version_info > (3, 11), reason="Errors change with Python 3.12") +@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds") +@pytest.mark.skipif(sys.version_info > (3, 11), reason="Errors change with Python 3.12") +def test_parse_service_string_errors(service, reporter): + results = [] + results.append(error_formatter(service._parse, "attribute=arg1", True)) + results.append(error_formatter(service._parse, "attribute='arg1", True)) + results.append(error_formatter(service._parse, "attribute=['arg1'", True)) + results.append(error_formatter(service._parse, "attribute=['arg1';'arg2']", True)) + results.append(error_formatter(service._parse, "attribute['arg1']", True)) + results.append(error_formatter(service._parse, "attribute=['arg1'] attribute=['arg2']", True)) + verify_all("Selenium service string errors", results, reporter=reporter) + + +@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds") +@pytest.mark.skipif(sys.version_info < (3, 12), reason="Errors change with Python 3.12") +def test_parse_service_string_errors_py3_12(service, reporter): + results = [] + results.append(error_formatter(service._parse, "attribute=arg1", True)) + results.append(error_formatter(service._parse, "attribute='arg1", True)) + results.append(error_formatter(service._parse, "attribute=['arg1'", True)) + results.append(error_formatter(service._parse, "attribute=['arg1';'arg2']", True)) + results.append(error_formatter(service._parse, "attribute['arg1']", True)) + results.append(error_formatter(service._parse, "attribute=['arg1'] attribute=['arg2']", True)) + verify_all("Selenium service string errors", results, reporter=reporter) + + +@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +def test_split_service(service, reporter): + results = [] + results.append(service._split("attribute='arg1'", ';')) + results.append(service._split("attribute='arg1';attribute='arg2'", ';')) + results.append(service._split("attribute=['arg1','arg2'];attribute='arg3'", ';')) + results.append(service._split(" attribute = 'arg1' ; attribute = 'arg2' ", ';')) + verify_all("Selenium service string splitting", results, reporter=reporter) + + +@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +def test_split_attribute(service, reporter): + results = [] + results.append(service._split("attribute='arg1'", '=')) + results.append(service._split("attribute=['arg1','arg2']", '=')) + results.append(service._split(" attribute = [ 'arg1' , 'arg2' ]", '=')) + verify_all("Selenium service attribute string splitting", results, reporter=reporter) + + +@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +def test_service_create(service, reporter): + results = [] + service_str = "service_args=['--log-level=DEBUG']" + brwsr_service = service.create("chrome", service_str) + results.append(brwsr_service.service_args) + + service_str = f"{service_str};service_args=['--append-log', '--readable-timestamp']" + brwsr_service = service.create("chrome", service_str) + results.append(brwsr_service.service_args) + + service_str = f"{service_str};service_args=['--disable-build-check']" + brwsr_service = service.create("chrome", service_str) + results.append(brwsr_service.service_args) + + verify_all("Selenium service", results, reporter=reporter) + + +@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds") +def test_importer(service, reporter): + results = [] + results.append(service._import_service("firefox")) + results.append(service._import_service("headless_firefox")) + results.append(service._import_service("chrome")) + results.append(service._import_service("headless_chrome")) + results.append(service._import_service("ie")) + results.append(service._import_service("edge")) + results.append(service._import_service("safari")) + verify_all("Selenium service import", results, reporter=reporter) + + +def error_formatter(method, arg, full=False): + try: + return method(arg) + except Exception as error: + if full: + return f"{arg} {error}" + return "{} {}".format(arg, error.__str__()[:15]) \ No newline at end of file diff --git a/utest/test/locators/test_elementfinder.py b/utest/test/locators/test_elementfinder.py index ed7b801bd..50472be20 100644 --- a/utest/test/locators/test_elementfinder.py +++ b/utest/test/locators/test_elementfinder.py @@ -283,6 +283,13 @@ def test_find_with_data(finder): finder.find("data:id:my_id", tag="div", required=False) verify(driver).find_elements(By.XPATH, '//*[@data-id="my_id"]') +def test_find_with_data_multiple_colons(finder): + driver = _get_driver(finder) + elements = _make_mock_elements("div", "a", "span", "a") + when(driver).find_elements(By.XPATH, '//*[@data-automation-id="foo:bar"]').thenReturn(elements) + result = finder.find("data:automation-id:foo:bar", first_only=False) + assert result == elements + def test_find_with_invalid_data(finder): with pytest.raises( @@ -297,6 +304,12 @@ def test_find_with_invalid_data(finder): ): finder.find("data:", tag="div", required=False) + with pytest.raises( + ValueError, + match=r"^Provided selector \(:value\) is malformed\. Correct format: name:value\.", + ): + finder.find("data::value", tag="div", required=False) + def test_find_with_locator_with_apos(finder): driver = _get_driver(finder) diff --git a/utest/test/robotframework_seleniumlibrary_translation_fi/__init__.py b/utest/test/robotframework_seleniumlibrary_translation_fi/__init__.py new file mode 100644 index 000000000..369b7c953 --- /dev/null +++ b/utest/test/robotframework_seleniumlibrary_translation_fi/__init__.py @@ -0,0 +1,9 @@ +from pathlib import Path + + +def get_language() -> dict: + curr_dir = Path(__file__).parent.absolute() + return { + "language": "fi", + "path": curr_dir / "translate.json" + } diff --git a/utest/test/robotframework_seleniumlibrary_translation_fi/translate.json b/utest/test/robotframework_seleniumlibrary_translation_fi/translate.json new file mode 100644 index 000000000..67bfb7579 --- /dev/null +++ b/utest/test/robotframework_seleniumlibrary_translation_fi/translate.json @@ -0,0 +1,917 @@ +{ + "alert_should_be_present": { + "name": "alert_should_be_present", + "doc": "Verifies that an alert is present and by default, accepts it.\n\n Fails if no alert is present. If ``text`` is a non-empty string,\n then it is used to verify alert's message. The alert is accepted\n by default, but that behavior can be controlled by using the\n ``action`` argument same way as with `Handle Alert`.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n If it is not given, the global default `timeout` is used instead.\n\n ``action`` and ``timeout`` arguments are new in SeleniumLibrary 3.0.\n In earlier versions, the alert was always accepted and a timeout was\n hardcoded to one second.\n ", + "sha256": "c2389ab996f30509c4a5951f32dcfe2c8630040e00cedba19e19faa76a15299d" + }, + "alert_should_not_be_present": { + "name": "alert_should_not_be_present", + "doc": "Verifies that no alert is present.\n\n If the alert actually exists, the ``action`` argument determines\n how it should be handled. By default, the alert is accepted, but\n it can be also dismissed or left open the same way as with the\n `Handle Alert` keyword.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n By default, is not waited for the alert at all, but a custom time can\n be given if alert may be delayed. See the `time format` section\n for information about the syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "75343dfda0a68c40607e961ead1e104553ba074110f33627131125e8c11ecef0" + }, + "handle_alert": { + "name": "hallinnoi_hälytys", + "doc": "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi", + "sha256": "7620b9059b37d2cb1d5823256d0f71d32d3f66af153d6be8ff5100219d4270d6" + }, + "input_text_into_alert": { + "name": "input_text_into_alert", + "doc": "Types the given ``text`` into an input field in an alert.\n\n The alert is accepted by default, but that behavior can be controlled\n by using the ``action`` argument same way as with `Handle Alert`.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n If it is not given, the global default `timeout` is used instead.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "77f522107ebbde4fbcca0e9d1f1e31911dad7f3256ea39d078ed3365cfefbc46" + }, + "close_all_browsers": { + "name": "close_all_browsers", + "doc": "Closes all open browsers and resets the browser cache.\n\n After this keyword, new indexes returned from `Open Browser` keyword\n are reset to 1.\n\n This keyword should be used in test or suite teardown to make sure\n all browsers are closed.\n ", + "sha256": "34bfcab8a0c99c9fc0ebeeaec4432664ab8fbcc99673bd4bb3f9be2e897dbb5b" + }, + "close_browser": { + "name": "close_browser", + "doc": "Closes the current browser.", + "sha256": "a13d34e21bad1e0a76dab6f27c3f8b803825b8996c989f5b106918e27f0d0eb1" + }, + "create_webdriver": { + "name": "create_webdriver", + "doc": "Creates an instance of Selenium WebDriver.\n\n Like `Open Browser`, but allows passing arguments to the created\n WebDriver instance directly. This keyword should only be used if\n the functionality provided by `Open Browser` is not adequate.\n\n ``driver_name`` must be a WebDriver implementation name like Firefox,\n Chrome, Ie, Edge, Safari, or Remote.\n\n The initialized WebDriver can be configured either with a Python\n dictionary ``kwargs`` or by using keyword arguments ``**init_kwargs``.\n These arguments are passed directly to WebDriver without any\n processing. See [https://seleniumhq.github.io/selenium/docs/api/py/api.html|\n Selenium API documentation] for details about the supported arguments.\n\n Examples:\n | # Use proxy with Firefox | | | |\n | ${proxy}= | `Evaluate` | selenium.webdriver.Proxy() | modules=selenium, selenium.webdriver |\n | ${proxy.http_proxy}= | `Set Variable` | localhost:8888 | |\n | `Create Webdriver` | Firefox | proxy=${proxy} | |\n\n Returns the index of this browser instance which can be used later to\n switch back to it. Index starts from 1 and is reset back to it when\n `Close All Browsers` keyword is used. See `Switch Browser` for an\n example.\n ", + "sha256": "c7efa8a6295acc8336de8f8fdccec61b8a19cfc1b091382753929f9d86d2e292" + }, + "get_action_chain_delay": { + "name": "get_action_chain_delay", + "doc": "Gets the currently stored value for chain_delay_value in timestr format.\n ", + "sha256": "167a6689441f92c4099130c03e41a6c1595bcc1a37a207ac0f970b08b1591fdf" + }, + "get_browser_aliases": { + "name": "get_browser_aliases", + "doc": "Returns aliases of all active browser that has an alias as NormalizedDict.\n The dictionary contains the aliases as keys and the index as value.\n This can be accessed as dictionary ``${aliases.key}`` or as list ``@{aliases}[0]``.\n\n Example:\n | `Open Browser` | https://example.com | alias=BrowserA | |\n | `Open Browser` | https://example.com | alias=BrowserB | |\n | &{aliases} | `Get Browser Aliases` | | # &{aliases} = { BrowserA=1|BrowserB=2 } |\n | `Log` | ${aliases.BrowserA} | | # logs ``1`` |\n | FOR | ${alias} | IN | @{aliases} |\n | | `Log` | ${alias} | # logs ``BrowserA`` and ``BrowserB`` |\n | END | | | |\n\n See `Switch Browser` for more information and examples.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "defef82080de396568467a48c850a3db67484a7b786d8ebd76a3f3ba02c71dff" + }, + "get_browser_ids": { + "name": "get_browser_ids", + "doc": "Returns index of all active browser as list.\n\n Example:\n | @{browser_ids}= | Get Browser Ids | | |\n | FOR | ${id} | IN | @{browser_ids} |\n | | @{window_titles}= | Get Window Titles | browser=${id} |\n | | Log | Browser ${id} has these windows: ${window_titles} | |\n | END | | | |\n\n See `Switch Browser` for more information and examples.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "c320152b2a66ba066b100fb8c729f3d36c04a5b72ed753b09d29b6e13613a004" + }, + "get_location": { + "name": "get_location", + "doc": "Returns the current browser window URL.", + "sha256": "3dda250c7af426a85b6ec9c6be5ec5b4a4df41d4b2c72f0fa53b905384c29fc1" + }, + "get_selenium_implicit_wait": { + "name": "get_selenium_implicit_wait", + "doc": "Gets the implicit wait value used by Selenium.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Implicit wait` section above for more information.\n ", + "sha256": "f506381005ec3abf34b359df073e602f6589fac8d030a5369156016bbfacfde2" + }, + "get_selenium_page_load_timeout": { + "name": "get_selenium_page_load_timeout", + "doc": "Gets the time to wait for a page load to complete\n before raising a timeout exception.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Page load` section above for more information.\n\n New in SeleniumLibrary 6.1\n ", + "sha256": "18d82c9e55e7d06156a7fcccd2f96ddd6185a4c3625c344073a3f3e33d6e1e72" + }, + "get_selenium_speed": { + "name": "get_selenium_speed", + "doc": "Gets the delay that is waited after each Selenium command.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Selenium Speed` section above for more information.\n ", + "sha256": "e310cfaddced1d3088b673df4c7c469f10d3992116e2fabe048be986462febc5" + }, + "get_selenium_timeout": { + "name": "get_selenium_timeout", + "doc": "Gets the timeout that is used by various keywords.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Timeout` section above for more information.\n ", + "sha256": "9ebe70c2d1751c70d0f646c8c0e91e3c924ae6062c4c961432405b1fa2e0efe3" + }, + "get_session_id": { + "name": "get_session_id", + "doc": "Returns the currently active browser session id.\n\n New in SeleniumLibrary 3.2\n ", + "sha256": "26f4581c49c3930c0bbc7ff188330eff3bdb9822556ed029c8b47e5cb75949d2" + }, + "get_source": { + "name": "get_source", + "doc": "Returns the entire HTML source of the current page or frame.", + "sha256": "186bf0854602fddcbf9400b50a6db19549cfa23171c01e4708702cbfeaf4a921" + }, + "get_title": { + "name": "get_title", + "doc": "Returns the title of the current page.", + "sha256": "15ca2c42f74a7447ac29d6431219afa7b827245f9bd45e8d220c597c8c76ea72" + }, + "go_back": { + "name": "go_back", + "doc": "Simulates the user clicking the back button on their browser.", + "sha256": "c1ad3668ded03441f5e9019fe3e6417d6c0786fad522ef2d126b233112436ae7" + }, + "go_to": { + "name": "go_to", + "doc": "Navigates the current browser window to the provided ``url``.", + "sha256": "c7db5e459ba7a16a1e895bd0a948765b75bfc536284a2a50ac02e7153ccb0450" + }, + "location_should_be": { + "name": "location_should_be", + "doc": "Verifies that the current URL is exactly ``url``.\n\n The ``url`` argument contains the exact url that should exist in browser.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.2.0.\n ", + "sha256": "ea4b77e8386a52d7881a76cc42cf6c7754da4c44f1b54aa8d71467770a919839" + }, + "location_should_contain": { + "name": "location_should_contain", + "doc": "Verifies that the current URL contains ``expected``.\n\n The ``expected`` argument contains the expected value in url.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.2.0.\n ", + "sha256": "be7e648ca2a1f5a7d83f5fe99d0e9aef696f0c645b57985059179476c4d1d0ed" + }, + "log_location": { + "name": "log_location", + "doc": "Logs and returns the current browser window URL.", + "sha256": "ecdeee422f6587f42650730b5d1510d9f207cda56a2346fa3f6245ad62f4bac5" + }, + "log_source": { + "name": "log_source", + "doc": "Logs and returns the HTML source of the current page or frame.\n\n The ``loglevel`` argument defines the used log level. Valid log\n levels are ``WARN``, ``INFO`` (default), ``DEBUG``, ``TRACE``\n and ``NONE`` (no logging).\n ", + "sha256": "ccfb24c918224eb021f3f020cd9dd1375b128835d8295fc0a40d7f76c628d0b7" + }, + "log_title": { + "name": "log_title", + "doc": "Logs and returns the title of the current page.", + "sha256": "3722f0e150770d3b876af7a430c3a0e22f09a3b847c61b467cce146ed64ceea5" + }, + "open_browser": { + "name": "open_browser", + "doc": "Opens a new browser instance to the optional ``url``.\n\n The ``browser`` argument specifies which browser to use. The\n supported browsers are listed in the table below. The browser names\n are case-insensitive and some browsers have multiple supported names.\n\n | = Browser = | = Name(s) = |\n | Firefox | firefox, ff |\n | Google Chrome | googlechrome, chrome, gc |\n | Headless Firefox | headlessfirefox |\n | Headless Chrome | headlesschrome |\n | Internet Explorer | internetexplorer, ie |\n | Edge | edge |\n | Safari | safari |\n\n To be able to actually use one of these browsers, you need to have\n a matching Selenium browser driver available. See the\n [https://github.com/robotframework/SeleniumLibrary#browser-drivers|\n project documentation] for more details. Headless Firefox and\n Headless Chrome are new additions in SeleniumLibrary 3.1.0\n and require Selenium 3.8.0 or newer.\n\n After opening the browser, it is possible to use optional\n ``url`` to navigate the browser to the desired address.\n\n Optional ``alias`` is an alias given for this browser instance and\n it can be used for switching between browsers. When same ``alias``\n is given with two `Open Browser` keywords, the first keyword will\n open a new browser, but the second one will switch to the already\n opened browser and will not open a new browser. The ``alias``\n definition overrules ``browser`` definition. When same ``alias``\n is used but a different ``browser`` is defined, then switch to\n a browser with same alias is done and new browser is not opened.\n An alternative approach for switching is using an index returned\n by this keyword. These indices start from 1, are incremented when new\n browsers are opened, and reset back to 1 when `Close All Browsers`\n is called. See `Switch Browser` for more information and examples.\n\n Optional ``remote_url`` is the URL for a\n [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid].\n\n Optional ``desired_capabilities`` is deprecated and will be ignored. Capabilities of each\n individual browser is now done through options or services. Please refer to those arguments\n for configuring specific browsers.\n\n Optional ``ff_profile_dir`` is the path to the Firefox profile\n directory if you wish to overwrite the default profile Selenium\n uses. Notice that prior to SeleniumLibrary 3.0, the library\n contained its own profile that was used by default. The\n ``ff_profile_dir`` can also be an instance of the\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html|selenium.webdriver.FirefoxProfile]\n . As a third option, it is possible to use `FirefoxProfile` methods\n and attributes to define the profile using methods and attributes\n in the same way as with ``options`` argument. Example: It is possible\n to use FirefoxProfile `set_preference` to define different\n profile settings. See ``options`` argument documentation in below\n how to handle backslash escaping.\n\n Optional ``options`` argument allows defining browser specific\n Selenium options. Example for Chrome, the ``options`` argument\n allows defining the following\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|methods and attributes]\n and for Firefox these\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.options.html?highlight=firefox#selenium.webdriver.firefox.options.Options|methods and attributes]\n are available. Please note that not all browsers, supported by the\n SeleniumLibrary, have Selenium options available. Therefore please\n consult the Selenium documentation which browsers do support\n the Selenium options. Selenium options are also supported, when ``remote_url``\n argument is used.\n\n The SeleniumLibrary ``options`` argument accepts Selenium\n options in two different formats: as a string and as Python object\n which is an instance of the Selenium options class.\n\n The string format allows defining Selenium options methods\n or attributes and their arguments in Robot Framework test data.\n The method and attributes names are case and space sensitive and\n must match to the Selenium options methods and attributes names.\n When defining a method, it must be defined in a similar way as in\n python: method name, opening parenthesis, zero to many arguments\n and closing parenthesis. If there is a need to define multiple\n arguments for a single method, arguments must be separated with\n comma, just like in Python. Example: `add_argument(\"--headless\")`\n or `add_experimental_option(\"key\", \"value\")`. Attributes are\n defined in a similar way as in Python: attribute name, equal sign,\n and attribute value. Example, `headless=True`. Multiple methods\n and attributes must be separated by a semicolon. Example:\n `add_argument(\"--headless\");add_argument(\"--start-maximized\")`.\n\n Arguments allow defining Python data types and arguments are\n evaluated by using Python\n [https://docs.python.org/3/library/ast.html#ast.literal_eval|ast.literal_eval].\n Strings must be quoted with single or double quotes, example \"value\"\n or 'value'. It is also possible to define other Python builtin\n data types, example `True` or `None`, by not using quotes\n around the arguments.\n\n The string format is space friendly. Usually, spaces do not alter\n the defining methods or attributes. There are two exceptions.\n In some Robot Framework test data formats, two or more spaces are\n considered as cell separator and instead of defining a single\n argument, two or more arguments may be defined. Spaces in string\n arguments are not removed and are left as is. Example\n `add_argument ( \"--headless\" )` is same as\n `add_argument(\"--headless\")`. But `add_argument(\" --headless \")` is\n not same same as `add_argument ( \"--headless\" )`, because\n spaces inside of quotes are not removed. Please note that if\n options string contains backslash, example a Windows OS path,\n the backslash needs escaping both in Robot Framework data and\n in Python side. This means single backslash must be writen using\n four backslash characters. Example, Windows path:\n \"C:\\path\\to\\profile\" must be written as\n \"C:\\\\\\\\path\\\\\\to\\\\\\\\profile\". Another way to write\n backslash is use Python\n [https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals|raw strings]\n and example write: r\"C:\\\\path\\\\to\\\\profile\".\n\n As last format, ``options`` argument also supports receiving\n the Selenium options as Python class instance. In this case, the\n instance is used as-is and the SeleniumLibrary will not convert\n the instance to other formats.\n For example, if the following code return value is saved to\n `${options}` variable in the Robot Framework data:\n | options = webdriver.ChromeOptions()\n | options.add_argument('--disable-dev-shm-usage')\n | return options\n\n Then the `${options}` variable can be used as an argument to\n ``options``.\n\n Example the ``options`` argument can be used to launch Chomium-based\n applications which utilize the\n [https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver|Chromium Embedded Framework]\n . To lauch Chomium-based application, use ``options`` to define\n `binary_location` attribute and use `add_argument` method to define\n `remote-debugging-port` port for the application. Once the browser\n is opened, the test can interact with the embedded web-content of\n the system under test.\n\n Optional ``service_log_path`` argument defines the name of the\n file where to write the browser driver logs. If the\n ``service_log_path`` argument contain a marker ``{index}``, it\n will be automatically replaced with unique running\n index preventing files to be overwritten. Indices start's from 1,\n and how they are represented can be customized using Python's\n [https://docs.python.org/3/library/string.html#format-string-syntax|\n format string syntax].\n\n Optional ``executable_path`` argument defines the path to the driver\n executable, example to a chromedriver or a geckodriver. If not defined\n it is assumed the executable is in the\n [https://en.wikipedia.org/wiki/PATH_(variable)|$PATH].\n\n Examples:\n | `Open Browser` | http://example.com | Chrome | |\n | `Open Browser` | http://example.com | Firefox | alias=Firefox |\n | `Open Browser` | http://example.com | Edge | remote_url=http://127.0.0.1:4444/wd/hub |\n | `Open Browser` | about:blank | | |\n | `Open Browser` | browser=Chrome | | |\n\n Alias examples:\n | ${1_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Opens new browser because alias is new. |\n | ${2_index} = | `Open Browser` | http://example.com | Firefox | | # Opens new browser because alias is not defined. |\n | ${3_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Switches to the browser with Chrome alias. |\n | ${4_index} = | `Open Browser` | http://example.com | Chrome | alias=${1_index} | # Switches to the browser with Chrome alias. |\n | Should Be Equal | ${1_index} | ${3_index} | | | |\n | Should Be Equal | ${1_index} | ${4_index} | | | |\n | Should Be Equal | ${2_index} | ${2} | | | |\n\n Example when using\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|Chrome options]\n method:\n | `Open Browser` | http://example.com | Chrome | options=add_argument(\"--disable-popup-blocking\"); add_argument(\"--ignore-certificate-errors\") | # Sting format. |\n | ${options} = | Get Options | | | # Selenium options instance. |\n | `Open Browser` | http://example.com | Chrome | options=${options} | |\n | `Open Browser` | None | Chrome | options=binary_location=\"/path/to/binary\";add_argument(\"remote-debugging-port=port\") | # Start Chomium-based application. |\n | `Open Browser` | None | Chrome | options=binary_location=r\"C:\\\\path\\\\to\\\\binary\" | # Windows OS path escaping. |\n\n Example for FirefoxProfile\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=/path/to/profile | # Using profile from disk. |\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=${FirefoxProfile_instance} | # Using instance of FirefoxProfile. |\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=set_preference(\"key\", \"value\");set_preference(\"other\", \"setting\") | # Defining profile using FirefoxProfile mehtods. |\n\n If the provided configuration options are not enough, it is possible\n to use `Create Webdriver` to customize browser initialization even\n more.\n\n Applying ``desired_capabilities`` argument also for local browser is\n new in SeleniumLibrary 3.1.\n\n Using ``alias`` to decide, is the new browser opened is new\n in SeleniumLibrary 4.0. The ``options`` and ``service_log_path``\n are new in SeleniumLibrary 4.0. Support for ``ff_profile_dir``\n accepting an instance of the `selenium.webdriver.FirefoxProfile`\n and support defining FirefoxProfile with methods and\n attributes are new in SeleniumLibrary 4.0.\n\n Making ``url`` optional is new in SeleniumLibrary 4.1.\n\n The ``executable_path`` argument is new in SeleniumLibrary 4.2.\n ", + "sha256": "0c3f6191eb0bb2f557a3f93ab0c99c6137361091c73d09186c3846208a9ad7ff" + }, + "reload_page": { + "name": "reload_page", + "doc": "Simulates user reloading page.", + "sha256": "29308a1588c11a36ee1e46274959c9fb83b01fa628d38f7d1e60615cfa3c1d54" + }, + "set_action_chain_delay": { + "name": "set_action_chain_delay", + "doc": "Sets the duration of delay in ActionChains() used by SeleniumLibrary.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n\n Value is always stored as milliseconds internally.\n\n The previous value is returned and can be used to restore\n the original value later if needed.\n ", + "sha256": "30a861e88589e077326d025611cd558432a5426b6b002aface8b8367286eca24" + }, + "set_browser_implicit_wait": { + "name": "set_browser_implicit_wait", + "doc": "Sets the implicit wait value used by Selenium.\n\n Same as `Set Selenium Implicit Wait` but only affects the current\n browser.\n ", + "sha256": "a5097a7357967bebd69e46c700917daaa41994d0235b77da90ce0b88d1bd3518" + }, + "set_selenium_implicit_wait": { + "name": "set_selenium_implicit_wait", + "doc": "Sets the implicit wait value used by Selenium.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n This keyword sets the implicit wait for all opened browsers.\n Use `Set Browser Implicit Wait` to set it only to the current\n browser.\n\n See the `Implicit wait` section above for more information.\n\n Example:\n | ${orig wait} = | `Set Selenium Implicit Wait` | 10 seconds |\n | `Perform AJAX call that is slow` |\n | `Set Selenium Implicit Wait` | ${orig wait} |\n ", + "sha256": "1df9421daaba885bd06552d7b62030b285ac8472b98e09e0719554fd2448547c" + }, + "set_selenium_page_load_timeout": { + "name": "set_selenium_page_load_timeout", + "doc": "Sets the page load timeout value used by Selenium.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n In contrast to `Set Selenium Timeout` and `Set Selenium Implicit Wait`,\n this keywords sets the time for the Webdriver to wait until the page\n is loaded before raising a timeout exception.\n\n See the `Page load` section above for more information.\n\n Example:\n | ${orig page load timeout} = | `Set Selenium Page Load Timeout` | 30 seconds |\n | `Open page that loads slowly` |\n | `Set Selenium Page Load Timeout` | ${orig page load timeout} |\n\n New in SeleniumLibrary 6.1\n ", + "sha256": "37e2b5f6af58ce3b2e1d520c0c2d56b99cadf175dd31f1ccfb05de36c8cfdab0" + }, + "set_selenium_speed": { + "name": "set_selenium_speed", + "doc": "Sets the delay that is waited after each Selenium command.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n See the `Selenium Speed` section above for more information.\n\n Example:\n | `Set Selenium Speed` | 0.5 seconds |\n ", + "sha256": "143bd7c58689c676a711dcf2571cfdd8ee609325264bd632db2945dce3300ae5" + }, + "set_selenium_timeout": { + "name": "set_selenium_timeout", + "doc": "Sets the timeout that is used by various keywords.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n See the `Timeout` section above for more information.\n\n Example:\n | ${orig timeout} = | `Set Selenium Timeout` | 15 seconds |\n | `Open page that loads slowly` |\n | `Set Selenium Timeout` | ${orig timeout} |\n ", + "sha256": "6e78114e0e60f0148629589b897d6a67b1c492317eb883b2ca4f3c6457a5d01b" + }, + "switch_browser": { + "name": "switch_browser", + "doc": "Switches between active browsers using ``index_or_alias``.\n\n Indices are returned by the `Open Browser` keyword and aliases can\n be given to it explicitly. Indices start from 1.\n\n Example:\n | `Open Browser` | http://google.com | ff |\n | `Location Should Be` | http://google.com | |\n | `Open Browser` | http://yahoo.com | ie | alias=second |\n | `Location Should Be` | http://yahoo.com | |\n | `Switch Browser` | 1 | # index |\n | `Page Should Contain` | I'm feeling lucky | |\n | `Switch Browser` | second | # alias |\n | `Page Should Contain` | More Yahoo! | |\n | `Close All Browsers` | | |\n\n Above example expects that there was no other open browsers when\n opening the first one because it used index ``1`` when switching to\n it later. If you are not sure about that, you can store the index\n into a variable as below.\n\n | ${index} = | `Open Browser` | http://google.com |\n | # Do something ... | | |\n | `Switch Browser` | ${index} | |\n ", + "sha256": "de918f9e83ebecafb37ba3704649efb39dfbf405960597e1e99dddffdf69c1fb" + }, + "title_should_be": { + "name": "title_should_be", + "doc": "Verifies that the current page title equals ``title``.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.1.\n ", + "sha256": "f3ed755ed3bdbb8e7b334bce951620ceb83c3aca1cad51a31b2eea42260e1199" + }, + "add_cookie": { + "name": "add_cookie", + "doc": "Adds a cookie to your current session.\n\n ``name`` and ``value`` are required, ``path``, ``domain``, ``secure``\n and ``expiry`` are optional. Expiry supports the same formats as\n the [http://robotframework.org/robotframework/latest/libraries/DateTime.html|DateTime]\n library or an epoch timestamp.\n\n Example:\n | `Add Cookie` | foo | bar | |\n | `Add Cookie` | foo | bar | domain=example.com |\n | `Add Cookie` | foo | bar | expiry=2027-09-28 16:21:35 | # Expiry as timestamp. |\n | `Add Cookie` | foo | bar | expiry=1822137695 | # Expiry as epoch seconds. |\n\n Prior to SeleniumLibrary 3.0 setting expiry did not work.\n ", + "sha256": "4824fdf8e69148f3f74ed2a177fc4417caa1b7d24b5fd55378e8cdbd3ace04a5" + }, + "delete_all_cookies": { + "name": "delete_all_cookies", + "doc": "Deletes all cookies.", + "sha256": "3300bc6758bd113107fb425664eacbda4143514393c4d4197ac28626592b77c5" + }, + "delete_cookie": { + "name": "delete_cookie", + "doc": "Deletes the cookie matching ``name``.\n\n If the cookie is not found, nothing happens.\n ", + "sha256": "9f69becc9575a4dc10a09bebdcb7405fbfba883c8268c889baca4659ba549d04" + }, + "get_cookie": { + "name": "get_cookie", + "doc": "Returns information of cookie with ``name`` as an object.\n\n If no cookie is found with ``name``, keyword fails. The cookie object\n contains details about the cookie. Attributes available in the object\n are documented in the table below.\n\n | = Attribute = | = Explanation = |\n | name | The name of a cookie. |\n | value | Value of the cookie. |\n | path | Indicates a URL path, for example ``/``. |\n | domain | The domain, the cookie is visible to. |\n | secure | When true, the cookie is only used with HTTPS connections. |\n | httpOnly | When true, the cookie is not accessible via JavaScript. |\n | expiry | Python datetime object indicating when the cookie expires. |\n | extra | Possible attributes outside of the WebDriver specification |\n\n See the\n [https://w3c.github.io/webdriver/#cookies|WebDriver specification]\n for details about the cookie information.\n Notice that ``expiry`` is specified as a\n [https://docs.python.org/3/library/datetime.html#datetime.datetime|datetime object],\n not as seconds since Unix Epoch like WebDriver natively does.\n\n In some cases, example when running a browser in the cloud, it is possible that\n the cookie contains other attributes than is defined in the\n [https://w3c.github.io/webdriver/#cookies|WebDriver specification].\n These other attributes are available in an ``extra`` attribute in the cookie\n object and it contains a dictionary of the other attributes. The ``extra``\n attribute is new in SeleniumLibrary 4.0.\n\n Example:\n | `Add Cookie` | foo | bar |\n | ${cookie} = | `Get Cookie` | foo |\n | `Should Be Equal` | ${cookie.name} | foo |\n | `Should Be Equal` | ${cookie.value} | bar |\n | `Should Be True` | ${cookie.expiry.year} > 2017 |\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "747951f772be34600739a36f99d276499abc5137ddb8994e1773b68cc7c2e05b" + }, + "get_cookies": { + "name": "get_cookies", + "doc": "Returns all cookies of the current page.\n\n If ``as_dict`` argument evaluates as false, see `Boolean arguments`\n for more details, then cookie information is returned as\n a single string in format ``name1=value1; name2=value2; name3=value3``.\n When ``as_dict`` argument evaluates as true, cookie information\n is returned as Robot Framework dictionary format. The string format\n can be used, for example, for logging purposes or in headers when\n sending HTTP requests. The dictionary format is helpful when\n the result can be passed to requests library's Create Session\n keyword's optional cookies parameter.\n\n The `` as_dict`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "7a9bda6590cdb1aa8825e385ffefc087a7ca087936dd11350d6234e6e2c05e6c" + }, + "add_location_strategy": { + "name": "add_location_strategy", + "doc": "Adds a custom location strategy.\n\n See `Custom locators` for information on how to create and use\n custom strategies. `Remove Location Strategy` can be used to\n remove a registered strategy.\n\n Location strategies are automatically removed after leaving the\n current scope by default. Setting ``persist`` to a true value (see\n `Boolean arguments`) will cause the location strategy to stay\n registered throughout the life of the test.\n ", + "sha256": "046e816fd4d028592aaa9146fd815aec20809f88d4160fdf166fb19d5fdcfa0c" + }, + "assign_id_to_element": { + "name": "assign_id_to_element", + "doc": "Assigns a temporary ``id`` to the element specified by ``locator``.\n\n This is mainly useful if the locator is complicated and/or slow XPath\n expression and it is needed multiple times. Identifier expires when\n the page is reloaded.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | `Assign ID to Element` | //ul[@class='example' and ./li[contains(., 'Stuff')]] | my id |\n | `Page Should Contain Element` | my id |\n ", + "sha256": "2ce9ab7a44154be53f32d6d6e8b1b6e9dd8bbff880048c99ed4b62763a0b522c" + }, + "clear_element_text": { + "name": "clear_element_text", + "doc": "Clears the value of the text-input-element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "31d7803b76e63ff90ff333f06e323aba4f820632b8795d51d24242fb65f4e7d2" + }, + "click_button": { + "name": "click_button", + "doc": "Clicks the button identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "72dcaeaa3bc1a4e14c596d72a19cbd82e0881732440153cbfb27272b2066dd77" + }, + "click_element": { + "name": "click_element", + "doc": "Click the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``modifier`` argument can be used to pass\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys|Selenium Keys]\n when clicking the element. The `+` can be used as a separator\n for different Selenium Keys. The `CTRL` is internally translated to\n the `CONTROL` key. The ``modifier`` is space and case insensitive, example\n \"alt\" and \" aLt \" are supported formats to\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ALT|ALT key]\n . If ``modifier`` does not match to Selenium Keys, keyword fails.\n\n If ``action_chain`` argument is true, see `Boolean arguments` for more\n details on how to set boolean argument, then keyword uses ActionChain\n based click instead of the .click() function. If both\n ``action_chain`` and ``modifier`` are defined, the click will be\n performed using ``modifier`` and ``action_chain`` will be ignored.\n\n Example:\n | Click Element | id:button | | # Would click element without any modifiers. |\n | Click Element | id:button | CTRL | # Would click element with CTLR key pressed down. |\n | Click Element | id:button | CTRL+ALT | # Would click element with CTLR and ALT keys pressed down. |\n | Click Element | id:button | action_chain=True | # Clicks the button using an Selenium ActionChains |\n\n The ``modifier`` argument is new in SeleniumLibrary 3.2\n The ``action_chain`` argument is new in SeleniumLibrary 4.1\n ", + "sha256": "5099da1ff98ae3351fb740f301498066e1f86b8f9a6ef7f178e2b29d5d5afb35" + }, + "click_element_at_coordinates": { + "name": "click_element_at_coordinates", + "doc": "Click the element ``locator`` at ``xoffset/yoffset``.\n\n The Cursor is moved and the center of the element and x/y coordinates are\n calculated from that point.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "6c9be5ef41acf068a8ecf3972fe88f5f9c5257cf843d014dd9a76f7b4a3719c7" + }, + "click_image": { + "name": "click_image", + "doc": "Clicks an image identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "a83623f5affb23d6a089b6cab14e9983dd55eba3b11deedf672c6d2c3d387cf4" + }, + "click_link": { + "name": "click_link", + "doc": "Clicks a link identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "d8c5ec4c5359fed7c6a5094f5d18e8766b4dfb6f4e4d5ea1d61d50b7b09e7c31" + }, + "cover_element": { + "name": "cover_element", + "doc": "Will cover elements identified by ``locator`` with a blue div without breaking page layout.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.3.0\n\n Example:\n |`Cover Element` | css:div#container |\n ", + "sha256": "0dd30bea744e70b71f3e5fc5358833c291d404cdfa23970d09ece25f2380fb28" + }, + "double_click_element": { + "name": "double_click_element", + "doc": "Double clicks the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "c7b11722014178d683d80e276fcea367307d1d4cbe3b93b17cbbbe30b35b7174" + }, + "drag_and_drop": { + "name": "drag_and_drop", + "doc": "Drags the element identified by ``locator`` into the ``target`` element.\n\n The ``locator`` argument is the locator of the dragged element\n and the ``target`` is the locator of the target. See the\n `Locating elements` section for details about the locator syntax.\n\n Example:\n | `Drag And Drop` | css:div#element | css:div.target |\n ", + "sha256": "af13a511a462a2540dc93baf3bc42d05143aaf0de6ce9771029044a25b40bd64" + }, + "drag_and_drop_by_offset": { + "name": "drag_and_drop_by_offset", + "doc": "Drags the element identified with ``locator`` by ``xoffset/yoffset``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The element will be moved by ``xoffset`` and ``yoffset``, each of which\n is a negative or positive number specifying the offset.\n\n Example:\n | `Drag And Drop By Offset` | myElem | 50 | -35 | # Move myElem 50px right and 35px down |\n ", + "sha256": "89750f538dc14ca0c04fbe1a3aba732352f9723d658bbd971905003ee9c351f6" + }, + "element_attribute_value_should_be": { + "name": "element_attribute_value_should_be", + "doc": "Verifies element identified by ``locator`` contains expected attribute value.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n `Element Attribute Value Should Be` | css:img | href | value\n\n New in SeleniumLibrary 3.2.\n ", + "sha256": "330701ee8d3307c6543bdfeafa649d14689f639f2e139e499aae8ec495d7d015" + }, + "element_should_be_disabled": { + "name": "element_should_be_disabled", + "doc": "Verifies that element identified by ``locator`` is disabled.\n\n This keyword considers also elements that are read-only to be\n disabled.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "6f34019f6e68805c2b73ef5207b424743c9461dfd30061f163d21948304bb012" + }, + "element_should_be_enabled": { + "name": "element_should_be_enabled", + "doc": "Verifies that element identified by ``locator`` is enabled.\n\n This keyword considers also elements that are read-only to be\n disabled.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "014f8538093bdcef0ed8c7a13020ae513a4a14bd2d0b71f1843de951f5c7b5d3" + }, + "element_should_be_focused": { + "name": "element_should_be_focused", + "doc": "Verifies that element identified by ``locator`` is focused.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "f327420520f06421e0a11062af115eaa7bb3eaf97a0ae4b6f02c0c82c9fa1f73" + }, + "element_should_be_visible": { + "name": "element_should_be_visible", + "doc": "Verifies that the element identified by ``locator`` is visible.\n\n Herein, visible means that the element is logically visible, not\n optically visible in the current browser viewport. For example,\n an element that carries ``display:none`` is not logically visible,\n so using this keyword on that element would fail.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n ", + "sha256": "98c4fb9d0b90e73c3d702b553aa6a30f027320463eb18e298cd5b9133f1cc36a" + }, + "element_should_contain": { + "name": "element_should_contain", + "doc": "Verifies that element ``locator`` contains text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False. New in SeleniumLibrary 3.1.\n\n ``ignore_case`` argument is new in SeleniumLibrary 3.1.\n\n Use `Element Text Should Be` if you want to match the exact text,\n not a substring.\n ", + "sha256": "998a924785fef84597b5e5fc866f4c5d7e4b0a753cba68d15be0f3b44588c06d" + }, + "element_should_not_be_visible": { + "name": "element_should_not_be_visible", + "doc": "Verifies that the element identified by ``locator`` is NOT visible.\n\n Passes if the element does not exists. See `Element Should Be Visible`\n for more information about visibility and supported arguments.\n ", + "sha256": "811779774da3cf876101661d4c15a6e89ea0568493be61b19fded7a0bd40f0c4" + }, + "element_should_not_contain": { + "name": "element_should_not_contain", + "doc": "Verifies that element ``locator`` does not contain text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n ``ignore_case`` argument new in SeleniumLibrary 3.1.\n ", + "sha256": "ef9492bae813b1597fabc9d6f02a21c05ff736a18fb6eb20fb81e6ca40011437" + }, + "element_text_should_be": { + "name": "element_text_should_be", + "doc": "Verifies that element ``locator`` contains exact the text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n ``ignore_case`` argument is new in SeleniumLibrary 3.1.\n\n Use `Element Should Contain` if a substring match is desired.\n ", + "sha256": "4036c0bb4fe36085fcab4421f3ffb65265d70d8cb852106ea13a983438a77723" + }, + "element_text_should_not_be": { + "name": "element_text_should_not_be", + "doc": "Verifies that element ``locator`` does not contain exact the text ``not_expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n New in SeleniumLibrary 3.1.1\n ", + "sha256": "67821af845f34ba19ebffb38fa558c375f7261e3d9c9f04cb653bad828e99cf4" + }, + "get_all_links": { + "name": "get_all_links", + "doc": "Returns a list containing ids of all links found in current page.\n\n If a link has no id, an empty string will be in the list instead.\n ", + "sha256": "f17319af1acc205f3ee5fe01b5e8960bba45ff05629b4b1d2e4fdec770163c1a" + }, + "get_dom_attribute": { + "name": "get_dom_attribute", + "doc": "Returns the value of ``attribute`` from the element ``locator``. `Get DOM Attribute` keyword\n only returns attributes declared within the element's HTML markup. If the requested attribute\n is not there, the keyword returns ${None}.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${id}= | `Get DOM Attribute` | css:h1 | id |\n\n ", + "sha256": "1337e3b21fae3759b85da9dba5fda08378fd8ea4ff16b9d9a03fa54f1d75853f" + }, + "get_element_attribute": { + "name": "get_element_attribute", + "doc": "Returns the value of ``attribute`` from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${id}= | `Get Element Attribute` | css:h1 | id |\n\n Passing attribute name as part of the ``locator`` was removed\n in SeleniumLibrary 3.2. The explicit ``attribute`` argument\n should be used instead.\n ", + "sha256": "3325a9affcfb67bbb11b250a7479d125f3a7c0ca3e6b4772b35f873c6942a300" + }, + "get_element_count": { + "name": "get_element_count", + "doc": "Returns the number of elements matching ``locator``.\n\n If you wish to assert the number of matching elements, use\n `Page Should Contain Element` with ``limit`` argument. Keyword will\n always return an integer.\n\n Example:\n | ${count} = | `Get Element Count` | name:div_name |\n | `Should Be True` | ${count} > 2 | |\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "edc00542de29af7b4b11d459c21c6a8f87fd21233f49c1b9a5b4d8e06d0128f8" + }, + "get_element_size": { + "name": "get_element_size", + "doc": "Returns width and height of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Both width and height are returned as integers.\n\n Example:\n | ${width} | ${height} = | `Get Element Size` | css:div#container |\n ", + "sha256": "d1dc235938760fc871c68838032587be56a8ebb13dc295f68e9df6a03c72d266" + }, + "get_horizontal_position": { + "name": "get_horizontal_position", + "doc": "Returns the horizontal position of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The position is returned in pixels off the left side of the page,\n as an integer.\n\n See also `Get Vertical Position`.\n ", + "sha256": "7b81ffe406d7708e72861971ec879a7cdb3adff3cf3a6ad4c816c0b36de84a79" + }, + "get_property": { + "name": "get_property", + "doc": "Returns the value of ``property`` from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${text_length}= | `Get Property` | css:h1 | text_length |\n\n ", + "sha256": "6335a05f73d42212f78d4285872595fec96dbb4e669b8026b2e9bdab4f3284eb" + }, + "get_text": { + "name": "get_text", + "doc": "Returns the text value of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "c5df21cb13fca76338626c63ce4e0e83be2e5563eb296833f55678c3424ad333" + }, + "get_value": { + "name": "get_value", + "doc": "Returns the value attribute of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5856fe53c0581268a5a395418f08aedb118762d5ec8fbd553cf2d44b82aa27c6" + }, + "get_vertical_position": { + "name": "get_vertical_position", + "doc": "Returns the vertical position of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The position is returned in pixels off the top of the page,\n as an integer.\n\n See also `Get Horizontal Position`.\n ", + "sha256": "a1f1cc8075b6323bf4b900ea52357586f28721239e45ec11fb1a130faa9246c0" + }, + "get_webelement": { + "name": "get_webelement", + "doc": "Returns the first WebElement matching the given ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5deaaabc9162680121dbe744d4e476e40c7eacba17922459c209f211ba74b5cd" + }, + "get_webelements": { + "name": "get_webelements", + "doc": "Returns a list of WebElement objects matching the ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Starting from SeleniumLibrary 3.0, the keyword returns an empty\n list if there are no matching elements. In previous releases, the\n keyword failed in this case.\n ", + "sha256": "ab7b4634b7c54b2b17daf4c290704fe45af948eeff41f9dbc1c01fab33273496" + }, + "mouse_down": { + "name": "mouse_down", + "doc": "Simulates pressing the left mouse button on the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The element is pressed without releasing the mouse button.\n\n See also the more specific keywords `Mouse Down On Image` and\n `Mouse Down On Link`.\n ", + "sha256": "c0e5431b9b9eb6875830eadccc1ed0f9a9d34781ecef40ab059194054eeae9e4" + }, + "mouse_down_on_image": { + "name": "mouse_down_on_image", + "doc": "Simulates a mouse down event on an image identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n ", + "sha256": "3b7c0b9a83908e60012f095acc71305c853dd07864497077420f1a3930ea144c" + }, + "mouse_down_on_link": { + "name": "mouse_down_on_link", + "doc": "Simulates a mouse down event on a link identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n ", + "sha256": "8ef3134ef374ebc89f76985b09abd2caac10f603e8db38cf78dcbac9c826cc3e" + }, + "mouse_out": { + "name": "mouse_out", + "doc": "Simulates moving the mouse away from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "835368b635d5d1c5c50250595a8e7cb2feb9eb4af4fa14753c561a9c35894db1" + }, + "mouse_over": { + "name": "mouse_over", + "doc": "Simulates hovering the mouse over the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "b4c14a2a10cfddb07d7748630ba6546991d3da2311a20aa146685a0f78e41241" + }, + "mouse_up": { + "name": "mouse_up", + "doc": "Simulates releasing the left mouse button on the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "47c3666126bc84aa9104f6137fd51817efcd1804aaf7c965df143a6aad71895a" + }, + "open_context_menu": { + "name": "open_context_menu", + "doc": "Opens the context menu on the element identified by ``locator``.", + "sha256": "8cb9023a05753eb5cc230116dec98188b5bdfac0b94955b69957726131189493" + }, + "page_should_contain": { + "name": "page_should_contain", + "doc": "Verifies that current page contains ``text``.\n\n If this keyword fails, it automatically logs the page source\n using the log level specified with the optional ``loglevel``\n argument. Valid log levels are ``TRACE`` (default), ``DEBUG``,\n ``INFO``, ``WARN``, and ``NONE``. If the log level is ``NONE``\n or below the current active log level the source will not be logged.\n\n !! WARNING !! If you have an iframe selected, `Page Should Contain`\n will reset the frame reference back to the main frame. This is due\n to the fact that is searches for the ``text`` in all frames. To locate\n an element in an iframe after calling `Page Should Contian` one needs\n to (re)select the frame.\n ", + "sha256": "bb1186dbfae09e52cad4cad8def5bf2980085e48f75b6af2330bcd4da67477af" + }, + "page_should_contain_element": { + "name": "page_should_contain_element", + "doc": "Verifies that element ``locator`` is found on the current page.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``limit`` argument can used to define how many elements the\n page should contain. When ``limit`` is ``None`` (default) page can\n contain one or more elements. When limit is a number, page must\n contain same number of elements.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n\n Examples assumes that locator matches to two elements.\n | `Page Should Contain Element` | div_name | limit=1 | # Keyword fails. |\n | `Page Should Contain Element` | div_name | limit=2 | # Keyword passes. |\n | `Page Should Contain Element` | div_name | limit=none | # None is considered one or more. |\n | `Page Should Contain Element` | div_name | | # Same as above. |\n\n The ``limit`` argument is new in SeleniumLibrary 3.0.\n ", + "sha256": "d2c24d9ce997c94b3cd391306893b9d864c389a047c274ca1ab323e51f960f8e" + }, + "page_should_contain_image": { + "name": "page_should_contain_image", + "doc": "Verifies image identified by ``locator`` is found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "84ab3a648d3b18c5e266ba075408f3cb2ac3b736e1e2009a6cca125de5d07a50" + }, + "page_should_contain_link": { + "name": "page_should_contain_link", + "doc": "Verifies link identified by ``locator`` is found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "005f6565f4fcd9b91f87a2274c32fae7545619549be26f23b2cc06856e44ecba" + }, + "page_should_not_contain": { + "name": "page_should_not_contain", + "doc": "Verifies the current page does not contain ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "72389be32f084ed5a3716a32e833e117c419bc2c6ebfa525a79e69054bb2a8cc" + }, + "page_should_not_contain_element": { + "name": "page_should_not_contain_element", + "doc": "Verifies that element ``locator`` is not found on the current page.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n See `Page Should Contain` for an explanation about ``message`` and\n ``loglevel`` arguments.\n ", + "sha256": "3939f5d1fce87d85f013ae3e4327b50404cf832231d4ca2e677013808ee8ff92" + }, + "page_should_not_contain_image": { + "name": "page_should_not_contain_image", + "doc": "Verifies image identified by ``locator`` is not found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "7367c4581992c47a2fbd74fd0beccc254e883879f6b93f206242d0ecb6397448" + }, + "page_should_not_contain_link": { + "name": "page_should_not_contain_link", + "doc": "Verifies link identified by ``locator`` is not found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "61fca3076c7b671f21528f5d141ee7b43ecc1acada608b4157d08ecb38fae0e1" + }, + "press_key": { + "name": "press_key", + "doc": "Simulates user pressing key on element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n ``key`` is either a single character, a string, or a numerical ASCII\n code of the key lead by '\\'.\n\n Examples:\n | `Press Key` | text_field | q |\n | `Press Key` | text_field | abcde |\n | `Press Key` | login_button | \\13 | # ASCII code for enter key |\n\n `Press Key` and `Press Keys` differ in the methods to simulate key\n presses. `Press Key` uses the WebDriver `SEND_KEYS_TO_ELEMENT` command\n using the selenium send_keys method. Although one is not recommended\n over the other if `Press Key` does not work we recommend trying\n `Press Keys`.\n send_\n ", + "sha256": "fd4035762f6f532aed3cd2b93ad24002a51503e8a86cd7da956a3e2cf8a1038d" + }, + "press_keys": { + "name": "press_keys", + "doc": "Simulates the user pressing key(s) to an element or on the active browser.\n\n If ``locator`` evaluates as false, see `Boolean arguments` for more\n details, then the ``keys`` are sent to the currently active browser.\n Otherwise element is searched and ``keys`` are send to the element\n identified by the ``locator``. In later case, keyword fails if element\n is not found. See the `Locating elements` section for details about\n the locator syntax.\n\n ``keys`` arguments can contain one or many strings, but it can not\n be empty. ``keys`` can also be a combination of\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html|Selenium Keys]\n and strings or a single Selenium Key. If Selenium Key is combined\n with strings, Selenium key and strings must be separated by the\n `+` character, like in `CONTROL+c`. Selenium Keys\n are space and case sensitive and Selenium Keys are not parsed\n inside of the string. Example AALTO, would send string `AALTO`\n and `ALT` not parsed inside of the string. But `A+ALT+O` would\n found Selenium ALT key from the ``keys`` argument. It also possible\n to press many Selenium Keys down at the same time, example\n 'ALT+ARROW_DOWN`.\n\n If Selenium Keys are detected in the ``keys`` argument, keyword\n will press the Selenium Key down, send the strings and\n then release the Selenium Key. If keyword needs to send a Selenium\n Key as a string, then each character must be separated with\n `+` character, example `E+N+D`.\n\n `CTRL` is alias for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.CONTROL|Selenium CONTROL]\n and ESC is alias for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ESCAPE|Selenium ESCAPE]\n\n New in SeleniumLibrary 3.3\n\n Examples:\n | `Press Keys` | text_field | AAAAA | | # Sends string \"AAAAA\" to element. |\n | `Press Keys` | None | BBBBB | | # Sends string \"BBBBB\" to currently active browser. |\n | `Press Keys` | text_field | E+N+D | | # Sends string \"END\" to element. |\n | `Press Keys` | text_field | XXX | YY | # Sends strings \"XXX\" and \"YY\" to element. |\n | `Press Keys` | text_field | XXX+YY | | # Same as above. |\n | `Press Keys` | text_field | ALT+ARROW_DOWN | | # Pressing \"ALT\" key down, then pressing ARROW_DOWN and then releasing both keys. |\n | `Press Keys` | text_field | ALT | ARROW_DOWN | # Pressing \"ALT\" key and then pressing ARROW_DOWN. |\n | `Press Keys` | text_field | CTRL+c | | # Pressing CTRL key down, sends string \"c\" and then releases CTRL key. |\n | `Press Keys` | button | RETURN | | # Pressing \"ENTER\" key to element. |\n\n `Press Key` and `Press Keys` differ in the methods to simulate key\n presses. `Press Keys` uses the Selenium/WebDriver Actions.\n `Press Keys` also has a more extensive syntax for describing keys,\n key combinations, and key actions. Although one is not recommended\n over the other if `Press Keys` does not work we recommend trying\n `Press Key`.\n ", + "sha256": "549b119394b8f48407c11208e1f38c3f2c753e9a40b5c6f1f47b3320df3f3612" + }, + "remove_location_strategy": { + "name": "remove_location_strategy", + "doc": "Removes a previously added custom location strategy.\n\n See `Custom locators` for information on how to create and use\n custom strategies.\n ", + "sha256": "827184ef194cec97d793297edbc6544d2e6774a80a14136ccfa0d5cc04fbc09e" + }, + "scroll_element_into_view": { + "name": "scroll_element_into_view", + "doc": "Scrolls the element identified by ``locator`` into view.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.2.0\n ", + "sha256": "0d567a31d5b64fcfb38b47c2f5f452de4fbe3d08aa0c0547644d4c59b243ef60" + }, + "set_focus_to_element": { + "name": "set_focus_to_element", + "doc": "Sets the focus to the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Prior to SeleniumLibrary 3.0 this keyword was named `Focus`.\n ", + "sha256": "0b02399995113cd6ac38557106b4697e4d86f9874173ed593a8853e63362c74f" + }, + "simulate_event": { + "name": "simulate_event", + "doc": "Simulates ``event`` on the element identified by ``locator``.\n\n This keyword is useful if element has ``OnEvent`` handler that\n needs to be explicitly invoked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Prior to SeleniumLibrary 3.0 this keyword was named `Simulate`.\n ", + "sha256": "49cd268150ae4f3170f13d6b5a25809f41080efa3f3b5ca0fa2e2d8cd3ea7795" + }, + "wait_for_expected_condition": { + "name": "wait_for_expected_condition", + "doc": "Waits until ``condition`` is true or ``timeout`` expires.\n\n The condition must be one of selenium's expected condition which\n can be found within the selenium\n [https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions|Python API]\n documentation. The expected condition can written as snake_case\n (ex title_is) or it can be space delimited (ex Title Is). Some\n conditions require additional arguments or ``args`` which should\n be passed along after the expected condition.\n\n Fails if the timeout expires before the condition becomes true.\n The default value is 10 seconds.\n\n Examples:\n | `Wait For Expected Condition` | alert_is_present |\n | `Wait For Expected Condition` | Title Is | New Title |\n\n If the expected condition expects a locator then one can pass\n as arguments a tuple containing the selenium locator strategies\n and the locator.\n\n Example of expected condition expecting locator:\n | ${byElem}= | Evaluate (\"id\",\"added_btn\")\n | `Wait For Expected Condition` | Presence Of Element Located | ${byElem}\n ", + "sha256": "7e512f1e3c97525aa828d624627aaf3f8b76ac0ec1aaa507b36ff9c8fff34d5a" + }, + "checkbox_should_be_selected": { + "name": "checkbox_should_be_selected", + "doc": "Verifies checkbox ``locator`` is selected/checked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "e50bf6856c0f0c3f373adb3bcc3b7d677738088632055f507797887c9f822136" + }, + "checkbox_should_not_be_selected": { + "name": "checkbox_should_not_be_selected", + "doc": "Verifies checkbox ``locator`` is not selected/checked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "8488752a0365d5c94b3a7885d53b67f99d92ccc5687fdc59411b42a40fa95443" + }, + "choose_file": { + "name": "choose_file", + "doc": "Inputs the ``file_path`` into the file input field ``locator``.\n\n This keyword is most often used to input files into upload forms.\n The keyword does not check ``file_path`` is the file or folder\n available on the machine where tests are executed. If the ``file_path``\n points at a file and when using Selenium Grid, Selenium will\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.command.html?highlight=upload#selenium.webdriver.remote.command.Command.UPLOAD_FILE|magically],\n transfer the file from the machine where the tests are executed\n to the Selenium Grid node where the browser is running.\n Then Selenium will send the file path, from the nodes file\n system, to the browser.\n\n That ``file_path`` is not checked, is new in SeleniumLibrary 4.0.\n\n Example:\n | `Choose File` | my_upload_field | ${CURDIR}/trades.csv |\n ", + "sha256": "244543282ef6c62ec448fb42ed37706978ecf84aec27a9c7774fdd39bc84697c" + }, + "input_password": { + "name": "input_password", + "doc": "Types the given password into the text field identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. See `Input Text` for ``clear`` argument details.\n\n Difference compared to `Input Text` is that this keyword does not\n log the given password on the INFO level. Notice that if you use\n the keyword like\n\n | Input Password | password_field | password |\n\n the password is shown as a normal keyword argument. A way to avoid\n that is using variables like\n\n | Input Password | password_field | ${PASSWORD} |\n\n Please notice that Robot Framework logs all arguments using\n the TRACE level and tests must not be executed using level below\n DEBUG if the password should not be logged in any format.\n\n The `clear` argument is new in SeleniumLibrary 4.0. Hiding password\n logging from Selenium logs is new in SeleniumLibrary 4.2.\n ", + "sha256": "2471a62ea46d3d4815fe3700c92b61bd4abee39926bc4dadeb072bb88ba69fd5" + }, + "input_text": { + "name": "input_text", + "doc": "Types the given ``text`` into the text field identified by ``locator``.\n\n When ``clear`` is true, the input element is cleared before\n the text is typed into the element. When false, the previous text\n is not cleared from the element. Use `Input Password` if you\n do not want the given ``text`` to be logged.\n\n If [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid]\n is used and the ``text`` argument points to a file in the file system,\n then this keyword prevents the Selenium to transfer the file to the\n Selenium Grid hub. Instead, this keyword will send the ``text`` string\n as is to the element. If a file should be transferred to the hub and\n upload should be performed, please use `Choose File` keyword.\n\n See the `Locating elements` section for details about the locator\n syntax. See the `Boolean arguments` section how Boolean values are\n handled.\n\n Disabling the file upload the Selenium Grid node and the `clear`\n argument are new in SeleniumLibrary 4.0\n ", + "sha256": "77be02dfff6bb6cc9d97af190e48a4c333913ca5058e67c85a4055bb84a9f494" + }, + "page_should_contain_button": { + "name": "page_should_contain_button", + "doc": "Verifies button ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n ", + "sha256": "f5fdc2763607b8a19e0dcbc2c8bc0512959193b4312232d89bdf5e3c1287ee25" + }, + "page_should_contain_checkbox": { + "name": "page_should_contain_checkbox", + "doc": "Verifies checkbox ``locator`` is found from the current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "827b0517772c7f3d0a8c9c41a1557892b98f0c9ee7228aa80a17df7d1766b338" + }, + "page_should_contain_radio_button": { + "name": "page_should_contain_radio_button", + "doc": "Verifies radio button ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, radio buttons are\n searched using ``id``, ``name`` and ``value``.\n ", + "sha256": "a1bd5c4a731ebb21b599006d59a7c7d163da5fb64ca87ac20d853559ff948a95" + }, + "page_should_contain_textfield": { + "name": "page_should_contain_textfield", + "doc": "Verifies text field ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7b7414371c1321271f8616d6668e9b94001ab4443df27f26fe10c5e968be00c5" + }, + "page_should_not_contain_button": { + "name": "page_should_not_contain_button", + "doc": "Verifies button ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n ", + "sha256": "c8b007d236e708e3d637b414d88b333f31bc64f396fe9034bc79be14288666ed" + }, + "page_should_not_contain_checkbox": { + "name": "page_should_not_contain_checkbox", + "doc": "Verifies checkbox ``locator`` is not found from the current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "88204d5dcc80e3fed6bfc74f5b2e02a3507d9ac290faf29c5818f54fc7c7109d" + }, + "page_should_not_contain_radio_button": { + "name": "page_should_not_contain_radio_button", + "doc": "Verifies radio button ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, radio buttons are\n searched using ``id``, ``name`` and ``value``.\n ", + "sha256": "f2310d4b57e4303ef5f38cc2cdc705ca95582a56ced04899d806beab1a63cef0" + }, + "page_should_not_contain_textfield": { + "name": "page_should_not_contain_textfield", + "doc": "Verifies text field ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2d91d04a7f6bb6ffd6fb86459718e337880326ddbba3a1631de12737ecab5339" + }, + "radio_button_should_be_set_to": { + "name": "radio_button_should_be_set_to", + "doc": "Verifies radio button group ``group_name`` is set to ``value``.\n\n ``group_name`` is the ``name`` of the radio button group.\n ", + "sha256": "baedeb274f24cfa1951591b65fd654551c128c26db397414fce039f3c2ef68cc" + }, + "radio_button_should_not_be_selected": { + "name": "radio_button_should_not_be_selected", + "doc": "Verifies radio button group ``group_name`` has no selection.\n\n ``group_name`` is the ``name`` of the radio button group.\n ", + "sha256": "552945bd4776a7545990b26941784cf5a8bd5d1725fb1ccd6241d7f4404dea0e" + }, + "select_checkbox": { + "name": "select_checkbox", + "doc": "Selects the checkbox identified by ``locator``.\n\n Does nothing if checkbox is already selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "a864b4289721b7356ee6cc8f51612cdb5b91f5e439a264380665dd3c359cf09a" + }, + "select_radio_button": { + "name": "select_radio_button", + "doc": "Sets the radio button group ``group_name`` to ``value``.\n\n The radio button to be selected is located by two arguments:\n - ``group_name`` is the name of the radio button group.\n - ``value`` is the ``id`` or ``value`` attribute of the actual\n radio button.\n\n Examples:\n | `Select Radio Button` | size | XL |\n | `Select Radio Button` | contact | email |\n ", + "sha256": "ffbddc133ea67fa89fc81c47e311a5c1c0d17de62b307fb25cb0811ebf995909" + }, + "submit_form": { + "name": "submit_form", + "doc": "Submits a form identified by ``locator``.\n\n If ``locator`` is not given, first form on the page is submitted.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "19787cfd196cb398177f114d219b7047839b1b875ad44e4741c02be1f2219fb7" + }, + "textarea_should_contain": { + "name": "textarea_should_contain", + "doc": "Verifies text area ``locator`` contains text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "1f0212530a7318d4b84aab2f76e6a786698c18553eb45f6d7b5ce1526aa8806a" + }, + "textarea_value_should_be": { + "name": "textarea_value_should_be", + "doc": "Verifies text area ``locator`` has exactly text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "351e1fbde625caa68c16d8203c380853b86f12203e2a58fe32fed5154779df55" + }, + "textfield_should_contain": { + "name": "textfield_should_contain", + "doc": "Verifies text field ``locator`` contains text ``expected``.\n\n ``message`` can be used to override the default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "8d542b446cce4ae3a59f57d2492144fa0264dc10bcc29a7a75e210368e7b24a9" + }, + "textfield_value_should_be": { + "name": "textfield_value_should_be", + "doc": "Verifies text field ``locator`` has exactly text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "bf88210c7d1673f6f28e6a5af94ecca2f23d655f0da09f31557b5d619ca4bb83" + }, + "unselect_checkbox": { + "name": "unselect_checkbox", + "doc": "Removes the selection of checkbox identified by ``locator``.\n\n Does nothing if the checkbox is not selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "73e850a91f88669d5f169f1da487263b966b34b9d5979fa7eacc353b9af6d3ad" + }, + "current_frame_should_contain": { + "name": "current_frame_should_contain", + "doc": "Verifies that the current frame contains ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n\n Prior to SeleniumLibrary 3.0 this keyword was named\n `Current Frame Contains`.\n ", + "sha256": "d42932ad52a7f5a80466c5fc70cde1994b5dc91e42d5a92d5a4c84c5952106bc" + }, + "current_frame_should_not_contain": { + "name": "current_frame_should_not_contain", + "doc": "Verifies that the current frame does not contain ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "39c919106caf859d8c436e8334ba7dbfbaaadc761810034f9c24433ef930029d" + }, + "frame_should_contain": { + "name": "frame_should_contain", + "doc": "Verifies that frame identified by ``locator`` contains ``text``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "e7cf02e4cd77e7196d87f875db7285146a629fe895b3576c9dbd33ae4ab362fd" + }, + "select_frame": { + "name": "select_frame", + "doc": "Sets frame identified by ``locator`` as the current frame.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Works both with frames and iframes. Use `Unselect Frame` to cancel\n the frame selection and return to the main frame.\n\n Example:\n | `Select Frame` | top-frame | # Select frame with id or name 'top-frame' |\n | `Click Link` | example | # Click link 'example' in the selected frame |\n | `Unselect Frame` | | # Back to main frame. |\n | `Select Frame` | //iframe[@name='xxx'] | # Select frame using xpath |\n ", + "sha256": "c2c67edf46d18644488c6395a750e293ab150011cdcdfe0741481328e01163f6" + }, + "unselect_frame": { + "name": "unselect_frame", + "doc": "Sets the main frame as the current frame.\n\n In practice cancels the previous `Select Frame` call.\n ", + "sha256": "9fc68af60f0d437e37ccc1fccb858b2c6554427f3f269518d4e7f849df3c43ec" + }, + "execute_async_javascript": { + "name": "execute_async_javascript", + "doc": "Executes asynchronous JavaScript code with possible arguments.\n\n Similar to `Execute Javascript` except that scripts executed with\n this keyword must explicitly signal they are finished by invoking the\n provided callback. This callback is always injected into the executed\n function as the last argument.\n\n Scripts must complete within the script timeout or this keyword will\n fail. See the `Timeout` section for more information.\n\n Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_async_script|\n arguments] as part of ``code`` argument. See `Execute Javascript` for\n more details.\n\n Examples:\n | `Execute Async JavaScript` | var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 2000); |\n | `Execute Async JavaScript` | ${CURDIR}/async_js_to_execute.js |\n | ${result} = | `Execute Async JavaScript` |\n | ... | var callback = arguments[arguments.length - 1]; |\n | ... | function answer(){callback(\"text\");}; |\n | ... | window.setTimeout(answer, 2000); |\n | `Should Be Equal` | ${result} | text |\n ", + "sha256": "a67bddb89758620a690da6f26a06985d8a546d32da40a6509296e93dc1f68c51" + }, + "execute_javascript": { + "name": "execute_javascript", + "doc": "Executes the given JavaScript code with possible arguments.\n\n ``code`` may be divided into multiple cells in the test data and\n ``code`` may contain multiple lines of code and arguments. In that case,\n the JavaScript code parts are concatenated together without adding\n spaces and optional arguments are separated from ``code``.\n\n If ``code`` is a path to an existing file, the JavaScript\n to execute will be read from that file. Forward slashes work as\n a path separator on all operating systems.\n\n The JavaScript executes in the context of the currently selected\n frame or window as the body of an anonymous function. Use ``window``\n to refer to the window of your application and ``document`` to refer\n to the document object of the current frame or window, e.g.\n ``document.getElementById('example')``.\n\n This keyword returns whatever the executed JavaScript code returns.\n Return values are converted to the appropriate Python types.\n\n Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_script|\n arguments] as part of ``code`` argument. The JavaScript code and\n arguments must be separated with `JAVASCRIPT` and `ARGUMENTS` markers\n and must be used exactly with this format. If the Javascript code is\n first, then the `JAVASCRIPT` marker is optional. The order of\n `JAVASCRIPT` and `ARGUMENTS` markers can be swapped, but if `ARGUMENTS`\n is the first marker, then `JAVASCRIPT` marker is mandatory. It is only\n allowed to use `JAVASCRIPT` and `ARGUMENTS` markers only one time in the\n ``code`` argument.\n\n Examples:\n | `Execute JavaScript` | window.myFunc('arg1', 'arg2') |\n | `Execute JavaScript` | ${CURDIR}/js_to_execute.js |\n | `Execute JavaScript` | alert(arguments[0]); | ARGUMENTS | 123 |\n | `Execute JavaScript` | ARGUMENTS | 123 | JAVASCRIPT | alert(arguments[0]); |\n ", + "sha256": "5037e85a542b11eebcf4a3fd0b9eae560f17cd117b7fdfc9c7148c9091b44cc4" + }, + "register_keyword_to_run_on_failure": { + "name": "register_keyword_to_run_on_failure", + "doc": "Sets the keyword to execute, when a SeleniumLibrary keyword fails.\n\n ``keyword`` is the name of a keyword that will be executed if a\n SeleniumLibrary keyword fails. It is possible to use any available\n keyword, including user keywords or keywords from other libraries,\n but the keyword must not take any arguments.\n\n The initial keyword to use is set when `importing` the library, and\n the keyword that is used by default is `Capture Page Screenshot`.\n Taking a screenshot when something failed is a very useful\n feature, but notice that it can slow down the execution.\n\n It is possible to use string ``NOTHING`` or ``NONE``,\n case-insensitively, as well as Python ``None`` to disable this\n feature altogether.\n\n This keyword returns the name of the previously registered\n failure keyword or Python ``None`` if this functionality was\n previously disabled. The return value can be always used to\n restore the original value later.\n\n Example:\n | `Register Keyword To Run On Failure` | Log Source |\n | ${previous kw}= | `Register Keyword To Run On Failure` | NONE |\n | `Register Keyword To Run On Failure` | ${previous kw} |\n\n Changes in SeleniumLibrary 3.0:\n - Possible to use string ``NONE`` or Python ``None`` to disable the\n functionality.\n - Return Python ``None`` when the functionality was disabled earlier.\n In previous versions special value ``No Keyword`` was returned and\n it could not be used to restore the original state.\n ", + "sha256": "9eaadf25a89adfb670897301330147203808d9cec135d82015215fe7a14c7313" + }, + "capture_element_screenshot": { + "name": "capture_element_screenshot", + "doc": "Captures a screenshot from the element identified by ``locator`` and embeds it into log file.\n\n See `Capture Page Screenshot` for details about ``filename`` argument.\n See the `Locating elements` section for details about the locator\n syntax.\n\n An absolute path to the created element screenshot is returned.\n\n Support for capturing the screenshot from an element has limited support\n among browser vendors. Please check the browser vendor driver documentation\n does the browser support capturing a screenshot from an element.\n\n New in SeleniumLibrary 3.3. Support for EMBED is new in SeleniumLibrary 4.2.\n\n Examples:\n | `Capture Element Screenshot` | id:image_id | |\n | `Capture Element Screenshot` | id:image_id | ${OUTPUTDIR}/id_image_id-1.png |\n | `Capture Element Screenshot` | id:image_id | EMBED |\n ", + "sha256": "a5dabc5a6525bca9796834b47e1fff61557439b12dd78240701233af0b95c73f" + }, + "capture_page_screenshot": { + "name": "capture_page_screenshot", + "doc": "Takes a screenshot of the current page and embeds it into a log file.\n\n ``filename`` argument specifies the name of the file to write the\n screenshot into. The directory where screenshots are saved can be\n set when `importing` the library or by using the `Set Screenshot\n Directory` keyword. If the directory is not configured, screenshots\n are saved to the same directory where Robot Framework's log file is\n written.\n\n If ``filename`` equals to EMBED (case insensitive), then screenshot\n is embedded as Base64 image to the log.html. In this case file is not\n created in the filesystem.\n\n Starting from SeleniumLibrary 1.8, if ``filename`` contains marker\n ``{index}``, it will be automatically replaced with an unique running\n index, preventing files to be overwritten. Indices start from 1,\n and how they are represented can be customized using Python's\n [https://docs.python.org/3/library/string.html#format-string-syntax|\n format string syntax].\n\n An absolute path to the created screenshot file is returned or if\n ``filename`` equals to EMBED, word `EMBED` is returned.\n\n Support for EMBED is new in SeleniumLibrary 4.2\n\n Examples:\n | `Capture Page Screenshot` | |\n | `File Should Exist` | ${OUTPUTDIR}/selenium-screenshot-1.png |\n | ${path} = | `Capture Page Screenshot` |\n | `File Should Exist` | ${OUTPUTDIR}/selenium-screenshot-2.png |\n | `File Should Exist` | ${path} |\n | `Capture Page Screenshot` | custom_name.png |\n | `File Should Exist` | ${OUTPUTDIR}/custom_name.png |\n | `Capture Page Screenshot` | custom_with_index_{index}.png |\n | `File Should Exist` | ${OUTPUTDIR}/custom_with_index_1.png |\n | `Capture Page Screenshot` | formatted_index_{index:03}.png |\n | `File Should Exist` | ${OUTPUTDIR}/formatted_index_001.png |\n | `Capture Page Screenshot` | EMBED |\n | `File Should Not Exist` | EMBED |\n ", + "sha256": "271132ea5ad25ba3e6182db7560e7eaf512df0bae8f437f756419b9611a4bebe" + }, + "set_screenshot_directory": { + "name": "set_screenshot_directory", + "doc": "Sets the directory for captured screenshots.\n\n ``path`` argument specifies the absolute path to a directory where\n the screenshots should be written to. If the directory does not\n exist, it will be created. The directory can also be set when\n `importing` the library. If it is not configured anywhere,\n screenshots are saved to the same directory where Robot Framework's\n log file is written.\n\n If ``path`` equals to EMBED (case insensitive) and\n `Capture Page Screenshot` or `capture Element Screenshot` keywords\n filename argument is not changed from the default value, then\n the page or element screenshot is embedded as Base64 image to\n the log.html.\n\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n Returning the previous value is new in SeleniumLibrary 3.0.\n The persist argument was removed in SeleniumLibrary 3.2 and\n EMBED is new in SeleniumLibrary 4.2.\n ", + "sha256": "c8241dd4f1113b3db620de1f45f2390c227b081400b04e0178561dde2c38748e" + }, + "get_list_items": { + "name": "get_list_items", + "doc": "Returns all labels or values of selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Returns visible labels by default, but values can be returned by\n setting the ``values`` argument to a true value (see `Boolean\n arguments`).\n\n Example:\n | ${labels} = | `Get List Items` | mylist | |\n | ${values} = | `Get List Items` | css:#example select | values=True |\n\n Support to return values is new in SeleniumLibrary 3.0.\n ", + "sha256": "60f7293239f288f08276b8fa63d98a6be52ff42a0627b9b0da14ba6dab51bd94" + }, + "get_selected_list_label": { + "name": "get_selected_list_label", + "doc": "Returns the label of selected option from selection list ``locator``.\n\n If there are multiple selected options, the label of the first option\n is returned.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "f9281509d3c4ac39f4b98d9d9d4f0f2dd6b579c37204b33ec7d47b6bef999672" + }, + "get_selected_list_labels": { + "name": "get_selected_list_labels", + "doc": "Returns labels of selected options from selection list ``locator``.\n\n Starting from SeleniumLibrary 3.0, returns an empty list if there\n are no selections. In earlier versions, this caused an error.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "e3bf2c1db04dbb52c99c7397065da52699bb4b7bdc5ceaeb45d525e8176acb48" + }, + "get_selected_list_value": { + "name": "get_selected_list_value", + "doc": "Returns the value of selected option from selection list ``locator``.\n\n If there are multiple selected options, the value of the first option\n is returned.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2b935dd4627ca62d92a311569036b2978032aa67e542f5b7ef91a514f01f323d" + }, + "get_selected_list_values": { + "name": "get_selected_list_values", + "doc": "Returns values of selected options from selection list ``locator``.\n\n Starting from SeleniumLibrary 3.0, returns an empty list if there\n are no selections. In earlier versions, this caused an error.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "83b79c56056a6d51529e36a093ba14ec0b805a96bdb9e6870214eb4de987bea6" + }, + "list_selection_should_be": { + "name": "list_selection_should_be", + "doc": "Verifies selection list ``locator`` has ``expected`` options selected.\n\n It is possible to give expected options both as visible labels and\n as values. Starting from SeleniumLibrary 3.0, mixing labels and\n values is not possible. Order of the selected options is not\n validated.\n\n If no expected options are given, validates that the list has\n no selections. A more explicit alternative is using `List Should\n Have No Selections`.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Examples:\n | `List Selection Should Be` | gender | Female | |\n | `List Selection Should Be` | interests | Test Automation | Python |\n ", + "sha256": "1d70ccc8a2dc868e265fc29e9cbc2317799eb12d0dd3f21d61fa4ffea7a7e4c2" + }, + "list_should_have_no_selections": { + "name": "list_should_have_no_selections", + "doc": "Verifies selection list ``locator`` has no options selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "429fc50c47319d8267bc5c2306a7d1d191a124d457a6f6655bb4ff5d64d71def" + }, + "page_should_contain_list": { + "name": "page_should_contain_list", + "doc": "Verifies selection list ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "9ad2d87bd51bee3365d5ca32153adae2ea4b137f916f07fc39416a54aa117bf6" + }, + "page_should_not_contain_list": { + "name": "page_should_not_contain_list", + "doc": "Verifies selection list ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2f2e58b399f73b2ab4dc795368b0b18b9a63c37e2764de722d897039d6e7881c" + }, + "select_all_from_list": { + "name": "select_all_from_list", + "doc": "Selects all options from multi-selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7113bdf3faec639e3bdb3b1beb09c526dec522a0181ae11fd94398fdfb3f6fd2" + }, + "select_from_list_by_index": { + "name": "select_from_list_by_index", + "doc": "Selects options from selection list ``locator`` by ``indexes``.\n\n Indexes of list options start from 0.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "220f77e512662cfff307efa29f5b46dba2e0d1b04760707cface96f63ff87e7c" + }, + "select_from_list_by_label": { + "name": "select_from_list_by_label", + "doc": "Selects options from selection list ``locator`` by ``labels``.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "12c2af99cb8c78b6edd06ee17d902a575d1a2a4932d21bb67b040233a5a80318" + }, + "select_from_list_by_value": { + "name": "select_from_list_by_value", + "doc": "Selects options from selection list ``locator`` by ``values``.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "9989cd962aeddb746a6ac8c632023bb9fbbe1ae832ae618635fb1c072049d7ab" + }, + "unselect_all_from_list": { + "name": "unselect_all_from_list", + "doc": "Unselects all options from multi-selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "e273c674b217707452b897e66ccfa2ff12ef2279198364b4f95350b0cc557c4c" + }, + "unselect_from_list_by_index": { + "name": "unselect_from_list_by_index", + "doc": "Unselects options from selection list ``locator`` by ``indexes``.\n\n Indexes of list options start from 0. This keyword works only with\n multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5aac4cc2fa0bec90621d29b2eac7064d18510c447b7357d8eb5948d2cd459cef" + }, + "unselect_from_list_by_label": { + "name": "unselect_from_list_by_label", + "doc": "Unselects options from selection list ``locator`` by ``labels``.\n\n This keyword works only with multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "3dfe87450d9a1a8cad3f8cad3e159b8bd4c3e25f25f91dd747aeb23403b18ab5" + }, + "unselect_from_list_by_value": { + "name": "unselect_from_list_by_value", + "doc": "Unselects options from selection list ``locator`` by ``values``.\n\n This keyword works only with multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7ee06a01319ea95e02d4ba34cfbc0d845cf5dbaf58244d93338760609a67ec02" + }, + "get_table_cell": { + "name": "get_table_cell", + "doc": "Returns contents of a table cell.\n\n The table is located using the ``locator`` argument and its cell\n found using ``row`` and ``column``. See the `Locating elements`\n section for details about the locator syntax.\n\n Both row and column indexes start from 1, and header and footer\n rows are included in the count. It is possible to refer to rows\n and columns from the end by using negative indexes so that -1\n is the last row/column, -2 is the second last, and so on.\n\n All ```` and ```` elements anywhere in the table are\n considered to be cells.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "616f2d925fbd431f1cdde9427ff865b4f402806b2f15b99dfd033a96e0d0a42e" + }, + "table_cell_should_contain": { + "name": "table_cell_should_contain", + "doc": "Verifies table cell contains text ``expected``.\n\n See `Get Table Cell` that this keyword uses internally for\n an explanation about accepted arguments.\n ", + "sha256": "628c09aa35b649beda7c500e914fa906cf91f9eb30afad19973809784ee1f8d6" + }, + "table_column_should_contain": { + "name": "table_column_should_contain", + "doc": "Verifies table column contains text ``expected``.\n\n The table is located using the ``locator`` argument and its column\n found using ``column``. See the `Locating elements` section for\n details about the locator syntax.\n\n Column indexes start from 1. It is possible to refer to columns\n from the end by using negative indexes so that -1 is the last column,\n -2 is the second last, and so on.\n\n If a table contains cells that span multiple columns, those merged\n cells count as a single column.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "e0f898ce00b22cd66e2f4c5ab1cdcbea733f294d53bc210ec33667dfcd1963de" + }, + "table_footer_should_contain": { + "name": "table_footer_should_contain", + "doc": "Verifies table footer contains text ``expected``.\n\n Any ```` element inside ```` element is considered to\n be part of the footer.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "454fb3be070acb378460038572ed4268de8b18b96b3aaa903d3a1f0093147691" + }, + "table_header_should_contain": { + "name": "table_header_should_contain", + "doc": "Verifies table header contains text ``expected``.\n\n Any ```` element anywhere in the table is considered to be\n part of the header.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "66208e9741c9d18d1c09645bfcb9b54b4ffe2c104e5402c86f2cf54feb02de79" + }, + "table_row_should_contain": { + "name": "table_row_should_contain", + "doc": "Verifies that table row contains text ``expected``.\n\n The table is located using the ``locator`` argument and its column\n found using ``column``. See the `Locating elements` section for\n details about the locator syntax.\n\n Row indexes start from 1. It is possible to refer to rows\n from the end by using negative indexes so that -1 is the last row,\n -2 is the second last, and so on.\n\n If a table contains cells that span multiple rows, a match\n only occurs for the uppermost row of those merged cells.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "2ad4f79443748abaa86e768fb0994f32a2d1386c435688727093fb0c1034d23f" + }, + "table_should_contain": { + "name": "table_should_contain", + "doc": "Verifies table contains text ``expected``.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "ea4dc362f588ab33332b985ea6ff059499de1e4c25bdbfceb6e6517cd36b24fc" + }, + "wait_for_condition": { + "name": "wait_for_condition", + "doc": "Waits until ``condition`` is true or ``timeout`` expires.\n\n The condition can be arbitrary JavaScript expression but it\n must return a value to be evaluated. See `Execute JavaScript` for\n information about accessing content on pages.\n\n Fails if the timeout expires before the condition becomes true. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n\n Examples:\n | `Wait For Condition` | return document.title == \"New Title\" |\n | `Wait For Condition` | return jQuery.active == 0 |\n | `Wait For Condition` | style = document.querySelector('h1').style; return style.background == \"red\" && style.color == \"white\" |\n ", + "sha256": "4998ab3cee46a578df2b064d390401d2ec0268454607ef194db5c0d3d73c81db" + }, + "wait_until_element_contains": { + "name": "wait_until_element_contains", + "doc": "Waits until the element ``locator`` contains ``text``.\n\n Fails if ``timeout`` expires before the text appears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "982c68220bb622a3d985c04b39ea3bc11b20437e73bcf8e38d51ed7e2032852c" + }, + "wait_until_element_does_not_contain": { + "name": "wait_until_element_does_not_contain", + "doc": "Waits until the element ``locator`` does not contain ``text``.\n\n Fails if ``timeout`` expires before the text disappears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "a2b8bc5ee7de21f06e79317935026beddee2105ae645c22b322446dd5a8be0ad" + }, + "wait_until_element_is_enabled": { + "name": "wait_until_element_is_enabled", + "doc": "Waits until the element ``locator`` is enabled.\n\n Element is considered enabled if it is not disabled nor read-only.\n\n Fails if ``timeout`` expires before the element is enabled. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n Considering read-only elements to be disabled is a new feature\n in SeleniumLibrary 3.0.\n ", + "sha256": "6202e0635b377e2e7d5eaa091eb6a582b64bc49f9d5edf6ddeb7754723015543" + }, + "wait_until_element_is_not_visible": { + "name": "wait_until_element_is_not_visible", + "doc": "Waits until the element ``locator`` is not visible.\n\n Fails if ``timeout`` expires before the element is not visible. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "e112e160d739b0cd0f8730703738cc0692e1c0d57e42308b6d50206db23e6d52" + }, + "wait_until_element_is_visible": { + "name": "wait_until_element_is_visible", + "doc": "Waits until the element ``locator`` is visible.\n\n Fails if ``timeout`` expires before the element is visible. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "90878c583a727db5da943e7f532efa4e73c59a525a0107233fd59740bb9dd116" + }, + "wait_until_location_contains": { + "name": "wait_until_location_contains", + "doc": "Waits until the current URL contains ``expected``.\n\n The ``expected`` argument contains the expected value in url.\n\n Fails if ``timeout`` expires before the location contains. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "33b91c79fe956c37284bccdb56d318e679ec774ca1565db5e2140250b6b46fb5" + }, + "wait_until_location_does_not_contain": { + "name": "wait_until_location_does_not_contain", + "doc": "Waits until the current URL does not contains ``location``.\n\n The ``location`` argument contains value not expected in url.\n\n Fails if ``timeout`` expires before the location not contains. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.3\n ", + "sha256": "5ea0b9da22370c90d509d3e4a8aad47b69652b2bd0ce5b29a9264508d4bea432" + }, + "wait_until_location_is": { + "name": "wait_until_location_is", + "doc": "Waits until the current URL is ``expected``.\n\n The ``expected`` argument is the expected value in url.\n\n Fails if ``timeout`` expires before the location is. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "2a0604e9e096908cda4caef1486d56310d6f10d0d974804c96a32a0492eb1f82" + }, + "wait_until_location_is_not": { + "name": "wait_until_location_is_not", + "doc": "Waits until the current URL is not ``location``.\n\n The ``location`` argument is the unexpected value in url.\n\n Fails if ``timeout`` expires before the location is not. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.3\n ", + "sha256": "96f19cceb6f263cde977b3dfd4b90d06691a1533ebef77c9c5ef1f0e0925e228" + }, + "wait_until_page_contains": { + "name": "wait_until_page_contains", + "doc": "Waits until ``text`` appears on the current page.\n\n Fails if ``timeout`` expires before the text appears. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "2e6b9f7e424ed5ba676c82ce9b6ae964050a5fb7b47baa35a3f94125107d9e57" + }, + "wait_until_page_contains_element": { + "name": "wait_until_page_contains_element", + "doc": "Waits until the element ``locator`` appears on the current page.\n\n Fails if ``timeout`` expires before the element appears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n The ``limit`` argument can used to define how many elements the\n page should contain. When ``limit`` is `None` (default) page can\n contain one or more elements. When limit is a number, page must\n contain same number of elements.\n\n ``limit`` is new in SeleniumLibrary 4.4\n ", + "sha256": "712da49e8aff630cb2843522331935693ce334aea9ccb2aacb6c015af9c921b5" + }, + "wait_until_page_does_not_contain": { + "name": "wait_until_page_does_not_contain", + "doc": "Waits until ``text`` disappears from the current page.\n\n Fails if ``timeout`` expires before the text disappears. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "96c2f8840c677afdb9f207107bf3f7bbdfb9d1b56e3ce887cf34a88e3e273974" + }, + "wait_until_page_does_not_contain_element": { + "name": "wait_until_page_does_not_contain_element", + "doc": "Waits until the element ``locator`` disappears from the current page.\n\n Fails if ``timeout`` expires before the element disappears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n The ``limit`` argument can used to define how many elements the\n page should not contain. When ``limit`` is `None` (default) page can`t\n contain any elements. When limit is a number, page must not\n contain same number of elements.\n\n ``limit`` is new in SeleniumLibrary 4.4\n ", + "sha256": "081d0393a8d8f100d9db65f81170222f4a6678fcc2703a3e123c907ef5ade430" + }, + "close_window": { + "name": "close_window", + "doc": "Closes currently opened and selected browser window/tab. ", + "sha256": "8d00f3bcf62126a5fcc61ca14d62631ad918c2993ee9e8f2641cb57595b591bb" + }, + "get_locations": { + "name": "get_locations", + "doc": "Returns and logs URLs of all windows of the selected browser.\n\n *Browser Scope:*\n\n The ``browser`` argument specifies the browser that shall return\n its windows information.\n\n - ``browser`` can be ``index_or_alias`` like in `Switch Browser`.\n\n - If ``browser`` is ``CURRENT`` (default, case-insensitive)\n the currently active browser is selected.\n\n - If ``browser`` is ``ALL`` (case-insensitive)\n the window information of all windows of all opened browsers are returned.", + "sha256": "3e73811fa673371891cffa16aa99f24fa6dbc87ff826d0d84be6d54fc937163c" + }, + "get_window_handles": { + "name": "get_window_handles", + "doc": "Returns all child window handles of the selected browser as a list.\n\n Can be used as a list of windows to exclude with `Select Window`.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.\n\n Prior to SeleniumLibrary 3.0, this keyword was named `List Windows`.\n ", + "sha256": "b051b51a36766e2a3c748a2ecbb76ed6516a20cec807a38d29a96f95c5ea7efa" + }, + "get_window_identifiers": { + "name": "get_window_identifiers", + "doc": "Returns and logs id attributes of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "9342df3471d9923e299c60511d11006762b1797802153c97ac0451adcdd5e0bf" + }, + "get_window_names": { + "name": "get_window_names", + "doc": "Returns and logs names of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "557778bcbb2b4be2e575416f5422c8077397f2e7d7614e3b064fe3f222bf3225" + }, + "get_window_position": { + "name": "get_window_position", + "doc": "Returns current window position.\n\n The position is relative to the top left corner of the screen. Returned\n values are integers. See also `Set Window Position`.\n\n Example:\n | ${x} | ${y}= | `Get Window Position` |\n ", + "sha256": "c9f1ab8ee31517bc91a6ae9f3dd3782c695f0c3c64adf1639fc3e34ea85e7d9c" + }, + "get_window_size": { + "name": "get_window_size", + "doc": "Returns current window width and height as integers.\n\n See also `Set Window Size`.\n\n If ``inner`` parameter is set to True, keyword returns\n HTML DOM window.innerWidth and window.innerHeight properties.\n See `Boolean arguments` for more details on how to set boolean\n arguments. The ``inner`` is new in SeleniumLibrary 4.0.\n\n Example:\n | ${width} | ${height}= | `Get Window Size` | |\n | ${width} | ${height}= | `Get Window Size` | True |\n ", + "sha256": "d9fc8a6bc4dd38749c761722027b783dfd74ff3c69d16ad3e4ceceb162f2ed64" + }, + "get_window_titles": { + "name": "get_window_titles", + "doc": "Returns and logs titles of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "7b2a62a9e808f584ec9674faae954855135aec5ac168ec0b929b11ac73f7fcec" + }, + "maximize_browser_window": { + "name": "maximize_browser_window", + "doc": "Maximizes current browser window.", + "sha256": "de016b8b98dc0a25f624060424c8ae449cc680990baf8789da09181b2643d77b" + }, + "minimize_browser_window": { + "name": "minimize_browser_window", + "doc": "Minimizes current browser window.", + "sha256": "6a99ddaa41cde69ae82c33df6d43976d9ad76a358be5d4e35f065895e94e95db" + }, + "set_window_position": { + "name": "set_window_position", + "doc": "Sets window position using ``x`` and ``y`` coordinates.\n\n The position is relative to the top left corner of the screen,\n but some browsers exclude possible task bar set by the operating\n system from the calculation. The actual position may thus be\n different with different browsers.\n\n Values can be given using strings containing numbers or by using\n actual numbers. See also `Get Window Position`.\n\n Example:\n | `Set Window Position` | 100 | 200 |\n ", + "sha256": "d9c3d6dc138cd350941a1660e5601dbc4441ee6c0a7df08902c76dd15953017c" + }, + "set_window_size": { + "name": "set_window_size", + "doc": "Sets current windows size to given ``width`` and ``height``.\n\n Values can be given using strings containing numbers or by using\n actual numbers. See also `Get Window Size`.\n\n Browsers have a limit on their minimum size. Trying to set them\n smaller will cause the actual size to be bigger than the requested\n size.\n\n If ``inner`` parameter is set to True, keyword sets the necessary\n window width and height to have the desired HTML DOM _window.innerWidth_\n and _window.innerHeight_. See `Boolean arguments` for more details on how to set boolean\n arguments.\n\n The ``inner`` argument is new since SeleniumLibrary 4.0.\n\n This ``inner`` argument does not support Frames. If a frame is selected,\n switch to default before running this.\n\n Example:\n | `Set Window Size` | 800 | 600 | |\n | `Set Window Size` | 800 | 600 | True |\n ", + "sha256": "31b5febddcb935b20320728accc28a892b8a0956301646827aa8c7c74e1cdfec" + }, + "switch_window": { + "name": "switch_window", + "doc": "Switches to browser window matching ``locator``.\n\n If the window is found, all subsequent commands use the selected\n window, until this keyword is used again. If the window is not\n found, this keyword fails. The previous windows handle is returned\n and can be used to switch back to it later.\n\n Notice that alerts should be handled with\n `Handle Alert` or other alert related keywords.\n\n The ``locator`` can be specified using different strategies somewhat\n similarly as when `locating elements` on pages.\n\n - By default, the ``locator`` is matched against window handle, name,\n title, and URL. Matching is done in that order and the first\n matching window is selected.\n\n - The ``locator`` can specify an explicit strategy by using the format\n ``strategy:value`` (recommended) or ``strategy=value``. Supported\n strategies are ``name``, ``title``, and ``url``. These matches windows\n using their name, title, or URL, respectively. Additionally, ``default``\n can be used to explicitly use the default strategy explained above.\n\n - If the ``locator`` is ``NEW`` (case-insensitive), the latest\n opened window is selected. It is an error if this is the same\n as the current window.\n\n - If the ``locator`` is ``MAIN`` (default, case-insensitive),\n the main window is selected.\n\n - If the ``locator`` is ``CURRENT`` (case-insensitive), nothing is\n done. This effectively just returns the current window handle.\n\n - If the ``locator`` is not a string, it is expected to be a list\n of window handles _to exclude_. Such a list of excluded windows\n can be got from `Get Window Handles` before doing an action that\n opens a new window.\n\n The ``timeout`` is used to specify how long keyword will poll to select\n the new window. The ``timeout`` is new in SeleniumLibrary 3.2.\n\n Example:\n | `Click Link` | popup1 | | # Open new window |\n | `Switch Window` | example | | # Select window using default strategy |\n | `Title Should Be` | Pop-up 1 | |\n | `Click Button` | popup2 | | # Open another window |\n | ${handle} = | `Switch Window` | NEW | # Select latest opened window |\n | `Title Should Be` | Pop-up 2 | |\n | `Switch Window` | ${handle} | | # Select window using handle |\n | `Title Should Be` | Pop-up 1 | |\n | `Switch Window` | MAIN | | # Select the main window |\n | `Title Should Be` | Main | |\n | ${excludes} = | `Get Window Handles` | | # Get list of current windows |\n | `Click Link` | popup3 | | # Open one more window |\n | `Switch Window` | ${excludes} | | # Select window using excludes |\n | `Title Should Be` | Pop-up 3 | |\n\n The ``browser`` argument allows with ``index_or_alias`` to implicitly switch to\n a specific browser when switching to a window. See `Switch Browser`\n\n - If the ``browser`` is ``CURRENT`` (case-insensitive), no other browser is\n selected.\n\n *NOTE:*\n\n - The ``strategy:value`` syntax is only supported by SeleniumLibrary\n 3.0 and newer.\n - Prior to SeleniumLibrary 3.0 matching windows by name, title\n and URL was case-insensitive.\n - Earlier versions supported aliases ``None``, ``null`` and the\n empty string for selecting the main window, and alias ``self``\n for selecting the current window. Support for these aliases was\n removed in SeleniumLibrary 3.2.\n ", + "sha256": "2ae583a5179810f31a4f7ae665918443d1f068c53e255c552b51bd1f5205c608" + }, + "__init__": { + "name": "__init__", + "doc": "00 SeleniumLibrary is a web testing library for Robot Framework.\n\nThis document explains how to use keywords provided by SeleniumLibrary.\nFor information about installation, support, and more, please visit the\n[https://github.com/robotframework/SeleniumLibrary|project pages].\nFor more information about Robot Framework, see http://robotframework.org.\n\nSeleniumLibrary uses the Selenium WebDriver modules internally to\ncontrol a web browser. See http://seleniumhq.org for more information\nabout Selenium in general and SeleniumLibrary README.rst\n[https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter]\nfor more details about WebDriver binary installation.\n\n%TOC%\n\n= Locating elements =\n\nAll keywords in SeleniumLibrary that need to interact with an element\non a web page take an argument typically named ``locator`` that specifies\nhow to find the element. Most often the locator is given as a string\nusing the locator syntax described below, but `using WebElements` is\npossible too.\n\n== Locator syntax ==\n\nSeleniumLibrary supports finding elements based on different strategies\nsuch as the element id, XPath expressions, or CSS selectors. The strategy\ncan either be explicitly specified with a prefix or the strategy can be\nimplicit.\n\n=== Default locator strategy ===\n\nBy default, locators are considered to use the keyword specific default\nlocator strategy. All keywords support finding elements based on ``id``\nand ``name`` attributes, but some keywords support additional attributes\nor other values that make sense in their context. For example, `Click\nLink` supports the ``href`` attribute and the link text and addition\nto the normal ``id`` and ``name``.\n\nExamples:\n\n| `Click Element` | example | # Match based on ``id`` or ``name``. |\n| `Click Link` | example | # Match also based on link text and ``href``. |\n| `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. |\n\nIf a locator accidentally starts with a prefix recognized as `explicit\nlocator strategy` or `implicit XPath strategy`, it is possible to use\nthe explicit ``default`` prefix to enable the default strategy.\n\nExamples:\n\n| `Click Element` | name:foo | # Find element with name ``foo``. |\n| `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. |\n| `Click Element` | //foo | # Find element using XPath ``//foo``. |\n| `Click Element` | default: //foo | # Use default strategy with value ``//foo``. |\n\n=== Explicit locator strategy ===\n\nThe explicit locator strategy is specified with a prefix using either\nsyntax ``strategy:value`` or ``strategy=value``. The former syntax\nis preferred because the latter is identical to Robot Framework's\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax|\nnamed argument syntax] and that can cause problems. Spaces around\nthe separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo``\nare all equivalent.\n\nLocator strategies that are supported by default are listed in the table\nbelow. In addition to them, it is possible to register `custom locators`.\n\n| = Strategy = | = Match based on = | = Example = |\n| id | Element ``id``. | ``id:example`` |\n| name | ``name`` attribute. | ``name:example`` |\n| identifier | Either ``id`` or ``name``. | ``identifier:example`` |\n| class | Element ``class``. | ``class:example`` |\n| tag | Tag name. | ``tag:div`` |\n| xpath | XPath expression. | ``xpath://div[@id=\"example\"]`` |\n| css | CSS selector. | ``css:div#example`` |\n| dom | DOM expression. | ``dom:document.images[5]`` |\n| link | Exact text a link has. | ``link:The example`` |\n| partial link | Partial link text. | ``partial link:he ex`` |\n| sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` |\n| data | Element ``data-*`` attribute | ``data:id:my_id`` |\n| jquery | jQuery expression. | ``jquery:div.example`` |\n| default | Keyword specific default behavior. | ``default:example`` |\n\nSee the `Default locator strategy` section below for more information\nabout how the default strategy works. Using the explicit ``default``\nprefix is only necessary if the locator value itself accidentally\nmatches some of the explicit strategies.\n\nDifferent locator strategies have different pros and cons. Using ids,\neither explicitly like ``id:foo`` or by using the `default locator\nstrategy` simply like ``foo``, is recommended when possible, because\nthe syntax is simple and locating elements by id is fast for browsers.\nIf an element does not have an id or the id is not stable, other\nsolutions need to be used. If an element has a unique tag name or class,\nusing ``tag``, ``class`` or ``css`` strategy like ``tag:h1``,\n``class:example`` or ``css:h1.example`` is often an easy solution. In\nmore complex cases using XPath expressions is typically the best\napproach. They are very powerful but a downside is that they can also\nget complex.\n\nExamples:\n\n| `Click Element` | id:foo | # Element with id 'foo'. |\n| `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. |\n| `Click Element` | xpath: //div[@id=\"foo\"]//h1 | # Same as the above using XPath, not CSS. |\n| `Click Element` | xpath: //*[contains(text(), \"example\")] | # Element containing text 'example'. |\n\n*NOTE:*\n\n- The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0\n and newer.\n- Using the ``sizzle`` strategy or its alias ``jquery`` requires that\n the system under test contains the jQuery library.\n- Prior to SeleniumLibrary 3.0, table related keywords only supported\n ``xpath``, ``css`` and ``sizzle/jquery`` strategies.\n- ``data`` strategy is conveniance locator that will construct xpath from the parameters.\n If you have element like `
`, you locate the element via\n ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0\n\n=== Implicit XPath strategy ===\n\nIf the locator starts with ``//`` or multiple opening parenthesis in front\nof the ``//``, the locator is considered to be an XPath expression. In other\nwords, using ``//div`` is equivalent to using explicit ``xpath://div`` and\n``((//div))`` is equivalent to using explicit ``xpath:((//div))``\n\nExamples:\n\n| `Click Element` | //div[@id=\"foo\"]//h1 |\n| `Click Element` | (//div)[2] |\n\nThe support for the ``(//`` prefix is new in SeleniumLibrary 3.0.\nSupporting multiple opening parenthesis is new in SeleniumLibrary 5.0.\n\n=== Chaining locators ===\n\nIt is possible chain multiple locators together as single locator. Each chained locator must start with locator\nstrategy. Chained locators must be separated with single space, two greater than characters and followed with\nspace. It is also possible mix different locator strategies, example css or xpath. Also a list can also be\nused to specify multiple locators. This is useful, is some part of locator would match as the locator separator\nbut it should not. Or if there is need to existing WebElement as locator.\n\nAlthough all locators support chaining, some locator strategies do not abey the chaining. This is because\nsome locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context\nand not for the element found be the previous locator. Chaining is supported by locator strategies which\nare based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery\n\nExamples:\n| `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class \"bar\" |\n\nList examples:\n| ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), \" >> \"] |\n| `Page Should Contain Element` | ${locator_list} | | |\n| ${element} = | Get WebElement | xpath://*[text(), \" >> \"] | |\n| ${locator_list} = | `Create List` | css:div#div_id | ${element} |\n| `Page Should Contain Element` | ${locator_list} | | |\n\nChaining locators in new in SeleniumLibrary 5.0\n\n== Using WebElements ==\n\nIn addition to specifying a locator as a string, it is possible to use\nSelenium's WebElement objects. This requires first getting a WebElement,\nfor example, by using the `Get WebElement` keyword.\n\n| ${elem} = | `Get WebElement` | id:example |\n| `Click Element` | ${elem} | |\n\n== Custom locators ==\n\nIf more complex lookups are required than what is provided through the\ndefault locators, custom lookup strategies can be created. Using custom\nlocators is a two part process. First, create a keyword that returns\na WebElement that should be acted on:\n\n| Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} |\n| | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); |\n| | [Return] | ${element} |\n\nThis keyword is a reimplementation of the basic functionality of the\n``id`` locator where ``${browser}`` is a reference to a WebDriver\ninstance and ``${locator}`` is the name of the locator strategy. To use\nthis locator, it must first be registered by using the\n`Add Location Strategy` keyword:\n\n| `Add Location Strategy` | custom | Custom Locator Strategy |\n\nThe first argument of `Add Location Strategy` specifies the name of\nthe strategy and it must be unique. After registering the strategy,\nthe usage is the same as with other locators:\n\n| `Click Element` | custom:example |\n\nSee the `Add Location Strategy` keyword for more details.\n\n= Browser and Window =\n\nThere is different conceptual meaning when SeleniumLibrary talks\nabout windows or browsers. This chapter explains those differences.\n\n== Browser ==\n\nWhen `Open Browser` or `Create WebDriver` keyword is called, it\nwill create a new Selenium WebDriver instance by using the\n[https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver]\nAPI. In SeleniumLibrary terms, a new browser is created. It is\npossible to start multiple independent browsers (Selenium Webdriver\ninstances) at the same time, by calling `Open Browser` or\n`Create WebDriver` multiple times. These browsers are usually\nindependent of each other and do not share data like cookies,\nsessions or profiles. Typically when the browser starts, it\ncreates a single window which is shown to the user.\n\n== Window ==\n\nWindows are the part of a browser that loads the web site and presents\nit to the user. All content of the site is the content of the window.\nWindows are children of a browser. In SeleniumLibrary browser is a\nsynonym for WebDriver instance. One browser may have multiple\nwindows. Windows can appear as tabs, as separate windows or pop-ups with\ndifferent position and size. Windows belonging to the same browser\ntypically share the sessions detail, like cookies. If there is a\nneed to separate sessions detail, example login with two different\nusers, two browsers (Selenium WebDriver instances) must be created.\nNew windows can be opened example by the application under test or\nby example `Execute Javascript` keyword:\n\n| `Execute Javascript` window.open() # Opens a new window with location about:blank\n\nThe example below opens multiple browsers and windows,\nto demonstrate how the different keywords can be used to interact\nwith browsers, and windows attached to these browsers.\n\nStructure:\n| BrowserA\n| Window 1 (location=https://robotframework.org/)\n| Window 2 (location=https://robocon.io/)\n| Window 3 (location=https://github.com/robotframework/)\n|\n| BrowserB\n| Window 1 (location=https://github.com/)\n\nExample:\n| `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. |\n| `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. |\n| `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA |\n| `Go To` | https://robocon.io | | | # Second window navigates to robocon site. |\n| `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. |\n| ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA |\n| `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. |\n| `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. |\n| ${location} | `Get Location` | | | # ${location} is: https://www.github.com |\n| `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. |\n| ${location} | `Get Location` | | | # ${location} = https://robocon.io/ |\n| @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). |\n| @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. |\n\nThe above example, @{locations 1} contains the following items:\nhttps://robotframework.org/, https://robocon.io/ and\nhttps://github.com/robotframework/'. The @{locations 2}\ncontains the following items: https://robotframework.org/,\nhttps://robocon.io/, https://github.com/robotframework/'\nand 'https://github.com/.\n\n= Timeouts, waits, and delays =\n\nThis section discusses different ways how to wait for elements to\nappear on web pages and to slow down execution speed otherwise.\nIt also explains the `time format` that can be used when setting various\ntimeouts, waits, and delays.\n\n== Timeout ==\n\nSeleniumLibrary contains various keywords that have an optional\n``timeout`` argument that specifies how long these keywords should\nwait for certain events or actions. These keywords include, for example,\n``Wait ...`` keywords and keywords related to alerts. Additionally\n`Execute Async Javascript`. Although it does not have ``timeout``,\nargument, uses a timeout to define how long asynchronous JavaScript\ncan run.\n\nThe default timeout these keywords use can be set globally either by\nusing the `Set Selenium Timeout` keyword or with the ``timeout`` argument\nwhen `importing` the library. If no default timeout is set globally, the\ndefault is 5 seconds. If None is specified for the timeout argument in the\nkeywords, the default is used. See `time format` below for supported\ntimeout syntax.\n\n== Implicit wait ==\n\nImplicit wait specifies the maximum time how long Selenium waits when\nsearching for elements. It can be set by using the `Set Selenium Implicit\nWait` keyword or with the ``implicit_wait`` argument when `importing`\nthe library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp|\nSelenium documentation] for more information about this functionality.\n\nSee `time format` below for supported syntax.\n\n== Page load ==\nPage load timeout is the amount of time to wait for page load to complete\nuntil a timeout exception is raised.\n\nThe default page load timeout can be set globally\nwhen `importing` the library with the ``page_load_timeout`` argument\nor by using the `Set Selenium Page Load Timeout` keyword.\n\nSee `time format` below for supported timeout syntax.\n\nSupport for page load is new in SeleniumLibrary 6.1\n\n== Selenium speed ==\n\nSelenium execution speed can be slowed down globally by using `Set\nSelenium speed` keyword. This functionality is designed to be used for\ndemonstrating or debugging purposes. Using it to make sure that elements\nappear on a page is not a good idea. The above-explained timeouts\nand waits should be used instead.\n\nSee `time format` below for supported syntax.\n\n== Time format ==\n\nAll timeouts and waits can be given as numbers considered seconds\n(e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax\n(e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about\nthe time syntax see the\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide].\n\n= Run-on-failure functionality =\n\nSeleniumLibrary has a handy feature that it can automatically execute\na keyword if any of its own keywords fails. By default, it uses the\n`Capture Page Screenshot` keyword, but this can be changed either by\nusing the `Register Keyword To Run On Failure` keyword or with the\n``run_on_failure`` argument when `importing` the library. It is\npossible to use any keyword from any imported library or resource file.\n\nThe run-on-failure functionality can be disabled by using a special value\n``NOTHING`` or anything considered false (see `Boolean arguments`)\nsuch as ``NONE``.\n\n= Boolean arguments =\n\nStarting from 5.0 SeleniumLibrary relies on Robot Framework to perform the\nboolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint].\nMore details in Robot Framework\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide]\n\nPlease note SeleniumLibrary 3 and 4 did have own custom methods to covert\narguments to boolean values.\n\n= EventFiringWebDriver =\n\nThe SeleniumLibrary offers support for\n[https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver].\nSee the Selenium and SeleniumLibrary\n[https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support]\ndocumentation for further details.\n\nEventFiringWebDriver is new in SeleniumLibrary 4.0\n\n= Thread support =\n\nSeleniumLibrary is not thread-safe. This is mainly due because the underlying\n[https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe|\nSelenium tool is not thread-safe] within one browser/driver instance.\nBecause of the limitation in the Selenium side, the keywords or the\nAPI provided by the SeleniumLibrary is not thread-safe.\n\n= Plugins =\n\nSeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal\nfunctionality without creating a new library or hacking the source code. See\n[https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API]\ndocumentation for further details.\n\nPlugin API is new SeleniumLibrary 4.0", + "sha256": "3d660b78fb0d75d9f2f8265fa6f29967ae30b712f545661d64de0f05f2c1b913" + }, + "__intro__": { + "name": "__intro__", + "doc": "000 SeleniumLibrary is a web testing library for Robot Framework.\n\n This document explains how to use keywords provided by SeleniumLibrary.\n For information about installation, support, and more, please visit the\n [https://github.com/robotframework/SeleniumLibrary|project pages].\n For more information about Robot Framework, see http://robotframework.org.\n\n SeleniumLibrary uses the Selenium WebDriver modules internally to\n control a web browser. See http://seleniumhq.org for more information\n about Selenium in general and SeleniumLibrary README.rst\n [https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter]\n for more details about WebDriver binary installation.\n\n %TOC%\n\n = Locating elements =\n\n All keywords in SeleniumLibrary that need to interact with an element\n on a web page take an argument typically named ``locator`` that specifies\n how to find the element. Most often the locator is given as a string\n using the locator syntax described below, but `using WebElements` is\n possible too.\n\n == Locator syntax ==\n\n SeleniumLibrary supports finding elements based on different strategies\n such as the element id, XPath expressions, or CSS selectors. The strategy\n can either be explicitly specified with a prefix or the strategy can be\n implicit.\n\n === Default locator strategy ===\n\n By default, locators are considered to use the keyword specific default\n locator strategy. All keywords support finding elements based on ``id``\n and ``name`` attributes, but some keywords support additional attributes\n or other values that make sense in their context. For example, `Click\n Link` supports the ``href`` attribute and the link text and addition\n to the normal ``id`` and ``name``.\n\n Examples:\n\n | `Click Element` | example | # Match based on ``id`` or ``name``. |\n | `Click Link` | example | # Match also based on link text and ``href``. |\n | `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. |\n\n If a locator accidentally starts with a prefix recognized as `explicit\n locator strategy` or `implicit XPath strategy`, it is possible to use\n the explicit ``default`` prefix to enable the default strategy.\n\n Examples:\n\n | `Click Element` | name:foo | # Find element with name ``foo``. |\n | `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. |\n | `Click Element` | //foo | # Find element using XPath ``//foo``. |\n | `Click Element` | default: //foo | # Use default strategy with value ``//foo``. |\n\n === Explicit locator strategy ===\n\n The explicit locator strategy is specified with a prefix using either\n syntax ``strategy:value`` or ``strategy=value``. The former syntax\n is preferred because the latter is identical to Robot Framework's\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax|\n named argument syntax] and that can cause problems. Spaces around\n the separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo``\n are all equivalent.\n\n Locator strategies that are supported by default are listed in the table\n below. In addition to them, it is possible to register `custom locators`.\n\n | = Strategy = | = Match based on = | = Example = |\n | id | Element ``id``. | ``id:example`` |\n | name | ``name`` attribute. | ``name:example`` |\n | identifier | Either ``id`` or ``name``. | ``identifier:example`` |\n | class | Element ``class``. | ``class:example`` |\n | tag | Tag name. | ``tag:div`` |\n | xpath | XPath expression. | ``xpath://div[@id=\"example\"]`` |\n | css | CSS selector. | ``css:div#example`` |\n | dom | DOM expression. | ``dom:document.images[5]`` |\n | link | Exact text a link has. | ``link:The example`` |\n | partial link | Partial link text. | ``partial link:he ex`` |\n | sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` |\n | data | Element ``data-*`` attribute | ``data:id:my_id`` |\n | jquery | jQuery expression. | ``jquery:div.example`` |\n | default | Keyword specific default behavior. | ``default:example`` |\n\n See the `Default locator strategy` section below for more information\n about how the default strategy works. Using the explicit ``default``\n prefix is only necessary if the locator value itself accidentally\n matches some of the explicit strategies.\n\n Different locator strategies have different pros and cons. Using ids,\n either explicitly like ``id:foo`` or by using the `default locator\n strategy` simply like ``foo``, is recommended when possible, because\n the syntax is simple and locating elements by id is fast for browsers.\n If an element does not have an id or the id is not stable, other\n solutions need to be used. If an element has a unique tag name or class,\n using ``tag``, ``class`` or ``css`` strategy like ``tag:h1``,\n ``class:example`` or ``css:h1.example`` is often an easy solution. In\n more complex cases using XPath expressions is typically the best\n approach. They are very powerful but a downside is that they can also\n get complex.\n\n Examples:\n\n | `Click Element` | id:foo | # Element with id 'foo'. |\n | `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. |\n | `Click Element` | xpath: //div[@id=\"foo\"]//h1 | # Same as the above using XPath, not CSS. |\n | `Click Element` | xpath: //*[contains(text(), \"example\")] | # Element containing text 'example'. |\n\n *NOTE:*\n\n - The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0\n and newer.\n - Using the ``sizzle`` strategy or its alias ``jquery`` requires that\n the system under test contains the jQuery library.\n - Prior to SeleniumLibrary 3.0, table related keywords only supported\n ``xpath``, ``css`` and ``sizzle/jquery`` strategies.\n - ``data`` strategy is conveniance locator that will construct xpath from the parameters.\n If you have element like `
`, you locate the element via\n ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0\n\n === Implicit XPath strategy ===\n\n If the locator starts with ``//`` or multiple opening parenthesis in front\n of the ``//``, the locator is considered to be an XPath expression. In other\n words, using ``//div`` is equivalent to using explicit ``xpath://div`` and\n ``((//div))`` is equivalent to using explicit ``xpath:((//div))``\n\n Examples:\n\n | `Click Element` | //div[@id=\"foo\"]//h1 |\n | `Click Element` | (//div)[2] |\n\n The support for the ``(//`` prefix is new in SeleniumLibrary 3.0.\n Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0.\n\n === Chaining locators ===\n\n It is possible chain multiple locators together as single locator. Each chained locator must start with locator\n strategy. Chained locators must be separated with single space, two greater than characters and followed with\n space. It is also possible mix different locator strategies, example css or xpath. Also a list can also be\n used to specify multiple locators. This is useful, is some part of locator would match as the locator separator\n but it should not. Or if there is need to existing WebElement as locator.\n\n Although all locators support chaining, some locator strategies do not abey the chaining. This is because\n some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context\n and not for the element found be the previous locator. Chaining is supported by locator strategies which\n are based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery\n\n Examples:\n | `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class \"bar\" |\n\n List examples:\n | ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), \" >> \"] |\n | `Page Should Contain Element` | ${locator_list} | | |\n | ${element} = | Get WebElement | xpath://*[text(), \" >> \"] | |\n | ${locator_list} = | `Create List` | css:div#div_id | ${element} |\n | `Page Should Contain Element` | ${locator_list} | | |\n\n Chaining locators in new in SeleniumLibrary 5.0\n\n == Using WebElements ==\n\n In addition to specifying a locator as a string, it is possible to use\n Selenium's WebElement objects. This requires first getting a WebElement,\n for example, by using the `Get WebElement` keyword.\n\n | ${elem} = | `Get WebElement` | id:example |\n | `Click Element` | ${elem} | |\n\n == Custom locators ==\n\n If more complex lookups are required than what is provided through the\n default locators, custom lookup strategies can be created. Using custom\n locators is a two part process. First, create a keyword that returns\n a WebElement that should be acted on:\n\n | Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} |\n | | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); |\n | | [Return] | ${element} |\n\n This keyword is a reimplementation of the basic functionality of the\n ``id`` locator where ``${browser}`` is a reference to a WebDriver\n instance and ``${locator}`` is the name of the locator strategy. To use\n this locator, it must first be registered by using the\n `Add Location Strategy` keyword:\n\n | `Add Location Strategy` | custom | Custom Locator Strategy |\n\n The first argument of `Add Location Strategy` specifies the name of\n the strategy and it must be unique. After registering the strategy,\n the usage is the same as with other locators:\n\n | `Click Element` | custom:example |\n\n See the `Add Location Strategy` keyword for more details.\n\n = Browser and Window =\n\n There is different conceptual meaning when SeleniumLibrary talks\n about windows or browsers. This chapter explains those differences.\n\n == Browser ==\n\n When `Open Browser` or `Create WebDriver` keyword is called, it\n will create a new Selenium WebDriver instance by using the\n [https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver]\n API. In SeleniumLibrary terms, a new browser is created. It is\n possible to start multiple independent browsers (Selenium Webdriver\n instances) at the same time, by calling `Open Browser` or\n `Create WebDriver` multiple times. These browsers are usually\n independent of each other and do not share data like cookies,\n sessions or profiles. Typically when the browser starts, it\n creates a single window which is shown to the user.\n\n == Window ==\n\n Windows are the part of a browser that loads the web site and presents\n it to the user. All content of the site is the content of the window.\n Windows are children of a browser. In SeleniumLibrary browser is a\n synonym for WebDriver instance. One browser may have multiple\n windows. Windows can appear as tabs, as separate windows or pop-ups with\n different position and size. Windows belonging to the same browser\n typically share the sessions detail, like cookies. If there is a\n need to separate sessions detail, example login with two different\n users, two browsers (Selenium WebDriver instances) must be created.\n New windows can be opened example by the application under test or\n by example `Execute Javascript` keyword:\n\n | `Execute Javascript` window.open() # Opens a new window with location about:blank\n\n The example below opens multiple browsers and windows,\n to demonstrate how the different keywords can be used to interact\n with browsers, and windows attached to these browsers.\n\n Structure:\n | BrowserA\n | Window 1 (location=https://robotframework.org/)\n | Window 2 (location=https://robocon.io/)\n | Window 3 (location=https://github.com/robotframework/)\n |\n | BrowserB\n | Window 1 (location=https://github.com/)\n\n Example:\n | `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. |\n | `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. |\n | `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA |\n | `Go To` | https://robocon.io | | | # Second window navigates to robocon site. |\n | `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. |\n | ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA |\n | `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. |\n | `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. |\n | ${location} | `Get Location` | | | # ${location} is: https://www.github.com |\n | `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. |\n | ${location} | `Get Location` | | | # ${location} = https://robocon.io/ |\n | @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). |\n | @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. |\n\n The above example, @{locations 1} contains the following items:\n https://robotframework.org/, https://robocon.io/ and\n https://github.com/robotframework/'. The @{locations 2}\n contains the following items: https://robotframework.org/,\n https://robocon.io/, https://github.com/robotframework/'\n and 'https://github.com/.\n\n = Timeouts, waits, and delays =\n\n This section discusses different ways how to wait for elements to\n appear on web pages and to slow down execution speed otherwise.\n It also explains the `time format` that can be used when setting various\n timeouts, waits, and delays.\n\n == Timeout ==\n\n SeleniumLibrary contains various keywords that have an optional\n ``timeout`` argument that specifies how long these keywords should\n wait for certain events or actions. These keywords include, for example,\n ``Wait ...`` keywords and keywords related to alerts. Additionally\n `Execute Async Javascript`. Although it does not have ``timeout``,\n argument, uses a timeout to define how long asynchronous JavaScript\n can run.\n\n The default timeout these keywords use can be set globally either by\n using the `Set Selenium Timeout` keyword or with the ``timeout`` argument\n when `importing` the library. If no default timeout is set globally, the\n default is 5 seconds. If None is specified for the timeout argument in the\n keywords, the default is used. See `time format` below for supported\n timeout syntax.\n\n == Implicit wait ==\n\n Implicit wait specifies the maximum time how long Selenium waits when\n searching for elements. It can be set by using the `Set Selenium Implicit\n Wait` keyword or with the ``implicit_wait`` argument when `importing`\n the library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp|\n Selenium documentation] for more information about this functionality.\n\n See `time format` below for supported syntax.\n\n == Page load ==\n Page load timeout is the amount of time to wait for page load to complete\n until a timeout exception is raised.\n\n The default page load timeout can be set globally\n when `importing` the library with the ``page_load_timeout`` argument\n or by using the `Set Selenium Page Load Timeout` keyword.\n\n See `time format` below for supported timeout syntax.\n\n Support for page load is new in SeleniumLibrary 6.1\n\n == Selenium speed ==\n\n Selenium execution speed can be slowed down globally by using `Set\n Selenium speed` keyword. This functionality is designed to be used for\n demonstrating or debugging purposes. Using it to make sure that elements\n appear on a page is not a good idea. The above-explained timeouts\n and waits should be used instead.\n\n See `time format` below for supported syntax.\n\n == Time format ==\n\n All timeouts and waits can be given as numbers considered seconds\n (e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax\n (e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about\n the time syntax see the\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide].\n\n = Run-on-failure functionality =\n\n SeleniumLibrary has a handy feature that it can automatically execute\n a keyword if any of its own keywords fails. By default, it uses the\n `Capture Page Screenshot` keyword, but this can be changed either by\n using the `Register Keyword To Run On Failure` keyword or with the\n ``run_on_failure`` argument when `importing` the library. It is\n possible to use any keyword from any imported library or resource file.\n\n The run-on-failure functionality can be disabled by using a special value\n ``NOTHING`` or anything considered false (see `Boolean arguments`)\n such as ``NONE``.\n\n = Boolean arguments =\n\n Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the\n boolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint].\n More details in Robot Framework\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide]\n\n Please note SeleniumLibrary 3 and 4 did have own custom methods to covert\n arguments to boolean values.\n\n = EventFiringWebDriver =\n\n The SeleniumLibrary offers support for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver].\n See the Selenium and SeleniumLibrary\n [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support]\n documentation for further details.\n\n EventFiringWebDriver is new in SeleniumLibrary 4.0\n\n = Thread support =\n\n SeleniumLibrary is not thread-safe. This is mainly due because the underlying\n [https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe|\n Selenium tool is not thread-safe] within one browser/driver instance.\n Because of the limitation in the Selenium side, the keywords or the\n API provided by the SeleniumLibrary is not thread-safe.\n\n = Plugins =\n\n SeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal\n functionality without creating a new library or hacking the source code. See\n [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API]\n documentation for further details.\n\n Plugin API is new SeleniumLibrary 4.0\n ", + "sha256": "59c13272c5a498ee00aa6f3e5e2d1f9cec5c355267e1b03f88c604f15dab6c4e" + } +} \ No newline at end of file diff --git a/utest/test/robotframework_seleniumlibrary_translation_list/__init__.py b/utest/test/robotframework_seleniumlibrary_translation_list/__init__.py new file mode 100644 index 000000000..4ccfe3f24 --- /dev/null +++ b/utest/test/robotframework_seleniumlibrary_translation_list/__init__.py @@ -0,0 +1,15 @@ +from pathlib import Path + + +def get_language() -> list: + curr_dir = Path(__file__).parent.absolute() + return [ + { + "language": "eng", + "path": curr_dir / "translate1.json" + }, + { + "language": "swe", + "path": curr_dir / "translate2.json" + } + ] \ No newline at end of file diff --git a/utest/test/robotframework_seleniumlibrary_translation_list/translate1.json b/utest/test/robotframework_seleniumlibrary_translation_list/translate1.json new file mode 100644 index 000000000..c0f6ab677 --- /dev/null +++ b/utest/test/robotframework_seleniumlibrary_translation_list/translate1.json @@ -0,0 +1,917 @@ +{ + "alert_should_be_present": { + "name": "1 alert_should_be_present", + "doc": "2 Verifies that an alert is present and by default, accepts it.\n\n Fails if no alert is present. If ``text`` is a non-empty string,\n then it is used to verify alert's message. The alert is accepted\n by default, but that behavior can be controlled by using the\n ``action`` argument same way as with `Handle Alert`.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n If it is not given, the global default `timeout` is used instead.\n\n ``action`` and ``timeout`` arguments are new in SeleniumLibrary 3.0.\n In earlier versions, the alert was always accepted and a timeout was\n hardcoded to one second.\n ", + "sha256": "c2389ab996f30509c4a5951f32dcfe2c8630040e00cedba19e19faa76a15299d" + }, + "alert_should_not_be_present": { + "name": "alert_should_not_be_present", + "doc": "Verifies that no alert is present.\n\n If the alert actually exists, the ``action`` argument determines\n how it should be handled. By default, the alert is accepted, but\n it can be also dismissed or left open the same way as with the\n `Handle Alert` keyword.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n By default, is not waited for the alert at all, but a custom time can\n be given if alert may be delayed. See the `time format` section\n for information about the syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "75343dfda0a68c40607e961ead1e104553ba074110f33627131125e8c11ecef0" + }, + "handle_alert": { + "name": "hallinnoi_hälytys", + "doc": "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi", + "sha256": "7620b9059b37d2cb1d5823256d0f71d32d3f66af153d6be8ff5100219d4270d6" + }, + "input_text_into_alert": { + "name": "input_text_into_alert", + "doc": "Types the given ``text`` into an input field in an alert.\n\n The alert is accepted by default, but that behavior can be controlled\n by using the ``action`` argument same way as with `Handle Alert`.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n If it is not given, the global default `timeout` is used instead.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "77f522107ebbde4fbcca0e9d1f1e31911dad7f3256ea39d078ed3365cfefbc46" + }, + "close_all_browsers": { + "name": "close_all_browsers", + "doc": "Closes all open browsers and resets the browser cache.\n\n After this keyword, new indexes returned from `Open Browser` keyword\n are reset to 1.\n\n This keyword should be used in test or suite teardown to make sure\n all browsers are closed.\n ", + "sha256": "34bfcab8a0c99c9fc0ebeeaec4432664ab8fbcc99673bd4bb3f9be2e897dbb5b" + }, + "close_browser": { + "name": "close_browser", + "doc": "Closes the current browser.", + "sha256": "a13d34e21bad1e0a76dab6f27c3f8b803825b8996c989f5b106918e27f0d0eb1" + }, + "create_webdriver": { + "name": "create_webdriver", + "doc": "Creates an instance of Selenium WebDriver.\n\n Like `Open Browser`, but allows passing arguments to the created\n WebDriver instance directly. This keyword should only be used if\n the functionality provided by `Open Browser` is not adequate.\n\n ``driver_name`` must be a WebDriver implementation name like Firefox,\n Chrome, Ie, Edge, Safari, or Remote.\n\n The initialized WebDriver can be configured either with a Python\n dictionary ``kwargs`` or by using keyword arguments ``**init_kwargs``.\n These arguments are passed directly to WebDriver without any\n processing. See [https://seleniumhq.github.io/selenium/docs/api/py/api.html|\n Selenium API documentation] for details about the supported arguments.\n\n Examples:\n | # Use proxy with Firefox | | | |\n | ${proxy}= | `Evaluate` | selenium.webdriver.Proxy() | modules=selenium, selenium.webdriver |\n | ${proxy.http_proxy}= | `Set Variable` | localhost:8888 | |\n | `Create Webdriver` | Firefox | proxy=${proxy} | |\n\n Returns the index of this browser instance which can be used later to\n switch back to it. Index starts from 1 and is reset back to it when\n `Close All Browsers` keyword is used. See `Switch Browser` for an\n example.\n ", + "sha256": "c7efa8a6295acc8336de8f8fdccec61b8a19cfc1b091382753929f9d86d2e292" + }, + "get_action_chain_delay": { + "name": "get_action_chain_delay", + "doc": "Gets the currently stored value for chain_delay_value in timestr format.\n ", + "sha256": "167a6689441f92c4099130c03e41a6c1595bcc1a37a207ac0f970b08b1591fdf" + }, + "get_browser_aliases": { + "name": "get_browser_aliases", + "doc": "Returns aliases of all active browser that has an alias as NormalizedDict.\n The dictionary contains the aliases as keys and the index as value.\n This can be accessed as dictionary ``${aliases.key}`` or as list ``@{aliases}[0]``.\n\n Example:\n | `Open Browser` | https://example.com | alias=BrowserA | |\n | `Open Browser` | https://example.com | alias=BrowserB | |\n | &{aliases} | `Get Browser Aliases` | | # &{aliases} = { BrowserA=1|BrowserB=2 } |\n | `Log` | ${aliases.BrowserA} | | # logs ``1`` |\n | FOR | ${alias} | IN | @{aliases} |\n | | `Log` | ${alias} | # logs ``BrowserA`` and ``BrowserB`` |\n | END | | | |\n\n See `Switch Browser` for more information and examples.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "defef82080de396568467a48c850a3db67484a7b786d8ebd76a3f3ba02c71dff" + }, + "get_browser_ids": { + "name": "get_browser_ids", + "doc": "Returns index of all active browser as list.\n\n Example:\n | @{browser_ids}= | Get Browser Ids | | |\n | FOR | ${id} | IN | @{browser_ids} |\n | | @{window_titles}= | Get Window Titles | browser=${id} |\n | | Log | Browser ${id} has these windows: ${window_titles} | |\n | END | | | |\n\n See `Switch Browser` for more information and examples.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "c320152b2a66ba066b100fb8c729f3d36c04a5b72ed753b09d29b6e13613a004" + }, + "get_location": { + "name": "get_location", + "doc": "Returns the current browser window URL.", + "sha256": "3dda250c7af426a85b6ec9c6be5ec5b4a4df41d4b2c72f0fa53b905384c29fc1" + }, + "get_selenium_implicit_wait": { + "name": "get_selenium_implicit_wait", + "doc": "Gets the implicit wait value used by Selenium.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Implicit wait` section above for more information.\n ", + "sha256": "f506381005ec3abf34b359df073e602f6589fac8d030a5369156016bbfacfde2" + }, + "get_selenium_page_load_timeout": { + "name": "get_selenium_page_load_timeout", + "doc": "Gets the time to wait for a page load to complete\n before raising a timeout exception.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Page load` section above for more information.\n\n New in SeleniumLibrary 6.1\n ", + "sha256": "18d82c9e55e7d06156a7fcccd2f96ddd6185a4c3625c344073a3f3e33d6e1e72" + }, + "get_selenium_speed": { + "name": "get_selenium_speed", + "doc": "Gets the delay that is waited after each Selenium command.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Selenium Speed` section above for more information.\n ", + "sha256": "e310cfaddced1d3088b673df4c7c469f10d3992116e2fabe048be986462febc5" + }, + "get_selenium_timeout": { + "name": "get_selenium_timeout", + "doc": "Gets the timeout that is used by various keywords.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Timeout` section above for more information.\n ", + "sha256": "9ebe70c2d1751c70d0f646c8c0e91e3c924ae6062c4c961432405b1fa2e0efe3" + }, + "get_session_id": { + "name": "get_session_id", + "doc": "Returns the currently active browser session id.\n\n New in SeleniumLibrary 3.2\n ", + "sha256": "26f4581c49c3930c0bbc7ff188330eff3bdb9822556ed029c8b47e5cb75949d2" + }, + "get_source": { + "name": "get_source", + "doc": "Returns the entire HTML source of the current page or frame.", + "sha256": "186bf0854602fddcbf9400b50a6db19549cfa23171c01e4708702cbfeaf4a921" + }, + "get_title": { + "name": "get_title", + "doc": "Returns the title of the current page.", + "sha256": "15ca2c42f74a7447ac29d6431219afa7b827245f9bd45e8d220c597c8c76ea72" + }, + "go_back": { + "name": "go_back", + "doc": "Simulates the user clicking the back button on their browser.", + "sha256": "c1ad3668ded03441f5e9019fe3e6417d6c0786fad522ef2d126b233112436ae7" + }, + "go_to": { + "name": "go_to", + "doc": "Navigates the current browser window to the provided ``url``.", + "sha256": "c7db5e459ba7a16a1e895bd0a948765b75bfc536284a2a50ac02e7153ccb0450" + }, + "location_should_be": { + "name": "location_should_be", + "doc": "Verifies that the current URL is exactly ``url``.\n\n The ``url`` argument contains the exact url that should exist in browser.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.2.0.\n ", + "sha256": "ea4b77e8386a52d7881a76cc42cf6c7754da4c44f1b54aa8d71467770a919839" + }, + "location_should_contain": { + "name": "location_should_contain", + "doc": "Verifies that the current URL contains ``expected``.\n\n The ``expected`` argument contains the expected value in url.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.2.0.\n ", + "sha256": "be7e648ca2a1f5a7d83f5fe99d0e9aef696f0c645b57985059179476c4d1d0ed" + }, + "log_location": { + "name": "log_location", + "doc": "Logs and returns the current browser window URL.", + "sha256": "ecdeee422f6587f42650730b5d1510d9f207cda56a2346fa3f6245ad62f4bac5" + }, + "log_source": { + "name": "log_source", + "doc": "Logs and returns the HTML source of the current page or frame.\n\n The ``loglevel`` argument defines the used log level. Valid log\n levels are ``WARN``, ``INFO`` (default), ``DEBUG``, ``TRACE``\n and ``NONE`` (no logging).\n ", + "sha256": "ccfb24c918224eb021f3f020cd9dd1375b128835d8295fc0a40d7f76c628d0b7" + }, + "log_title": { + "name": "log_title", + "doc": "Logs and returns the title of the current page.", + "sha256": "3722f0e150770d3b876af7a430c3a0e22f09a3b847c61b467cce146ed64ceea5" + }, + "open_browser": { + "name": "open_browser", + "doc": "Opens a new browser instance to the optional ``url``.\n\n The ``browser`` argument specifies which browser to use. The\n supported browsers are listed in the table below. The browser names\n are case-insensitive and some browsers have multiple supported names.\n\n | = Browser = | = Name(s) = |\n | Firefox | firefox, ff |\n | Google Chrome | googlechrome, chrome, gc |\n | Headless Firefox | headlessfirefox |\n | Headless Chrome | headlesschrome |\n | Internet Explorer | internetexplorer, ie |\n | Edge | edge |\n | Safari | safari |\n\n To be able to actually use one of these browsers, you need to have\n a matching Selenium browser driver available. See the\n [https://github.com/robotframework/SeleniumLibrary#browser-drivers|\n project documentation] for more details. Headless Firefox and\n Headless Chrome are new additions in SeleniumLibrary 3.1.0\n and require Selenium 3.8.0 or newer.\n\n After opening the browser, it is possible to use optional\n ``url`` to navigate the browser to the desired address.\n\n Optional ``alias`` is an alias given for this browser instance and\n it can be used for switching between browsers. When same ``alias``\n is given with two `Open Browser` keywords, the first keyword will\n open a new browser, but the second one will switch to the already\n opened browser and will not open a new browser. The ``alias``\n definition overrules ``browser`` definition. When same ``alias``\n is used but a different ``browser`` is defined, then switch to\n a browser with same alias is done and new browser is not opened.\n An alternative approach for switching is using an index returned\n by this keyword. These indices start from 1, are incremented when new\n browsers are opened, and reset back to 1 when `Close All Browsers`\n is called. See `Switch Browser` for more information and examples.\n\n Optional ``remote_url`` is the URL for a\n [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid].\n\n Optional ``desired_capabilities`` is deprecated and will be ignored. Capabilities of each\n individual browser is now done through options or services. Please refer to those arguments\n for configuring specific browsers.\n\n Optional ``ff_profile_dir`` is the path to the Firefox profile\n directory if you wish to overwrite the default profile Selenium\n uses. Notice that prior to SeleniumLibrary 3.0, the library\n contained its own profile that was used by default. The\n ``ff_profile_dir`` can also be an instance of the\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html|selenium.webdriver.FirefoxProfile]\n . As a third option, it is possible to use `FirefoxProfile` methods\n and attributes to define the profile using methods and attributes\n in the same way as with ``options`` argument. Example: It is possible\n to use FirefoxProfile `set_preference` to define different\n profile settings. See ``options`` argument documentation in below\n how to handle backslash escaping.\n\n Optional ``options`` argument allows defining browser specific\n Selenium options. Example for Chrome, the ``options`` argument\n allows defining the following\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|methods and attributes]\n and for Firefox these\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.options.html?highlight=firefox#selenium.webdriver.firefox.options.Options|methods and attributes]\n are available. Please note that not all browsers, supported by the\n SeleniumLibrary, have Selenium options available. Therefore please\n consult the Selenium documentation which browsers do support\n the Selenium options. Selenium options are also supported, when ``remote_url``\n argument is used.\n\n The SeleniumLibrary ``options`` argument accepts Selenium\n options in two different formats: as a string and as Python object\n which is an instance of the Selenium options class.\n\n The string format allows defining Selenium options methods\n or attributes and their arguments in Robot Framework test data.\n The method and attributes names are case and space sensitive and\n must match to the Selenium options methods and attributes names.\n When defining a method, it must be defined in a similar way as in\n python: method name, opening parenthesis, zero to many arguments\n and closing parenthesis. If there is a need to define multiple\n arguments for a single method, arguments must be separated with\n comma, just like in Python. Example: `add_argument(\"--headless\")`\n or `add_experimental_option(\"key\", \"value\")`. Attributes are\n defined in a similar way as in Python: attribute name, equal sign,\n and attribute value. Example, `headless=True`. Multiple methods\n and attributes must be separated by a semicolon. Example:\n `add_argument(\"--headless\");add_argument(\"--start-maximized\")`.\n\n Arguments allow defining Python data types and arguments are\n evaluated by using Python\n [https://docs.python.org/3/library/ast.html#ast.literal_eval|ast.literal_eval].\n Strings must be quoted with single or double quotes, example \"value\"\n or 'value'. It is also possible to define other Python builtin\n data types, example `True` or `None`, by not using quotes\n around the arguments.\n\n The string format is space friendly. Usually, spaces do not alter\n the defining methods or attributes. There are two exceptions.\n In some Robot Framework test data formats, two or more spaces are\n considered as cell separator and instead of defining a single\n argument, two or more arguments may be defined. Spaces in string\n arguments are not removed and are left as is. Example\n `add_argument ( \"--headless\" )` is same as\n `add_argument(\"--headless\")`. But `add_argument(\" --headless \")` is\n not same same as `add_argument ( \"--headless\" )`, because\n spaces inside of quotes are not removed. Please note that if\n options string contains backslash, example a Windows OS path,\n the backslash needs escaping both in Robot Framework data and\n in Python side. This means single backslash must be writen using\n four backslash characters. Example, Windows path:\n \"C:\\path\\to\\profile\" must be written as\n \"C:\\\\\\\\path\\\\\\to\\\\\\\\profile\". Another way to write\n backslash is use Python\n [https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals|raw strings]\n and example write: r\"C:\\\\path\\\\to\\\\profile\".\n\n As last format, ``options`` argument also supports receiving\n the Selenium options as Python class instance. In this case, the\n instance is used as-is and the SeleniumLibrary will not convert\n the instance to other formats.\n For example, if the following code return value is saved to\n `${options}` variable in the Robot Framework data:\n | options = webdriver.ChromeOptions()\n | options.add_argument('--disable-dev-shm-usage')\n | return options\n\n Then the `${options}` variable can be used as an argument to\n ``options``.\n\n Example the ``options`` argument can be used to launch Chomium-based\n applications which utilize the\n [https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver|Chromium Embedded Framework]\n . To lauch Chomium-based application, use ``options`` to define\n `binary_location` attribute and use `add_argument` method to define\n `remote-debugging-port` port for the application. Once the browser\n is opened, the test can interact with the embedded web-content of\n the system under test.\n\n Optional ``service_log_path`` argument defines the name of the\n file where to write the browser driver logs. If the\n ``service_log_path`` argument contain a marker ``{index}``, it\n will be automatically replaced with unique running\n index preventing files to be overwritten. Indices start's from 1,\n and how they are represented can be customized using Python's\n [https://docs.python.org/3/library/string.html#format-string-syntax|\n format string syntax].\n\n Optional ``executable_path`` argument defines the path to the driver\n executable, example to a chromedriver or a geckodriver. If not defined\n it is assumed the executable is in the\n [https://en.wikipedia.org/wiki/PATH_(variable)|$PATH].\n\n Examples:\n | `Open Browser` | http://example.com | Chrome | |\n | `Open Browser` | http://example.com | Firefox | alias=Firefox |\n | `Open Browser` | http://example.com | Edge | remote_url=http://127.0.0.1:4444/wd/hub |\n | `Open Browser` | about:blank | | |\n | `Open Browser` | browser=Chrome | | |\n\n Alias examples:\n | ${1_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Opens new browser because alias is new. |\n | ${2_index} = | `Open Browser` | http://example.com | Firefox | | # Opens new browser because alias is not defined. |\n | ${3_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Switches to the browser with Chrome alias. |\n | ${4_index} = | `Open Browser` | http://example.com | Chrome | alias=${1_index} | # Switches to the browser with Chrome alias. |\n | Should Be Equal | ${1_index} | ${3_index} | | | |\n | Should Be Equal | ${1_index} | ${4_index} | | | |\n | Should Be Equal | ${2_index} | ${2} | | | |\n\n Example when using\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|Chrome options]\n method:\n | `Open Browser` | http://example.com | Chrome | options=add_argument(\"--disable-popup-blocking\"); add_argument(\"--ignore-certificate-errors\") | # Sting format. |\n | ${options} = | Get Options | | | # Selenium options instance. |\n | `Open Browser` | http://example.com | Chrome | options=${options} | |\n | `Open Browser` | None | Chrome | options=binary_location=\"/path/to/binary\";add_argument(\"remote-debugging-port=port\") | # Start Chomium-based application. |\n | `Open Browser` | None | Chrome | options=binary_location=r\"C:\\\\path\\\\to\\\\binary\" | # Windows OS path escaping. |\n\n Example for FirefoxProfile\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=/path/to/profile | # Using profile from disk. |\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=${FirefoxProfile_instance} | # Using instance of FirefoxProfile. |\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=set_preference(\"key\", \"value\");set_preference(\"other\", \"setting\") | # Defining profile using FirefoxProfile mehtods. |\n\n If the provided configuration options are not enough, it is possible\n to use `Create Webdriver` to customize browser initialization even\n more.\n\n Applying ``desired_capabilities`` argument also for local browser is\n new in SeleniumLibrary 3.1.\n\n Using ``alias`` to decide, is the new browser opened is new\n in SeleniumLibrary 4.0. The ``options`` and ``service_log_path``\n are new in SeleniumLibrary 4.0. Support for ``ff_profile_dir``\n accepting an instance of the `selenium.webdriver.FirefoxProfile`\n and support defining FirefoxProfile with methods and\n attributes are new in SeleniumLibrary 4.0.\n\n Making ``url`` optional is new in SeleniumLibrary 4.1.\n\n The ``executable_path`` argument is new in SeleniumLibrary 4.2.\n ", + "sha256": "0c3f6191eb0bb2f557a3f93ab0c99c6137361091c73d09186c3846208a9ad7ff" + }, + "reload_page": { + "name": "reload_page", + "doc": "Simulates user reloading page.", + "sha256": "29308a1588c11a36ee1e46274959c9fb83b01fa628d38f7d1e60615cfa3c1d54" + }, + "set_action_chain_delay": { + "name": "set_action_chain_delay", + "doc": "Sets the duration of delay in ActionChains() used by SeleniumLibrary.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n\n Value is always stored as milliseconds internally.\n\n The previous value is returned and can be used to restore\n the original value later if needed.\n ", + "sha256": "30a861e88589e077326d025611cd558432a5426b6b002aface8b8367286eca24" + }, + "set_browser_implicit_wait": { + "name": "set_browser_implicit_wait", + "doc": "Sets the implicit wait value used by Selenium.\n\n Same as `Set Selenium Implicit Wait` but only affects the current\n browser.\n ", + "sha256": "a5097a7357967bebd69e46c700917daaa41994d0235b77da90ce0b88d1bd3518" + }, + "set_selenium_implicit_wait": { + "name": "set_selenium_implicit_wait", + "doc": "Sets the implicit wait value used by Selenium.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n This keyword sets the implicit wait for all opened browsers.\n Use `Set Browser Implicit Wait` to set it only to the current\n browser.\n\n See the `Implicit wait` section above for more information.\n\n Example:\n | ${orig wait} = | `Set Selenium Implicit Wait` | 10 seconds |\n | `Perform AJAX call that is slow` |\n | `Set Selenium Implicit Wait` | ${orig wait} |\n ", + "sha256": "1df9421daaba885bd06552d7b62030b285ac8472b98e09e0719554fd2448547c" + }, + "set_selenium_page_load_timeout": { + "name": "set_selenium_page_load_timeout", + "doc": "Sets the page load timeout value used by Selenium.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n In contrast to `Set Selenium Timeout` and `Set Selenium Implicit Wait`,\n this keywords sets the time for the Webdriver to wait until the page\n is loaded before raising a timeout exception.\n\n See the `Page load` section above for more information.\n\n Example:\n | ${orig page load timeout} = | `Set Selenium Page Load Timeout` | 30 seconds |\n | `Open page that loads slowly` |\n | `Set Selenium Page Load Timeout` | ${orig page load timeout} |\n\n New in SeleniumLibrary 6.1\n ", + "sha256": "37e2b5f6af58ce3b2e1d520c0c2d56b99cadf175dd31f1ccfb05de36c8cfdab0" + }, + "set_selenium_speed": { + "name": "set_selenium_speed", + "doc": "Sets the delay that is waited after each Selenium command.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n See the `Selenium Speed` section above for more information.\n\n Example:\n | `Set Selenium Speed` | 0.5 seconds |\n ", + "sha256": "143bd7c58689c676a711dcf2571cfdd8ee609325264bd632db2945dce3300ae5" + }, + "set_selenium_timeout": { + "name": "set_selenium_timeout", + "doc": "Sets the timeout that is used by various keywords.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n See the `Timeout` section above for more information.\n\n Example:\n | ${orig timeout} = | `Set Selenium Timeout` | 15 seconds |\n | `Open page that loads slowly` |\n | `Set Selenium Timeout` | ${orig timeout} |\n ", + "sha256": "6e78114e0e60f0148629589b897d6a67b1c492317eb883b2ca4f3c6457a5d01b" + }, + "switch_browser": { + "name": "switch_browser", + "doc": "Switches between active browsers using ``index_or_alias``.\n\n Indices are returned by the `Open Browser` keyword and aliases can\n be given to it explicitly. Indices start from 1.\n\n Example:\n | `Open Browser` | http://google.com | ff |\n | `Location Should Be` | http://google.com | |\n | `Open Browser` | http://yahoo.com | ie | alias=second |\n | `Location Should Be` | http://yahoo.com | |\n | `Switch Browser` | 1 | # index |\n | `Page Should Contain` | I'm feeling lucky | |\n | `Switch Browser` | second | # alias |\n | `Page Should Contain` | More Yahoo! | |\n | `Close All Browsers` | | |\n\n Above example expects that there was no other open browsers when\n opening the first one because it used index ``1`` when switching to\n it later. If you are not sure about that, you can store the index\n into a variable as below.\n\n | ${index} = | `Open Browser` | http://google.com |\n | # Do something ... | | |\n | `Switch Browser` | ${index} | |\n ", + "sha256": "de918f9e83ebecafb37ba3704649efb39dfbf405960597e1e99dddffdf69c1fb" + }, + "title_should_be": { + "name": "title_should_be", + "doc": "Verifies that the current page title equals ``title``.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.1.\n ", + "sha256": "f3ed755ed3bdbb8e7b334bce951620ceb83c3aca1cad51a31b2eea42260e1199" + }, + "add_cookie": { + "name": "add_cookie", + "doc": "Adds a cookie to your current session.\n\n ``name`` and ``value`` are required, ``path``, ``domain``, ``secure``\n and ``expiry`` are optional. Expiry supports the same formats as\n the [http://robotframework.org/robotframework/latest/libraries/DateTime.html|DateTime]\n library or an epoch timestamp.\n\n Example:\n | `Add Cookie` | foo | bar | |\n | `Add Cookie` | foo | bar | domain=example.com |\n | `Add Cookie` | foo | bar | expiry=2027-09-28 16:21:35 | # Expiry as timestamp. |\n | `Add Cookie` | foo | bar | expiry=1822137695 | # Expiry as epoch seconds. |\n\n Prior to SeleniumLibrary 3.0 setting expiry did not work.\n ", + "sha256": "4824fdf8e69148f3f74ed2a177fc4417caa1b7d24b5fd55378e8cdbd3ace04a5" + }, + "delete_all_cookies": { + "name": "delete_all_cookies", + "doc": "Deletes all cookies.", + "sha256": "3300bc6758bd113107fb425664eacbda4143514393c4d4197ac28626592b77c5" + }, + "delete_cookie": { + "name": "delete_cookie", + "doc": "Deletes the cookie matching ``name``.\n\n If the cookie is not found, nothing happens.\n ", + "sha256": "9f69becc9575a4dc10a09bebdcb7405fbfba883c8268c889baca4659ba549d04" + }, + "get_cookie": { + "name": "get_cookie", + "doc": "Returns information of cookie with ``name`` as an object.\n\n If no cookie is found with ``name``, keyword fails. The cookie object\n contains details about the cookie. Attributes available in the object\n are documented in the table below.\n\n | = Attribute = | = Explanation = |\n | name | The name of a cookie. |\n | value | Value of the cookie. |\n | path | Indicates a URL path, for example ``/``. |\n | domain | The domain, the cookie is visible to. |\n | secure | When true, the cookie is only used with HTTPS connections. |\n | httpOnly | When true, the cookie is not accessible via JavaScript. |\n | expiry | Python datetime object indicating when the cookie expires. |\n | extra | Possible attributes outside of the WebDriver specification |\n\n See the\n [https://w3c.github.io/webdriver/#cookies|WebDriver specification]\n for details about the cookie information.\n Notice that ``expiry`` is specified as a\n [https://docs.python.org/3/library/datetime.html#datetime.datetime|datetime object],\n not as seconds since Unix Epoch like WebDriver natively does.\n\n In some cases, example when running a browser in the cloud, it is possible that\n the cookie contains other attributes than is defined in the\n [https://w3c.github.io/webdriver/#cookies|WebDriver specification].\n These other attributes are available in an ``extra`` attribute in the cookie\n object and it contains a dictionary of the other attributes. The ``extra``\n attribute is new in SeleniumLibrary 4.0.\n\n Example:\n | `Add Cookie` | foo | bar |\n | ${cookie} = | `Get Cookie` | foo |\n | `Should Be Equal` | ${cookie.name} | foo |\n | `Should Be Equal` | ${cookie.value} | bar |\n | `Should Be True` | ${cookie.expiry.year} > 2017 |\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "747951f772be34600739a36f99d276499abc5137ddb8994e1773b68cc7c2e05b" + }, + "get_cookies": { + "name": "get_cookies", + "doc": "Returns all cookies of the current page.\n\n If ``as_dict`` argument evaluates as false, see `Boolean arguments`\n for more details, then cookie information is returned as\n a single string in format ``name1=value1; name2=value2; name3=value3``.\n When ``as_dict`` argument evaluates as true, cookie information\n is returned as Robot Framework dictionary format. The string format\n can be used, for example, for logging purposes or in headers when\n sending HTTP requests. The dictionary format is helpful when\n the result can be passed to requests library's Create Session\n keyword's optional cookies parameter.\n\n The `` as_dict`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "7a9bda6590cdb1aa8825e385ffefc087a7ca087936dd11350d6234e6e2c05e6c" + }, + "add_location_strategy": { + "name": "add_location_strategy", + "doc": "Adds a custom location strategy.\n\n See `Custom locators` for information on how to create and use\n custom strategies. `Remove Location Strategy` can be used to\n remove a registered strategy.\n\n Location strategies are automatically removed after leaving the\n current scope by default. Setting ``persist`` to a true value (see\n `Boolean arguments`) will cause the location strategy to stay\n registered throughout the life of the test.\n ", + "sha256": "046e816fd4d028592aaa9146fd815aec20809f88d4160fdf166fb19d5fdcfa0c" + }, + "assign_id_to_element": { + "name": "assign_id_to_element", + "doc": "Assigns a temporary ``id`` to the element specified by ``locator``.\n\n This is mainly useful if the locator is complicated and/or slow XPath\n expression and it is needed multiple times. Identifier expires when\n the page is reloaded.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | `Assign ID to Element` | //ul[@class='example' and ./li[contains(., 'Stuff')]] | my id |\n | `Page Should Contain Element` | my id |\n ", + "sha256": "2ce9ab7a44154be53f32d6d6e8b1b6e9dd8bbff880048c99ed4b62763a0b522c" + }, + "clear_element_text": { + "name": "clear_element_text", + "doc": "Clears the value of the text-input-element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "31d7803b76e63ff90ff333f06e323aba4f820632b8795d51d24242fb65f4e7d2" + }, + "click_button": { + "name": "click_button", + "doc": "Clicks the button identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "72dcaeaa3bc1a4e14c596d72a19cbd82e0881732440153cbfb27272b2066dd77" + }, + "click_element": { + "name": "click_element", + "doc": "Click the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``modifier`` argument can be used to pass\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys|Selenium Keys]\n when clicking the element. The `+` can be used as a separator\n for different Selenium Keys. The `CTRL` is internally translated to\n the `CONTROL` key. The ``modifier`` is space and case insensitive, example\n \"alt\" and \" aLt \" are supported formats to\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ALT|ALT key]\n . If ``modifier`` does not match to Selenium Keys, keyword fails.\n\n If ``action_chain`` argument is true, see `Boolean arguments` for more\n details on how to set boolean argument, then keyword uses ActionChain\n based click instead of the .click() function. If both\n ``action_chain`` and ``modifier`` are defined, the click will be\n performed using ``modifier`` and ``action_chain`` will be ignored.\n\n Example:\n | Click Element | id:button | | # Would click element without any modifiers. |\n | Click Element | id:button | CTRL | # Would click element with CTLR key pressed down. |\n | Click Element | id:button | CTRL+ALT | # Would click element with CTLR and ALT keys pressed down. |\n | Click Element | id:button | action_chain=True | # Clicks the button using an Selenium ActionChains |\n\n The ``modifier`` argument is new in SeleniumLibrary 3.2\n The ``action_chain`` argument is new in SeleniumLibrary 4.1\n ", + "sha256": "5099da1ff98ae3351fb740f301498066e1f86b8f9a6ef7f178e2b29d5d5afb35" + }, + "click_element_at_coordinates": { + "name": "click_element_at_coordinates", + "doc": "Click the element ``locator`` at ``xoffset/yoffset``.\n\n The Cursor is moved and the center of the element and x/y coordinates are\n calculated from that point.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "6c9be5ef41acf068a8ecf3972fe88f5f9c5257cf843d014dd9a76f7b4a3719c7" + }, + "click_image": { + "name": "click_image", + "doc": "Clicks an image identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "a83623f5affb23d6a089b6cab14e9983dd55eba3b11deedf672c6d2c3d387cf4" + }, + "click_link": { + "name": "click_link", + "doc": "Clicks a link identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "d8c5ec4c5359fed7c6a5094f5d18e8766b4dfb6f4e4d5ea1d61d50b7b09e7c31" + }, + "cover_element": { + "name": "cover_element", + "doc": "Will cover elements identified by ``locator`` with a blue div without breaking page layout.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.3.0\n\n Example:\n |`Cover Element` | css:div#container |\n ", + "sha256": "0dd30bea744e70b71f3e5fc5358833c291d404cdfa23970d09ece25f2380fb28" + }, + "double_click_element": { + "name": "double_click_element", + "doc": "Double clicks the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "c7b11722014178d683d80e276fcea367307d1d4cbe3b93b17cbbbe30b35b7174" + }, + "drag_and_drop": { + "name": "drag_and_drop", + "doc": "Drags the element identified by ``locator`` into the ``target`` element.\n\n The ``locator`` argument is the locator of the dragged element\n and the ``target`` is the locator of the target. See the\n `Locating elements` section for details about the locator syntax.\n\n Example:\n | `Drag And Drop` | css:div#element | css:div.target |\n ", + "sha256": "af13a511a462a2540dc93baf3bc42d05143aaf0de6ce9771029044a25b40bd64" + }, + "drag_and_drop_by_offset": { + "name": "drag_and_drop_by_offset", + "doc": "Drags the element identified with ``locator`` by ``xoffset/yoffset``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The element will be moved by ``xoffset`` and ``yoffset``, each of which\n is a negative or positive number specifying the offset.\n\n Example:\n | `Drag And Drop By Offset` | myElem | 50 | -35 | # Move myElem 50px right and 35px down |\n ", + "sha256": "89750f538dc14ca0c04fbe1a3aba732352f9723d658bbd971905003ee9c351f6" + }, + "element_attribute_value_should_be": { + "name": "element_attribute_value_should_be", + "doc": "Verifies element identified by ``locator`` contains expected attribute value.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n `Element Attribute Value Should Be` | css:img | href | value\n\n New in SeleniumLibrary 3.2.\n ", + "sha256": "330701ee8d3307c6543bdfeafa649d14689f639f2e139e499aae8ec495d7d015" + }, + "element_should_be_disabled": { + "name": "element_should_be_disabled", + "doc": "Verifies that element identified by ``locator`` is disabled.\n\n This keyword considers also elements that are read-only to be\n disabled.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "6f34019f6e68805c2b73ef5207b424743c9461dfd30061f163d21948304bb012" + }, + "element_should_be_enabled": { + "name": "element_should_be_enabled", + "doc": "Verifies that element identified by ``locator`` is enabled.\n\n This keyword considers also elements that are read-only to be\n disabled.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "014f8538093bdcef0ed8c7a13020ae513a4a14bd2d0b71f1843de951f5c7b5d3" + }, + "element_should_be_focused": { + "name": "element_should_be_focused", + "doc": "Verifies that element identified by ``locator`` is focused.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "f327420520f06421e0a11062af115eaa7bb3eaf97a0ae4b6f02c0c82c9fa1f73" + }, + "element_should_be_visible": { + "name": "element_should_be_visible", + "doc": "Verifies that the element identified by ``locator`` is visible.\n\n Herein, visible means that the element is logically visible, not\n optically visible in the current browser viewport. For example,\n an element that carries ``display:none`` is not logically visible,\n so using this keyword on that element would fail.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n ", + "sha256": "98c4fb9d0b90e73c3d702b553aa6a30f027320463eb18e298cd5b9133f1cc36a" + }, + "element_should_contain": { + "name": "element_should_contain", + "doc": "Verifies that element ``locator`` contains text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False. New in SeleniumLibrary 3.1.\n\n ``ignore_case`` argument is new in SeleniumLibrary 3.1.\n\n Use `Element Text Should Be` if you want to match the exact text,\n not a substring.\n ", + "sha256": "998a924785fef84597b5e5fc866f4c5d7e4b0a753cba68d15be0f3b44588c06d" + }, + "element_should_not_be_visible": { + "name": "element_should_not_be_visible", + "doc": "Verifies that the element identified by ``locator`` is NOT visible.\n\n Passes if the element does not exists. See `Element Should Be Visible`\n for more information about visibility and supported arguments.\n ", + "sha256": "811779774da3cf876101661d4c15a6e89ea0568493be61b19fded7a0bd40f0c4" + }, + "element_should_not_contain": { + "name": "element_should_not_contain", + "doc": "Verifies that element ``locator`` does not contain text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n ``ignore_case`` argument new in SeleniumLibrary 3.1.\n ", + "sha256": "ef9492bae813b1597fabc9d6f02a21c05ff736a18fb6eb20fb81e6ca40011437" + }, + "element_text_should_be": { + "name": "element_text_should_be", + "doc": "Verifies that element ``locator`` contains exact the text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n ``ignore_case`` argument is new in SeleniumLibrary 3.1.\n\n Use `Element Should Contain` if a substring match is desired.\n ", + "sha256": "4036c0bb4fe36085fcab4421f3ffb65265d70d8cb852106ea13a983438a77723" + }, + "element_text_should_not_be": { + "name": "element_text_should_not_be", + "doc": "Verifies that element ``locator`` does not contain exact the text ``not_expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n New in SeleniumLibrary 3.1.1\n ", + "sha256": "67821af845f34ba19ebffb38fa558c375f7261e3d9c9f04cb653bad828e99cf4" + }, + "get_all_links": { + "name": "get_all_links", + "doc": "Returns a list containing ids of all links found in current page.\n\n If a link has no id, an empty string will be in the list instead.\n ", + "sha256": "f17319af1acc205f3ee5fe01b5e8960bba45ff05629b4b1d2e4fdec770163c1a" + }, + "get_dom_attribute": { + "name": "get_dom_attribute", + "doc": "Returns the value of ``attribute`` from the element ``locator``. `Get DOM Attribute` keyword\n only returns attributes declared within the element's HTML markup. If the requested attribute\n is not there, the keyword returns ${None}.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${id}= | `Get DOM Attribute` | css:h1 | id |\n\n ", + "sha256": "1337e3b21fae3759b85da9dba5fda08378fd8ea4ff16b9d9a03fa54f1d75853f" + }, + "get_element_attribute": { + "name": "get_element_attribute", + "doc": "Returns the value of ``attribute`` from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${id}= | `Get Element Attribute` | css:h1 | id |\n\n Passing attribute name as part of the ``locator`` was removed\n in SeleniumLibrary 3.2. The explicit ``attribute`` argument\n should be used instead.\n ", + "sha256": "3325a9affcfb67bbb11b250a7479d125f3a7c0ca3e6b4772b35f873c6942a300" + }, + "get_element_count": { + "name": "get_element_count", + "doc": "Returns the number of elements matching ``locator``.\n\n If you wish to assert the number of matching elements, use\n `Page Should Contain Element` with ``limit`` argument. Keyword will\n always return an integer.\n\n Example:\n | ${count} = | `Get Element Count` | name:div_name |\n | `Should Be True` | ${count} > 2 | |\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "edc00542de29af7b4b11d459c21c6a8f87fd21233f49c1b9a5b4d8e06d0128f8" + }, + "get_element_size": { + "name": "get_element_size", + "doc": "Returns width and height of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Both width and height are returned as integers.\n\n Example:\n | ${width} | ${height} = | `Get Element Size` | css:div#container |\n ", + "sha256": "d1dc235938760fc871c68838032587be56a8ebb13dc295f68e9df6a03c72d266" + }, + "get_horizontal_position": { + "name": "get_horizontal_position", + "doc": "Returns the horizontal position of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The position is returned in pixels off the left side of the page,\n as an integer.\n\n See also `Get Vertical Position`.\n ", + "sha256": "7b81ffe406d7708e72861971ec879a7cdb3adff3cf3a6ad4c816c0b36de84a79" + }, + "get_property": { + "name": "get_property", + "doc": "Returns the value of ``property`` from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${text_length}= | `Get Property` | css:h1 | text_length |\n\n ", + "sha256": "6335a05f73d42212f78d4285872595fec96dbb4e669b8026b2e9bdab4f3284eb" + }, + "get_text": { + "name": "get_text", + "doc": "Returns the text value of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "c5df21cb13fca76338626c63ce4e0e83be2e5563eb296833f55678c3424ad333" + }, + "get_value": { + "name": "get_value", + "doc": "Returns the value attribute of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5856fe53c0581268a5a395418f08aedb118762d5ec8fbd553cf2d44b82aa27c6" + }, + "get_vertical_position": { + "name": "get_vertical_position", + "doc": "Returns the vertical position of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The position is returned in pixels off the top of the page,\n as an integer.\n\n See also `Get Horizontal Position`.\n ", + "sha256": "a1f1cc8075b6323bf4b900ea52357586f28721239e45ec11fb1a130faa9246c0" + }, + "get_webelement": { + "name": "get_webelement", + "doc": "Returns the first WebElement matching the given ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5deaaabc9162680121dbe744d4e476e40c7eacba17922459c209f211ba74b5cd" + }, + "get_webelements": { + "name": "get_webelements", + "doc": "Returns a list of WebElement objects matching the ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Starting from SeleniumLibrary 3.0, the keyword returns an empty\n list if there are no matching elements. In previous releases, the\n keyword failed in this case.\n ", + "sha256": "ab7b4634b7c54b2b17daf4c290704fe45af948eeff41f9dbc1c01fab33273496" + }, + "mouse_down": { + "name": "mouse_down", + "doc": "Simulates pressing the left mouse button on the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The element is pressed without releasing the mouse button.\n\n See also the more specific keywords `Mouse Down On Image` and\n `Mouse Down On Link`.\n ", + "sha256": "c0e5431b9b9eb6875830eadccc1ed0f9a9d34781ecef40ab059194054eeae9e4" + }, + "mouse_down_on_image": { + "name": "mouse_down_on_image", + "doc": "Simulates a mouse down event on an image identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n ", + "sha256": "3b7c0b9a83908e60012f095acc71305c853dd07864497077420f1a3930ea144c" + }, + "mouse_down_on_link": { + "name": "mouse_down_on_link", + "doc": "Simulates a mouse down event on a link identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n ", + "sha256": "8ef3134ef374ebc89f76985b09abd2caac10f603e8db38cf78dcbac9c826cc3e" + }, + "mouse_out": { + "name": "mouse_out", + "doc": "Simulates moving the mouse away from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "835368b635d5d1c5c50250595a8e7cb2feb9eb4af4fa14753c561a9c35894db1" + }, + "mouse_over": { + "name": "mouse_over", + "doc": "Simulates hovering the mouse over the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "b4c14a2a10cfddb07d7748630ba6546991d3da2311a20aa146685a0f78e41241" + }, + "mouse_up": { + "name": "mouse_up", + "doc": "Simulates releasing the left mouse button on the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "47c3666126bc84aa9104f6137fd51817efcd1804aaf7c965df143a6aad71895a" + }, + "open_context_menu": { + "name": "open_context_menu", + "doc": "Opens the context menu on the element identified by ``locator``.", + "sha256": "8cb9023a05753eb5cc230116dec98188b5bdfac0b94955b69957726131189493" + }, + "page_should_contain": { + "name": "page_should_contain", + "doc": "Verifies that current page contains ``text``.\n\n If this keyword fails, it automatically logs the page source\n using the log level specified with the optional ``loglevel``\n argument. Valid log levels are ``TRACE`` (default), ``DEBUG``,\n ``INFO``, ``WARN``, and ``NONE``. If the log level is ``NONE``\n or below the current active log level the source will not be logged.\n\n !! WARNING !! If you have an iframe selected, `Page Should Contain`\n will reset the frame reference back to the main frame. This is due\n to the fact that is searches for the ``text`` in all frames. To locate\n an element in an iframe after calling `Page Should Contian` one needs\n to (re)select the frame.\n ", + "sha256": "bb1186dbfae09e52cad4cad8def5bf2980085e48f75b6af2330bcd4da67477af" + }, + "page_should_contain_element": { + "name": "page_should_contain_element", + "doc": "Verifies that element ``locator`` is found on the current page.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``limit`` argument can used to define how many elements the\n page should contain. When ``limit`` is ``None`` (default) page can\n contain one or more elements. When limit is a number, page must\n contain same number of elements.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n\n Examples assumes that locator matches to two elements.\n | `Page Should Contain Element` | div_name | limit=1 | # Keyword fails. |\n | `Page Should Contain Element` | div_name | limit=2 | # Keyword passes. |\n | `Page Should Contain Element` | div_name | limit=none | # None is considered one or more. |\n | `Page Should Contain Element` | div_name | | # Same as above. |\n\n The ``limit`` argument is new in SeleniumLibrary 3.0.\n ", + "sha256": "d2c24d9ce997c94b3cd391306893b9d864c389a047c274ca1ab323e51f960f8e" + }, + "page_should_contain_image": { + "name": "page_should_contain_image", + "doc": "Verifies image identified by ``locator`` is found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "84ab3a648d3b18c5e266ba075408f3cb2ac3b736e1e2009a6cca125de5d07a50" + }, + "page_should_contain_link": { + "name": "page_should_contain_link", + "doc": "Verifies link identified by ``locator`` is found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "005f6565f4fcd9b91f87a2274c32fae7545619549be26f23b2cc06856e44ecba" + }, + "page_should_not_contain": { + "name": "page_should_not_contain", + "doc": "Verifies the current page does not contain ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "72389be32f084ed5a3716a32e833e117c419bc2c6ebfa525a79e69054bb2a8cc" + }, + "page_should_not_contain_element": { + "name": "page_should_not_contain_element", + "doc": "Verifies that element ``locator`` is not found on the current page.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n See `Page Should Contain` for an explanation about ``message`` and\n ``loglevel`` arguments.\n ", + "sha256": "3939f5d1fce87d85f013ae3e4327b50404cf832231d4ca2e677013808ee8ff92" + }, + "page_should_not_contain_image": { + "name": "page_should_not_contain_image", + "doc": "Verifies image identified by ``locator`` is not found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "7367c4581992c47a2fbd74fd0beccc254e883879f6b93f206242d0ecb6397448" + }, + "page_should_not_contain_link": { + "name": "page_should_not_contain_link", + "doc": "Verifies link identified by ``locator`` is not found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "61fca3076c7b671f21528f5d141ee7b43ecc1acada608b4157d08ecb38fae0e1" + }, + "press_key": { + "name": "press_key", + "doc": "Simulates user pressing key on element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n ``key`` is either a single character, a string, or a numerical ASCII\n code of the key lead by '\\'.\n\n Examples:\n | `Press Key` | text_field | q |\n | `Press Key` | text_field | abcde |\n | `Press Key` | login_button | \\13 | # ASCII code for enter key |\n\n `Press Key` and `Press Keys` differ in the methods to simulate key\n presses. `Press Key` uses the WebDriver `SEND_KEYS_TO_ELEMENT` command\n using the selenium send_keys method. Although one is not recommended\n over the other if `Press Key` does not work we recommend trying\n `Press Keys`.\n send_\n ", + "sha256": "fd4035762f6f532aed3cd2b93ad24002a51503e8a86cd7da956a3e2cf8a1038d" + }, + "press_keys": { + "name": "press_keys", + "doc": "Simulates the user pressing key(s) to an element or on the active browser.\n\n If ``locator`` evaluates as false, see `Boolean arguments` for more\n details, then the ``keys`` are sent to the currently active browser.\n Otherwise element is searched and ``keys`` are send to the element\n identified by the ``locator``. In later case, keyword fails if element\n is not found. See the `Locating elements` section for details about\n the locator syntax.\n\n ``keys`` arguments can contain one or many strings, but it can not\n be empty. ``keys`` can also be a combination of\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html|Selenium Keys]\n and strings or a single Selenium Key. If Selenium Key is combined\n with strings, Selenium key and strings must be separated by the\n `+` character, like in `CONTROL+c`. Selenium Keys\n are space and case sensitive and Selenium Keys are not parsed\n inside of the string. Example AALTO, would send string `AALTO`\n and `ALT` not parsed inside of the string. But `A+ALT+O` would\n found Selenium ALT key from the ``keys`` argument. It also possible\n to press many Selenium Keys down at the same time, example\n 'ALT+ARROW_DOWN`.\n\n If Selenium Keys are detected in the ``keys`` argument, keyword\n will press the Selenium Key down, send the strings and\n then release the Selenium Key. If keyword needs to send a Selenium\n Key as a string, then each character must be separated with\n `+` character, example `E+N+D`.\n\n `CTRL` is alias for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.CONTROL|Selenium CONTROL]\n and ESC is alias for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ESCAPE|Selenium ESCAPE]\n\n New in SeleniumLibrary 3.3\n\n Examples:\n | `Press Keys` | text_field | AAAAA | | # Sends string \"AAAAA\" to element. |\n | `Press Keys` | None | BBBBB | | # Sends string \"BBBBB\" to currently active browser. |\n | `Press Keys` | text_field | E+N+D | | # Sends string \"END\" to element. |\n | `Press Keys` | text_field | XXX | YY | # Sends strings \"XXX\" and \"YY\" to element. |\n | `Press Keys` | text_field | XXX+YY | | # Same as above. |\n | `Press Keys` | text_field | ALT+ARROW_DOWN | | # Pressing \"ALT\" key down, then pressing ARROW_DOWN and then releasing both keys. |\n | `Press Keys` | text_field | ALT | ARROW_DOWN | # Pressing \"ALT\" key and then pressing ARROW_DOWN. |\n | `Press Keys` | text_field | CTRL+c | | # Pressing CTRL key down, sends string \"c\" and then releases CTRL key. |\n | `Press Keys` | button | RETURN | | # Pressing \"ENTER\" key to element. |\n\n `Press Key` and `Press Keys` differ in the methods to simulate key\n presses. `Press Keys` uses the Selenium/WebDriver Actions.\n `Press Keys` also has a more extensive syntax for describing keys,\n key combinations, and key actions. Although one is not recommended\n over the other if `Press Keys` does not work we recommend trying\n `Press Key`.\n ", + "sha256": "549b119394b8f48407c11208e1f38c3f2c753e9a40b5c6f1f47b3320df3f3612" + }, + "remove_location_strategy": { + "name": "remove_location_strategy", + "doc": "Removes a previously added custom location strategy.\n\n See `Custom locators` for information on how to create and use\n custom strategies.\n ", + "sha256": "827184ef194cec97d793297edbc6544d2e6774a80a14136ccfa0d5cc04fbc09e" + }, + "scroll_element_into_view": { + "name": "scroll_element_into_view", + "doc": "Scrolls the element identified by ``locator`` into view.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.2.0\n ", + "sha256": "0d567a31d5b64fcfb38b47c2f5f452de4fbe3d08aa0c0547644d4c59b243ef60" + }, + "set_focus_to_element": { + "name": "set_focus_to_element", + "doc": "Sets the focus to the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Prior to SeleniumLibrary 3.0 this keyword was named `Focus`.\n ", + "sha256": "0b02399995113cd6ac38557106b4697e4d86f9874173ed593a8853e63362c74f" + }, + "simulate_event": { + "name": "simulate_event", + "doc": "Simulates ``event`` on the element identified by ``locator``.\n\n This keyword is useful if element has ``OnEvent`` handler that\n needs to be explicitly invoked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Prior to SeleniumLibrary 3.0 this keyword was named `Simulate`.\n ", + "sha256": "49cd268150ae4f3170f13d6b5a25809f41080efa3f3b5ca0fa2e2d8cd3ea7795" + }, + "wait_for_expected_condition": { + "name": "wait_for_expected_condition", + "doc": "Waits until ``condition`` is true or ``timeout`` expires.\n\n The condition must be one of selenium's expected condition which\n can be found within the selenium\n [https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions|Python API]\n documentation. The expected condition can written as snake_case\n (ex title_is) or it can be space delimited (ex Title Is). Some\n conditions require additional arguments or ``args`` which should\n be passed along after the expected condition.\n\n Fails if the timeout expires before the condition becomes true.\n The default value is 10 seconds.\n\n Examples:\n | `Wait For Expected Condition` | alert_is_present |\n | `Wait For Expected Condition` | Title Is | New Title |\n\n If the expected condition expects a locator then one can pass\n as arguments a tuple containing the selenium locator strategies\n and the locator.\n\n Example of expected condition expecting locator:\n | ${byElem}= | Evaluate (\"id\",\"added_btn\")\n | `Wait For Expected Condition` | Presence Of Element Located | ${byElem}\n ", + "sha256": "7e512f1e3c97525aa828d624627aaf3f8b76ac0ec1aaa507b36ff9c8fff34d5a" + }, + "checkbox_should_be_selected": { + "name": "checkbox_should_be_selected", + "doc": "Verifies checkbox ``locator`` is selected/checked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "e50bf6856c0f0c3f373adb3bcc3b7d677738088632055f507797887c9f822136" + }, + "checkbox_should_not_be_selected": { + "name": "checkbox_should_not_be_selected", + "doc": "Verifies checkbox ``locator`` is not selected/checked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "8488752a0365d5c94b3a7885d53b67f99d92ccc5687fdc59411b42a40fa95443" + }, + "choose_file": { + "name": "choose_file", + "doc": "Inputs the ``file_path`` into the file input field ``locator``.\n\n This keyword is most often used to input files into upload forms.\n The keyword does not check ``file_path`` is the file or folder\n available on the machine where tests are executed. If the ``file_path``\n points at a file and when using Selenium Grid, Selenium will\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.command.html?highlight=upload#selenium.webdriver.remote.command.Command.UPLOAD_FILE|magically],\n transfer the file from the machine where the tests are executed\n to the Selenium Grid node where the browser is running.\n Then Selenium will send the file path, from the nodes file\n system, to the browser.\n\n That ``file_path`` is not checked, is new in SeleniumLibrary 4.0.\n\n Example:\n | `Choose File` | my_upload_field | ${CURDIR}/trades.csv |\n ", + "sha256": "244543282ef6c62ec448fb42ed37706978ecf84aec27a9c7774fdd39bc84697c" + }, + "input_password": { + "name": "input_password", + "doc": "Types the given password into the text field identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. See `Input Text` for ``clear`` argument details.\n\n Difference compared to `Input Text` is that this keyword does not\n log the given password on the INFO level. Notice that if you use\n the keyword like\n\n | Input Password | password_field | password |\n\n the password is shown as a normal keyword argument. A way to avoid\n that is using variables like\n\n | Input Password | password_field | ${PASSWORD} |\n\n Please notice that Robot Framework logs all arguments using\n the TRACE level and tests must not be executed using level below\n DEBUG if the password should not be logged in any format.\n\n The `clear` argument is new in SeleniumLibrary 4.0. Hiding password\n logging from Selenium logs is new in SeleniumLibrary 4.2.\n ", + "sha256": "2471a62ea46d3d4815fe3700c92b61bd4abee39926bc4dadeb072bb88ba69fd5" + }, + "input_text": { + "name": "input_text", + "doc": "Types the given ``text`` into the text field identified by ``locator``.\n\n When ``clear`` is true, the input element is cleared before\n the text is typed into the element. When false, the previous text\n is not cleared from the element. Use `Input Password` if you\n do not want the given ``text`` to be logged.\n\n If [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid]\n is used and the ``text`` argument points to a file in the file system,\n then this keyword prevents the Selenium to transfer the file to the\n Selenium Grid hub. Instead, this keyword will send the ``text`` string\n as is to the element. If a file should be transferred to the hub and\n upload should be performed, please use `Choose File` keyword.\n\n See the `Locating elements` section for details about the locator\n syntax. See the `Boolean arguments` section how Boolean values are\n handled.\n\n Disabling the file upload the Selenium Grid node and the `clear`\n argument are new in SeleniumLibrary 4.0\n ", + "sha256": "77be02dfff6bb6cc9d97af190e48a4c333913ca5058e67c85a4055bb84a9f494" + }, + "page_should_contain_button": { + "name": "page_should_contain_button", + "doc": "Verifies button ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n ", + "sha256": "f5fdc2763607b8a19e0dcbc2c8bc0512959193b4312232d89bdf5e3c1287ee25" + }, + "page_should_contain_checkbox": { + "name": "page_should_contain_checkbox", + "doc": "Verifies checkbox ``locator`` is found from the current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "827b0517772c7f3d0a8c9c41a1557892b98f0c9ee7228aa80a17df7d1766b338" + }, + "page_should_contain_radio_button": { + "name": "page_should_contain_radio_button", + "doc": "Verifies radio button ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, radio buttons are\n searched using ``id``, ``name`` and ``value``.\n ", + "sha256": "a1bd5c4a731ebb21b599006d59a7c7d163da5fb64ca87ac20d853559ff948a95" + }, + "page_should_contain_textfield": { + "name": "page_should_contain_textfield", + "doc": "Verifies text field ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7b7414371c1321271f8616d6668e9b94001ab4443df27f26fe10c5e968be00c5" + }, + "page_should_not_contain_button": { + "name": "page_should_not_contain_button", + "doc": "Verifies button ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n ", + "sha256": "c8b007d236e708e3d637b414d88b333f31bc64f396fe9034bc79be14288666ed" + }, + "page_should_not_contain_checkbox": { + "name": "page_should_not_contain_checkbox", + "doc": "Verifies checkbox ``locator`` is not found from the current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "88204d5dcc80e3fed6bfc74f5b2e02a3507d9ac290faf29c5818f54fc7c7109d" + }, + "page_should_not_contain_radio_button": { + "name": "page_should_not_contain_radio_button", + "doc": "Verifies radio button ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, radio buttons are\n searched using ``id``, ``name`` and ``value``.\n ", + "sha256": "f2310d4b57e4303ef5f38cc2cdc705ca95582a56ced04899d806beab1a63cef0" + }, + "page_should_not_contain_textfield": { + "name": "page_should_not_contain_textfield", + "doc": "Verifies text field ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2d91d04a7f6bb6ffd6fb86459718e337880326ddbba3a1631de12737ecab5339" + }, + "radio_button_should_be_set_to": { + "name": "radio_button_should_be_set_to", + "doc": "Verifies radio button group ``group_name`` is set to ``value``.\n\n ``group_name`` is the ``name`` of the radio button group.\n ", + "sha256": "baedeb274f24cfa1951591b65fd654551c128c26db397414fce039f3c2ef68cc" + }, + "radio_button_should_not_be_selected": { + "name": "radio_button_should_not_be_selected", + "doc": "Verifies radio button group ``group_name`` has no selection.\n\n ``group_name`` is the ``name`` of the radio button group.\n ", + "sha256": "552945bd4776a7545990b26941784cf5a8bd5d1725fb1ccd6241d7f4404dea0e" + }, + "select_checkbox": { + "name": "select_checkbox", + "doc": "Selects the checkbox identified by ``locator``.\n\n Does nothing if checkbox is already selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "a864b4289721b7356ee6cc8f51612cdb5b91f5e439a264380665dd3c359cf09a" + }, + "select_radio_button": { + "name": "select_radio_button", + "doc": "Sets the radio button group ``group_name`` to ``value``.\n\n The radio button to be selected is located by two arguments:\n - ``group_name`` is the name of the radio button group.\n - ``value`` is the ``id`` or ``value`` attribute of the actual\n radio button.\n\n Examples:\n | `Select Radio Button` | size | XL |\n | `Select Radio Button` | contact | email |\n ", + "sha256": "ffbddc133ea67fa89fc81c47e311a5c1c0d17de62b307fb25cb0811ebf995909" + }, + "submit_form": { + "name": "submit_form", + "doc": "Submits a form identified by ``locator``.\n\n If ``locator`` is not given, first form on the page is submitted.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "19787cfd196cb398177f114d219b7047839b1b875ad44e4741c02be1f2219fb7" + }, + "textarea_should_contain": { + "name": "textarea_should_contain", + "doc": "Verifies text area ``locator`` contains text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "1f0212530a7318d4b84aab2f76e6a786698c18553eb45f6d7b5ce1526aa8806a" + }, + "textarea_value_should_be": { + "name": "textarea_value_should_be", + "doc": "Verifies text area ``locator`` has exactly text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "351e1fbde625caa68c16d8203c380853b86f12203e2a58fe32fed5154779df55" + }, + "textfield_should_contain": { + "name": "textfield_should_contain", + "doc": "Verifies text field ``locator`` contains text ``expected``.\n\n ``message`` can be used to override the default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "8d542b446cce4ae3a59f57d2492144fa0264dc10bcc29a7a75e210368e7b24a9" + }, + "textfield_value_should_be": { + "name": "textfield_value_should_be", + "doc": "Verifies text field ``locator`` has exactly text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "bf88210c7d1673f6f28e6a5af94ecca2f23d655f0da09f31557b5d619ca4bb83" + }, + "unselect_checkbox": { + "name": "unselect_checkbox", + "doc": "Removes the selection of checkbox identified by ``locator``.\n\n Does nothing if the checkbox is not selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "73e850a91f88669d5f169f1da487263b966b34b9d5979fa7eacc353b9af6d3ad" + }, + "current_frame_should_contain": { + "name": "current_frame_should_contain", + "doc": "Verifies that the current frame contains ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n\n Prior to SeleniumLibrary 3.0 this keyword was named\n `Current Frame Contains`.\n ", + "sha256": "d42932ad52a7f5a80466c5fc70cde1994b5dc91e42d5a92d5a4c84c5952106bc" + }, + "current_frame_should_not_contain": { + "name": "current_frame_should_not_contain", + "doc": "Verifies that the current frame does not contain ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "39c919106caf859d8c436e8334ba7dbfbaaadc761810034f9c24433ef930029d" + }, + "frame_should_contain": { + "name": "frame_should_contain", + "doc": "Verifies that frame identified by ``locator`` contains ``text``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "e7cf02e4cd77e7196d87f875db7285146a629fe895b3576c9dbd33ae4ab362fd" + }, + "select_frame": { + "name": "select_frame", + "doc": "Sets frame identified by ``locator`` as the current frame.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Works both with frames and iframes. Use `Unselect Frame` to cancel\n the frame selection and return to the main frame.\n\n Example:\n | `Select Frame` | top-frame | # Select frame with id or name 'top-frame' |\n | `Click Link` | example | # Click link 'example' in the selected frame |\n | `Unselect Frame` | | # Back to main frame. |\n | `Select Frame` | //iframe[@name='xxx'] | # Select frame using xpath |\n ", + "sha256": "c2c67edf46d18644488c6395a750e293ab150011cdcdfe0741481328e01163f6" + }, + "unselect_frame": { + "name": "unselect_frame", + "doc": "Sets the main frame as the current frame.\n\n In practice cancels the previous `Select Frame` call.\n ", + "sha256": "9fc68af60f0d437e37ccc1fccb858b2c6554427f3f269518d4e7f849df3c43ec" + }, + "execute_async_javascript": { + "name": "execute_async_javascript", + "doc": "Executes asynchronous JavaScript code with possible arguments.\n\n Similar to `Execute Javascript` except that scripts executed with\n this keyword must explicitly signal they are finished by invoking the\n provided callback. This callback is always injected into the executed\n function as the last argument.\n\n Scripts must complete within the script timeout or this keyword will\n fail. See the `Timeout` section for more information.\n\n Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_async_script|\n arguments] as part of ``code`` argument. See `Execute Javascript` for\n more details.\n\n Examples:\n | `Execute Async JavaScript` | var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 2000); |\n | `Execute Async JavaScript` | ${CURDIR}/async_js_to_execute.js |\n | ${result} = | `Execute Async JavaScript` |\n | ... | var callback = arguments[arguments.length - 1]; |\n | ... | function answer(){callback(\"text\");}; |\n | ... | window.setTimeout(answer, 2000); |\n | `Should Be Equal` | ${result} | text |\n ", + "sha256": "a67bddb89758620a690da6f26a06985d8a546d32da40a6509296e93dc1f68c51" + }, + "execute_javascript": { + "name": "execute_javascript", + "doc": "Executes the given JavaScript code with possible arguments.\n\n ``code`` may be divided into multiple cells in the test data and\n ``code`` may contain multiple lines of code and arguments. In that case,\n the JavaScript code parts are concatenated together without adding\n spaces and optional arguments are separated from ``code``.\n\n If ``code`` is a path to an existing file, the JavaScript\n to execute will be read from that file. Forward slashes work as\n a path separator on all operating systems.\n\n The JavaScript executes in the context of the currently selected\n frame or window as the body of an anonymous function. Use ``window``\n to refer to the window of your application and ``document`` to refer\n to the document object of the current frame or window, e.g.\n ``document.getElementById('example')``.\n\n This keyword returns whatever the executed JavaScript code returns.\n Return values are converted to the appropriate Python types.\n\n Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_script|\n arguments] as part of ``code`` argument. The JavaScript code and\n arguments must be separated with `JAVASCRIPT` and `ARGUMENTS` markers\n and must be used exactly with this format. If the Javascript code is\n first, then the `JAVASCRIPT` marker is optional. The order of\n `JAVASCRIPT` and `ARGUMENTS` markers can be swapped, but if `ARGUMENTS`\n is the first marker, then `JAVASCRIPT` marker is mandatory. It is only\n allowed to use `JAVASCRIPT` and `ARGUMENTS` markers only one time in the\n ``code`` argument.\n\n Examples:\n | `Execute JavaScript` | window.myFunc('arg1', 'arg2') |\n | `Execute JavaScript` | ${CURDIR}/js_to_execute.js |\n | `Execute JavaScript` | alert(arguments[0]); | ARGUMENTS | 123 |\n | `Execute JavaScript` | ARGUMENTS | 123 | JAVASCRIPT | alert(arguments[0]); |\n ", + "sha256": "5037e85a542b11eebcf4a3fd0b9eae560f17cd117b7fdfc9c7148c9091b44cc4" + }, + "register_keyword_to_run_on_failure": { + "name": "register_keyword_to_run_on_failure", + "doc": "Sets the keyword to execute, when a SeleniumLibrary keyword fails.\n\n ``keyword`` is the name of a keyword that will be executed if a\n SeleniumLibrary keyword fails. It is possible to use any available\n keyword, including user keywords or keywords from other libraries,\n but the keyword must not take any arguments.\n\n The initial keyword to use is set when `importing` the library, and\n the keyword that is used by default is `Capture Page Screenshot`.\n Taking a screenshot when something failed is a very useful\n feature, but notice that it can slow down the execution.\n\n It is possible to use string ``NOTHING`` or ``NONE``,\n case-insensitively, as well as Python ``None`` to disable this\n feature altogether.\n\n This keyword returns the name of the previously registered\n failure keyword or Python ``None`` if this functionality was\n previously disabled. The return value can be always used to\n restore the original value later.\n\n Example:\n | `Register Keyword To Run On Failure` | Log Source |\n | ${previous kw}= | `Register Keyword To Run On Failure` | NONE |\n | `Register Keyword To Run On Failure` | ${previous kw} |\n\n Changes in SeleniumLibrary 3.0:\n - Possible to use string ``NONE`` or Python ``None`` to disable the\n functionality.\n - Return Python ``None`` when the functionality was disabled earlier.\n In previous versions special value ``No Keyword`` was returned and\n it could not be used to restore the original state.\n ", + "sha256": "9eaadf25a89adfb670897301330147203808d9cec135d82015215fe7a14c7313" + }, + "capture_element_screenshot": { + "name": "capture_element_screenshot", + "doc": "Captures a screenshot from the element identified by ``locator`` and embeds it into log file.\n\n See `Capture Page Screenshot` for details about ``filename`` argument.\n See the `Locating elements` section for details about the locator\n syntax.\n\n An absolute path to the created element screenshot is returned.\n\n Support for capturing the screenshot from an element has limited support\n among browser vendors. Please check the browser vendor driver documentation\n does the browser support capturing a screenshot from an element.\n\n New in SeleniumLibrary 3.3. Support for EMBED is new in SeleniumLibrary 4.2.\n\n Examples:\n | `Capture Element Screenshot` | id:image_id | |\n | `Capture Element Screenshot` | id:image_id | ${OUTPUTDIR}/id_image_id-1.png |\n | `Capture Element Screenshot` | id:image_id | EMBED |\n ", + "sha256": "a5dabc5a6525bca9796834b47e1fff61557439b12dd78240701233af0b95c73f" + }, + "capture_page_screenshot": { + "name": "capture_page_screenshot", + "doc": "Takes a screenshot of the current page and embeds it into a log file.\n\n ``filename`` argument specifies the name of the file to write the\n screenshot into. The directory where screenshots are saved can be\n set when `importing` the library or by using the `Set Screenshot\n Directory` keyword. If the directory is not configured, screenshots\n are saved to the same directory where Robot Framework's log file is\n written.\n\n If ``filename`` equals to EMBED (case insensitive), then screenshot\n is embedded as Base64 image to the log.html. In this case file is not\n created in the filesystem.\n\n Starting from SeleniumLibrary 1.8, if ``filename`` contains marker\n ``{index}``, it will be automatically replaced with an unique running\n index, preventing files to be overwritten. Indices start from 1,\n and how they are represented can be customized using Python's\n [https://docs.python.org/3/library/string.html#format-string-syntax|\n format string syntax].\n\n An absolute path to the created screenshot file is returned or if\n ``filename`` equals to EMBED, word `EMBED` is returned.\n\n Support for EMBED is new in SeleniumLibrary 4.2\n\n Examples:\n | `Capture Page Screenshot` | |\n | `File Should Exist` | ${OUTPUTDIR}/selenium-screenshot-1.png |\n | ${path} = | `Capture Page Screenshot` |\n | `File Should Exist` | ${OUTPUTDIR}/selenium-screenshot-2.png |\n | `File Should Exist` | ${path} |\n | `Capture Page Screenshot` | custom_name.png |\n | `File Should Exist` | ${OUTPUTDIR}/custom_name.png |\n | `Capture Page Screenshot` | custom_with_index_{index}.png |\n | `File Should Exist` | ${OUTPUTDIR}/custom_with_index_1.png |\n | `Capture Page Screenshot` | formatted_index_{index:03}.png |\n | `File Should Exist` | ${OUTPUTDIR}/formatted_index_001.png |\n | `Capture Page Screenshot` | EMBED |\n | `File Should Not Exist` | EMBED |\n ", + "sha256": "271132ea5ad25ba3e6182db7560e7eaf512df0bae8f437f756419b9611a4bebe" + }, + "set_screenshot_directory": { + "name": "set_screenshot_directory", + "doc": "Sets the directory for captured screenshots.\n\n ``path`` argument specifies the absolute path to a directory where\n the screenshots should be written to. If the directory does not\n exist, it will be created. The directory can also be set when\n `importing` the library. If it is not configured anywhere,\n screenshots are saved to the same directory where Robot Framework's\n log file is written.\n\n If ``path`` equals to EMBED (case insensitive) and\n `Capture Page Screenshot` or `capture Element Screenshot` keywords\n filename argument is not changed from the default value, then\n the page or element screenshot is embedded as Base64 image to\n the log.html.\n\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n Returning the previous value is new in SeleniumLibrary 3.0.\n The persist argument was removed in SeleniumLibrary 3.2 and\n EMBED is new in SeleniumLibrary 4.2.\n ", + "sha256": "c8241dd4f1113b3db620de1f45f2390c227b081400b04e0178561dde2c38748e" + }, + "get_list_items": { + "name": "get_list_items", + "doc": "Returns all labels or values of selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Returns visible labels by default, but values can be returned by\n setting the ``values`` argument to a true value (see `Boolean\n arguments`).\n\n Example:\n | ${labels} = | `Get List Items` | mylist | |\n | ${values} = | `Get List Items` | css:#example select | values=True |\n\n Support to return values is new in SeleniumLibrary 3.0.\n ", + "sha256": "60f7293239f288f08276b8fa63d98a6be52ff42a0627b9b0da14ba6dab51bd94" + }, + "get_selected_list_label": { + "name": "get_selected_list_label", + "doc": "Returns the label of selected option from selection list ``locator``.\n\n If there are multiple selected options, the label of the first option\n is returned.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "f9281509d3c4ac39f4b98d9d9d4f0f2dd6b579c37204b33ec7d47b6bef999672" + }, + "get_selected_list_labels": { + "name": "get_selected_list_labels", + "doc": "Returns labels of selected options from selection list ``locator``.\n\n Starting from SeleniumLibrary 3.0, returns an empty list if there\n are no selections. In earlier versions, this caused an error.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "e3bf2c1db04dbb52c99c7397065da52699bb4b7bdc5ceaeb45d525e8176acb48" + }, + "get_selected_list_value": { + "name": "get_selected_list_value", + "doc": "Returns the value of selected option from selection list ``locator``.\n\n If there are multiple selected options, the value of the first option\n is returned.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2b935dd4627ca62d92a311569036b2978032aa67e542f5b7ef91a514f01f323d" + }, + "get_selected_list_values": { + "name": "get_selected_list_values", + "doc": "Returns values of selected options from selection list ``locator``.\n\n Starting from SeleniumLibrary 3.0, returns an empty list if there\n are no selections. In earlier versions, this caused an error.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "83b79c56056a6d51529e36a093ba14ec0b805a96bdb9e6870214eb4de987bea6" + }, + "list_selection_should_be": { + "name": "list_selection_should_be", + "doc": "Verifies selection list ``locator`` has ``expected`` options selected.\n\n It is possible to give expected options both as visible labels and\n as values. Starting from SeleniumLibrary 3.0, mixing labels and\n values is not possible. Order of the selected options is not\n validated.\n\n If no expected options are given, validates that the list has\n no selections. A more explicit alternative is using `List Should\n Have No Selections`.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Examples:\n | `List Selection Should Be` | gender | Female | |\n | `List Selection Should Be` | interests | Test Automation | Python |\n ", + "sha256": "1d70ccc8a2dc868e265fc29e9cbc2317799eb12d0dd3f21d61fa4ffea7a7e4c2" + }, + "list_should_have_no_selections": { + "name": "list_should_have_no_selections", + "doc": "Verifies selection list ``locator`` has no options selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "429fc50c47319d8267bc5c2306a7d1d191a124d457a6f6655bb4ff5d64d71def" + }, + "page_should_contain_list": { + "name": "page_should_contain_list", + "doc": "Verifies selection list ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "9ad2d87bd51bee3365d5ca32153adae2ea4b137f916f07fc39416a54aa117bf6" + }, + "page_should_not_contain_list": { + "name": "page_should_not_contain_list", + "doc": "Verifies selection list ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2f2e58b399f73b2ab4dc795368b0b18b9a63c37e2764de722d897039d6e7881c" + }, + "select_all_from_list": { + "name": "select_all_from_list", + "doc": "Selects all options from multi-selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7113bdf3faec639e3bdb3b1beb09c526dec522a0181ae11fd94398fdfb3f6fd2" + }, + "select_from_list_by_index": { + "name": "select_from_list_by_index", + "doc": "Selects options from selection list ``locator`` by ``indexes``.\n\n Indexes of list options start from 0.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "220f77e512662cfff307efa29f5b46dba2e0d1b04760707cface96f63ff87e7c" + }, + "select_from_list_by_label": { + "name": "select_from_list_by_label", + "doc": "Selects options from selection list ``locator`` by ``labels``.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "12c2af99cb8c78b6edd06ee17d902a575d1a2a4932d21bb67b040233a5a80318" + }, + "select_from_list_by_value": { + "name": "select_from_list_by_value", + "doc": "Selects options from selection list ``locator`` by ``values``.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "9989cd962aeddb746a6ac8c632023bb9fbbe1ae832ae618635fb1c072049d7ab" + }, + "unselect_all_from_list": { + "name": "unselect_all_from_list", + "doc": "Unselects all options from multi-selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "e273c674b217707452b897e66ccfa2ff12ef2279198364b4f95350b0cc557c4c" + }, + "unselect_from_list_by_index": { + "name": "unselect_from_list_by_index", + "doc": "Unselects options from selection list ``locator`` by ``indexes``.\n\n Indexes of list options start from 0. This keyword works only with\n multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5aac4cc2fa0bec90621d29b2eac7064d18510c447b7357d8eb5948d2cd459cef" + }, + "unselect_from_list_by_label": { + "name": "unselect_from_list_by_label", + "doc": "Unselects options from selection list ``locator`` by ``labels``.\n\n This keyword works only with multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "3dfe87450d9a1a8cad3f8cad3e159b8bd4c3e25f25f91dd747aeb23403b18ab5" + }, + "unselect_from_list_by_value": { + "name": "unselect_from_list_by_value", + "doc": "Unselects options from selection list ``locator`` by ``values``.\n\n This keyword works only with multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7ee06a01319ea95e02d4ba34cfbc0d845cf5dbaf58244d93338760609a67ec02" + }, + "get_table_cell": { + "name": "get_table_cell", + "doc": "Returns contents of a table cell.\n\n The table is located using the ``locator`` argument and its cell\n found using ``row`` and ``column``. See the `Locating elements`\n section for details about the locator syntax.\n\n Both row and column indexes start from 1, and header and footer\n rows are included in the count. It is possible to refer to rows\n and columns from the end by using negative indexes so that -1\n is the last row/column, -2 is the second last, and so on.\n\n All ```` and ```` elements anywhere in the table are\n considered to be cells.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "616f2d925fbd431f1cdde9427ff865b4f402806b2f15b99dfd033a96e0d0a42e" + }, + "table_cell_should_contain": { + "name": "table_cell_should_contain", + "doc": "Verifies table cell contains text ``expected``.\n\n See `Get Table Cell` that this keyword uses internally for\n an explanation about accepted arguments.\n ", + "sha256": "628c09aa35b649beda7c500e914fa906cf91f9eb30afad19973809784ee1f8d6" + }, + "table_column_should_contain": { + "name": "table_column_should_contain", + "doc": "Verifies table column contains text ``expected``.\n\n The table is located using the ``locator`` argument and its column\n found using ``column``. See the `Locating elements` section for\n details about the locator syntax.\n\n Column indexes start from 1. It is possible to refer to columns\n from the end by using negative indexes so that -1 is the last column,\n -2 is the second last, and so on.\n\n If a table contains cells that span multiple columns, those merged\n cells count as a single column.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "e0f898ce00b22cd66e2f4c5ab1cdcbea733f294d53bc210ec33667dfcd1963de" + }, + "table_footer_should_contain": { + "name": "table_footer_should_contain", + "doc": "Verifies table footer contains text ``expected``.\n\n Any ```` element inside ```` element is considered to\n be part of the footer.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "454fb3be070acb378460038572ed4268de8b18b96b3aaa903d3a1f0093147691" + }, + "table_header_should_contain": { + "name": "table_header_should_contain", + "doc": "Verifies table header contains text ``expected``.\n\n Any ```` element anywhere in the table is considered to be\n part of the header.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "66208e9741c9d18d1c09645bfcb9b54b4ffe2c104e5402c86f2cf54feb02de79" + }, + "table_row_should_contain": { + "name": "table_row_should_contain", + "doc": "Verifies that table row contains text ``expected``.\n\n The table is located using the ``locator`` argument and its column\n found using ``column``. See the `Locating elements` section for\n details about the locator syntax.\n\n Row indexes start from 1. It is possible to refer to rows\n from the end by using negative indexes so that -1 is the last row,\n -2 is the second last, and so on.\n\n If a table contains cells that span multiple rows, a match\n only occurs for the uppermost row of those merged cells.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "2ad4f79443748abaa86e768fb0994f32a2d1386c435688727093fb0c1034d23f" + }, + "table_should_contain": { + "name": "table_should_contain", + "doc": "Verifies table contains text ``expected``.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "ea4dc362f588ab33332b985ea6ff059499de1e4c25bdbfceb6e6517cd36b24fc" + }, + "wait_for_condition": { + "name": "wait_for_condition", + "doc": "Waits until ``condition`` is true or ``timeout`` expires.\n\n The condition can be arbitrary JavaScript expression but it\n must return a value to be evaluated. See `Execute JavaScript` for\n information about accessing content on pages.\n\n Fails if the timeout expires before the condition becomes true. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n\n Examples:\n | `Wait For Condition` | return document.title == \"New Title\" |\n | `Wait For Condition` | return jQuery.active == 0 |\n | `Wait For Condition` | style = document.querySelector('h1').style; return style.background == \"red\" && style.color == \"white\" |\n ", + "sha256": "4998ab3cee46a578df2b064d390401d2ec0268454607ef194db5c0d3d73c81db" + }, + "wait_until_element_contains": { + "name": "wait_until_element_contains", + "doc": "Waits until the element ``locator`` contains ``text``.\n\n Fails if ``timeout`` expires before the text appears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "982c68220bb622a3d985c04b39ea3bc11b20437e73bcf8e38d51ed7e2032852c" + }, + "wait_until_element_does_not_contain": { + "name": "wait_until_element_does_not_contain", + "doc": "Waits until the element ``locator`` does not contain ``text``.\n\n Fails if ``timeout`` expires before the text disappears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "a2b8bc5ee7de21f06e79317935026beddee2105ae645c22b322446dd5a8be0ad" + }, + "wait_until_element_is_enabled": { + "name": "wait_until_element_is_enabled", + "doc": "Waits until the element ``locator`` is enabled.\n\n Element is considered enabled if it is not disabled nor read-only.\n\n Fails if ``timeout`` expires before the element is enabled. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n Considering read-only elements to be disabled is a new feature\n in SeleniumLibrary 3.0.\n ", + "sha256": "6202e0635b377e2e7d5eaa091eb6a582b64bc49f9d5edf6ddeb7754723015543" + }, + "wait_until_element_is_not_visible": { + "name": "wait_until_element_is_not_visible", + "doc": "Waits until the element ``locator`` is not visible.\n\n Fails if ``timeout`` expires before the element is not visible. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "e112e160d739b0cd0f8730703738cc0692e1c0d57e42308b6d50206db23e6d52" + }, + "wait_until_element_is_visible": { + "name": "wait_until_element_is_visible", + "doc": "Waits until the element ``locator`` is visible.\n\n Fails if ``timeout`` expires before the element is visible. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "90878c583a727db5da943e7f532efa4e73c59a525a0107233fd59740bb9dd116" + }, + "wait_until_location_contains": { + "name": "wait_until_location_contains", + "doc": "Waits until the current URL contains ``expected``.\n\n The ``expected`` argument contains the expected value in url.\n\n Fails if ``timeout`` expires before the location contains. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "33b91c79fe956c37284bccdb56d318e679ec774ca1565db5e2140250b6b46fb5" + }, + "wait_until_location_does_not_contain": { + "name": "wait_until_location_does_not_contain", + "doc": "Waits until the current URL does not contains ``location``.\n\n The ``location`` argument contains value not expected in url.\n\n Fails if ``timeout`` expires before the location not contains. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.3\n ", + "sha256": "5ea0b9da22370c90d509d3e4a8aad47b69652b2bd0ce5b29a9264508d4bea432" + }, + "wait_until_location_is": { + "name": "wait_until_location_is", + "doc": "Waits until the current URL is ``expected``.\n\n The ``expected`` argument is the expected value in url.\n\n Fails if ``timeout`` expires before the location is. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "2a0604e9e096908cda4caef1486d56310d6f10d0d974804c96a32a0492eb1f82" + }, + "wait_until_location_is_not": { + "name": "wait_until_location_is_not", + "doc": "Waits until the current URL is not ``location``.\n\n The ``location`` argument is the unexpected value in url.\n\n Fails if ``timeout`` expires before the location is not. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.3\n ", + "sha256": "96f19cceb6f263cde977b3dfd4b90d06691a1533ebef77c9c5ef1f0e0925e228" + }, + "wait_until_page_contains": { + "name": "wait_until_page_contains", + "doc": "Waits until ``text`` appears on the current page.\n\n Fails if ``timeout`` expires before the text appears. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "2e6b9f7e424ed5ba676c82ce9b6ae964050a5fb7b47baa35a3f94125107d9e57" + }, + "wait_until_page_contains_element": { + "name": "wait_until_page_contains_element", + "doc": "Waits until the element ``locator`` appears on the current page.\n\n Fails if ``timeout`` expires before the element appears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n The ``limit`` argument can used to define how many elements the\n page should contain. When ``limit`` is `None` (default) page can\n contain one or more elements. When limit is a number, page must\n contain same number of elements.\n\n ``limit`` is new in SeleniumLibrary 4.4\n ", + "sha256": "712da49e8aff630cb2843522331935693ce334aea9ccb2aacb6c015af9c921b5" + }, + "wait_until_page_does_not_contain": { + "name": "wait_until_page_does_not_contain", + "doc": "Waits until ``text`` disappears from the current page.\n\n Fails if ``timeout`` expires before the text disappears. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "96c2f8840c677afdb9f207107bf3f7bbdfb9d1b56e3ce887cf34a88e3e273974" + }, + "wait_until_page_does_not_contain_element": { + "name": "wait_until_page_does_not_contain_element", + "doc": "Waits until the element ``locator`` disappears from the current page.\n\n Fails if ``timeout`` expires before the element disappears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n The ``limit`` argument can used to define how many elements the\n page should not contain. When ``limit`` is `None` (default) page can`t\n contain any elements. When limit is a number, page must not\n contain same number of elements.\n\n ``limit`` is new in SeleniumLibrary 4.4\n ", + "sha256": "081d0393a8d8f100d9db65f81170222f4a6678fcc2703a3e123c907ef5ade430" + }, + "close_window": { + "name": "close_window", + "doc": "Closes currently opened and selected browser window/tab. ", + "sha256": "8d00f3bcf62126a5fcc61ca14d62631ad918c2993ee9e8f2641cb57595b591bb" + }, + "get_locations": { + "name": "get_locations", + "doc": "Returns and logs URLs of all windows of the selected browser.\n\n *Browser Scope:*\n\n The ``browser`` argument specifies the browser that shall return\n its windows information.\n\n - ``browser`` can be ``index_or_alias`` like in `Switch Browser`.\n\n - If ``browser`` is ``CURRENT`` (default, case-insensitive)\n the currently active browser is selected.\n\n - If ``browser`` is ``ALL`` (case-insensitive)\n the window information of all windows of all opened browsers are returned.", + "sha256": "3e73811fa673371891cffa16aa99f24fa6dbc87ff826d0d84be6d54fc937163c" + }, + "get_window_handles": { + "name": "get_window_handles", + "doc": "Returns all child window handles of the selected browser as a list.\n\n Can be used as a list of windows to exclude with `Select Window`.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.\n\n Prior to SeleniumLibrary 3.0, this keyword was named `List Windows`.\n ", + "sha256": "b051b51a36766e2a3c748a2ecbb76ed6516a20cec807a38d29a96f95c5ea7efa" + }, + "get_window_identifiers": { + "name": "get_window_identifiers", + "doc": "Returns and logs id attributes of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "9342df3471d9923e299c60511d11006762b1797802153c97ac0451adcdd5e0bf" + }, + "get_window_names": { + "name": "get_window_names", + "doc": "Returns and logs names of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "557778bcbb2b4be2e575416f5422c8077397f2e7d7614e3b064fe3f222bf3225" + }, + "get_window_position": { + "name": "get_window_position", + "doc": "Returns current window position.\n\n The position is relative to the top left corner of the screen. Returned\n values are integers. See also `Set Window Position`.\n\n Example:\n | ${x} | ${y}= | `Get Window Position` |\n ", + "sha256": "c9f1ab8ee31517bc91a6ae9f3dd3782c695f0c3c64adf1639fc3e34ea85e7d9c" + }, + "get_window_size": { + "name": "get_window_size", + "doc": "Returns current window width and height as integers.\n\n See also `Set Window Size`.\n\n If ``inner`` parameter is set to True, keyword returns\n HTML DOM window.innerWidth and window.innerHeight properties.\n See `Boolean arguments` for more details on how to set boolean\n arguments. The ``inner`` is new in SeleniumLibrary 4.0.\n\n Example:\n | ${width} | ${height}= | `Get Window Size` | |\n | ${width} | ${height}= | `Get Window Size` | True |\n ", + "sha256": "d9fc8a6bc4dd38749c761722027b783dfd74ff3c69d16ad3e4ceceb162f2ed64" + }, + "get_window_titles": { + "name": "get_window_titles", + "doc": "Returns and logs titles of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "7b2a62a9e808f584ec9674faae954855135aec5ac168ec0b929b11ac73f7fcec" + }, + "maximize_browser_window": { + "name": "maximize_browser_window", + "doc": "Maximizes current browser window.", + "sha256": "de016b8b98dc0a25f624060424c8ae449cc680990baf8789da09181b2643d77b" + }, + "minimize_browser_window": { + "name": "minimize_browser_window", + "doc": "Minimizes current browser window.", + "sha256": "6a99ddaa41cde69ae82c33df6d43976d9ad76a358be5d4e35f065895e94e95db" + }, + "set_window_position": { + "name": "set_window_position", + "doc": "Sets window position using ``x`` and ``y`` coordinates.\n\n The position is relative to the top left corner of the screen,\n but some browsers exclude possible task bar set by the operating\n system from the calculation. The actual position may thus be\n different with different browsers.\n\n Values can be given using strings containing numbers or by using\n actual numbers. See also `Get Window Position`.\n\n Example:\n | `Set Window Position` | 100 | 200 |\n ", + "sha256": "d9c3d6dc138cd350941a1660e5601dbc4441ee6c0a7df08902c76dd15953017c" + }, + "set_window_size": { + "name": "set_window_size", + "doc": "Sets current windows size to given ``width`` and ``height``.\n\n Values can be given using strings containing numbers or by using\n actual numbers. See also `Get Window Size`.\n\n Browsers have a limit on their minimum size. Trying to set them\n smaller will cause the actual size to be bigger than the requested\n size.\n\n If ``inner`` parameter is set to True, keyword sets the necessary\n window width and height to have the desired HTML DOM _window.innerWidth_\n and _window.innerHeight_. See `Boolean arguments` for more details on how to set boolean\n arguments.\n\n The ``inner`` argument is new since SeleniumLibrary 4.0.\n\n This ``inner`` argument does not support Frames. If a frame is selected,\n switch to default before running this.\n\n Example:\n | `Set Window Size` | 800 | 600 | |\n | `Set Window Size` | 800 | 600 | True |\n ", + "sha256": "31b5febddcb935b20320728accc28a892b8a0956301646827aa8c7c74e1cdfec" + }, + "switch_window": { + "name": "switch_window", + "doc": "Switches to browser window matching ``locator``.\n\n If the window is found, all subsequent commands use the selected\n window, until this keyword is used again. If the window is not\n found, this keyword fails. The previous windows handle is returned\n and can be used to switch back to it later.\n\n Notice that alerts should be handled with\n `Handle Alert` or other alert related keywords.\n\n The ``locator`` can be specified using different strategies somewhat\n similarly as when `locating elements` on pages.\n\n - By default, the ``locator`` is matched against window handle, name,\n title, and URL. Matching is done in that order and the first\n matching window is selected.\n\n - The ``locator`` can specify an explicit strategy by using the format\n ``strategy:value`` (recommended) or ``strategy=value``. Supported\n strategies are ``name``, ``title``, and ``url``. These matches windows\n using their name, title, or URL, respectively. Additionally, ``default``\n can be used to explicitly use the default strategy explained above.\n\n - If the ``locator`` is ``NEW`` (case-insensitive), the latest\n opened window is selected. It is an error if this is the same\n as the current window.\n\n - If the ``locator`` is ``MAIN`` (default, case-insensitive),\n the main window is selected.\n\n - If the ``locator`` is ``CURRENT`` (case-insensitive), nothing is\n done. This effectively just returns the current window handle.\n\n - If the ``locator`` is not a string, it is expected to be a list\n of window handles _to exclude_. Such a list of excluded windows\n can be got from `Get Window Handles` before doing an action that\n opens a new window.\n\n The ``timeout`` is used to specify how long keyword will poll to select\n the new window. The ``timeout`` is new in SeleniumLibrary 3.2.\n\n Example:\n | `Click Link` | popup1 | | # Open new window |\n | `Switch Window` | example | | # Select window using default strategy |\n | `Title Should Be` | Pop-up 1 | |\n | `Click Button` | popup2 | | # Open another window |\n | ${handle} = | `Switch Window` | NEW | # Select latest opened window |\n | `Title Should Be` | Pop-up 2 | |\n | `Switch Window` | ${handle} | | # Select window using handle |\n | `Title Should Be` | Pop-up 1 | |\n | `Switch Window` | MAIN | | # Select the main window |\n | `Title Should Be` | Main | |\n | ${excludes} = | `Get Window Handles` | | # Get list of current windows |\n | `Click Link` | popup3 | | # Open one more window |\n | `Switch Window` | ${excludes} | | # Select window using excludes |\n | `Title Should Be` | Pop-up 3 | |\n\n The ``browser`` argument allows with ``index_or_alias`` to implicitly switch to\n a specific browser when switching to a window. See `Switch Browser`\n\n - If the ``browser`` is ``CURRENT`` (case-insensitive), no other browser is\n selected.\n\n *NOTE:*\n\n - The ``strategy:value`` syntax is only supported by SeleniumLibrary\n 3.0 and newer.\n - Prior to SeleniumLibrary 3.0 matching windows by name, title\n and URL was case-insensitive.\n - Earlier versions supported aliases ``None``, ``null`` and the\n empty string for selecting the main window, and alias ``self``\n for selecting the current window. Support for these aliases was\n removed in SeleniumLibrary 3.2.\n ", + "sha256": "2ae583a5179810f31a4f7ae665918443d1f068c53e255c552b51bd1f5205c608" + }, + "__init__": { + "name": "__init__", + "doc": "1 SeleniumLibrary is a web testing library for Robot Framework.\n\nThis document explains how to use keywords provided by SeleniumLibrary.\nFor information about installation, support, and more, please visit the\n[https://github.com/robotframework/SeleniumLibrary|project pages].\nFor more information about Robot Framework, see http://robotframework.org.\n\nSeleniumLibrary uses the Selenium WebDriver modules internally to\ncontrol a web browser. See http://seleniumhq.org for more information\nabout Selenium in general and SeleniumLibrary README.rst\n[https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter]\nfor more details about WebDriver binary installation.\n\n%TOC%\n\n= Locating elements =\n\nAll keywords in SeleniumLibrary that need to interact with an element\non a web page take an argument typically named ``locator`` that specifies\nhow to find the element. Most often the locator is given as a string\nusing the locator syntax described below, but `using WebElements` is\npossible too.\n\n== Locator syntax ==\n\nSeleniumLibrary supports finding elements based on different strategies\nsuch as the element id, XPath expressions, or CSS selectors. The strategy\ncan either be explicitly specified with a prefix or the strategy can be\nimplicit.\n\n=== Default locator strategy ===\n\nBy default, locators are considered to use the keyword specific default\nlocator strategy. All keywords support finding elements based on ``id``\nand ``name`` attributes, but some keywords support additional attributes\nor other values that make sense in their context. For example, `Click\nLink` supports the ``href`` attribute and the link text and addition\nto the normal ``id`` and ``name``.\n\nExamples:\n\n| `Click Element` | example | # Match based on ``id`` or ``name``. |\n| `Click Link` | example | # Match also based on link text and ``href``. |\n| `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. |\n\nIf a locator accidentally starts with a prefix recognized as `explicit\nlocator strategy` or `implicit XPath strategy`, it is possible to use\nthe explicit ``default`` prefix to enable the default strategy.\n\nExamples:\n\n| `Click Element` | name:foo | # Find element with name ``foo``. |\n| `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. |\n| `Click Element` | //foo | # Find element using XPath ``//foo``. |\n| `Click Element` | default: //foo | # Use default strategy with value ``//foo``. |\n\n=== Explicit locator strategy ===\n\nThe explicit locator strategy is specified with a prefix using either\nsyntax ``strategy:value`` or ``strategy=value``. The former syntax\nis preferred because the latter is identical to Robot Framework's\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax|\nnamed argument syntax] and that can cause problems. Spaces around\nthe separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo``\nare all equivalent.\n\nLocator strategies that are supported by default are listed in the table\nbelow. In addition to them, it is possible to register `custom locators`.\n\n| = Strategy = | = Match based on = | = Example = |\n| id | Element ``id``. | ``id:example`` |\n| name | ``name`` attribute. | ``name:example`` |\n| identifier | Either ``id`` or ``name``. | ``identifier:example`` |\n| class | Element ``class``. | ``class:example`` |\n| tag | Tag name. | ``tag:div`` |\n| xpath | XPath expression. | ``xpath://div[@id=\"example\"]`` |\n| css | CSS selector. | ``css:div#example`` |\n| dom | DOM expression. | ``dom:document.images[5]`` |\n| link | Exact text a link has. | ``link:The example`` |\n| partial link | Partial link text. | ``partial link:he ex`` |\n| sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` |\n| data | Element ``data-*`` attribute | ``data:id:my_id`` |\n| jquery | jQuery expression. | ``jquery:div.example`` |\n| default | Keyword specific default behavior. | ``default:example`` |\n\nSee the `Default locator strategy` section below for more information\nabout how the default strategy works. Using the explicit ``default``\nprefix is only necessary if the locator value itself accidentally\nmatches some of the explicit strategies.\n\nDifferent locator strategies have different pros and cons. Using ids,\neither explicitly like ``id:foo`` or by using the `default locator\nstrategy` simply like ``foo``, is recommended when possible, because\nthe syntax is simple and locating elements by id is fast for browsers.\nIf an element does not have an id or the id is not stable, other\nsolutions need to be used. If an element has a unique tag name or class,\nusing ``tag``, ``class`` or ``css`` strategy like ``tag:h1``,\n``class:example`` or ``css:h1.example`` is often an easy solution. In\nmore complex cases using XPath expressions is typically the best\napproach. They are very powerful but a downside is that they can also\nget complex.\n\nExamples:\n\n| `Click Element` | id:foo | # Element with id 'foo'. |\n| `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. |\n| `Click Element` | xpath: //div[@id=\"foo\"]//h1 | # Same as the above using XPath, not CSS. |\n| `Click Element` | xpath: //*[contains(text(), \"example\")] | # Element containing text 'example'. |\n\n*NOTE:*\n\n- The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0\n and newer.\n- Using the ``sizzle`` strategy or its alias ``jquery`` requires that\n the system under test contains the jQuery library.\n- Prior to SeleniumLibrary 3.0, table related keywords only supported\n ``xpath``, ``css`` and ``sizzle/jquery`` strategies.\n- ``data`` strategy is conveniance locator that will construct xpath from the parameters.\n If you have element like `
`, you locate the element via\n ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0\n\n=== Implicit XPath strategy ===\n\nIf the locator starts with ``//`` or multiple opening parenthesis in front\nof the ``//``, the locator is considered to be an XPath expression. In other\nwords, using ``//div`` is equivalent to using explicit ``xpath://div`` and\n``((//div))`` is equivalent to using explicit ``xpath:((//div))``\n\nExamples:\n\n| `Click Element` | //div[@id=\"foo\"]//h1 |\n| `Click Element` | (//div)[2] |\n\nThe support for the ``(//`` prefix is new in SeleniumLibrary 3.0.\nSupporting multiple opening parenthesis is new in SeleniumLibrary 5.0.\n\n=== Chaining locators ===\n\nIt is possible chain multiple locators together as single locator. Each chained locator must start with locator\nstrategy. Chained locators must be separated with single space, two greater than characters and followed with\nspace. It is also possible mix different locator strategies, example css or xpath. Also a list can also be\nused to specify multiple locators. This is useful, is some part of locator would match as the locator separator\nbut it should not. Or if there is need to existing WebElement as locator.\n\nAlthough all locators support chaining, some locator strategies do not abey the chaining. This is because\nsome locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context\nand not for the element found be the previous locator. Chaining is supported by locator strategies which\nare based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery\n\nExamples:\n| `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class \"bar\" |\n\nList examples:\n| ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), \" >> \"] |\n| `Page Should Contain Element` | ${locator_list} | | |\n| ${element} = | Get WebElement | xpath://*[text(), \" >> \"] | |\n| ${locator_list} = | `Create List` | css:div#div_id | ${element} |\n| `Page Should Contain Element` | ${locator_list} | | |\n\nChaining locators in new in SeleniumLibrary 5.0\n\n== Using WebElements ==\n\nIn addition to specifying a locator as a string, it is possible to use\nSelenium's WebElement objects. This requires first getting a WebElement,\nfor example, by using the `Get WebElement` keyword.\n\n| ${elem} = | `Get WebElement` | id:example |\n| `Click Element` | ${elem} | |\n\n== Custom locators ==\n\nIf more complex lookups are required than what is provided through the\ndefault locators, custom lookup strategies can be created. Using custom\nlocators is a two part process. First, create a keyword that returns\na WebElement that should be acted on:\n\n| Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} |\n| | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); |\n| | [Return] | ${element} |\n\nThis keyword is a reimplementation of the basic functionality of the\n``id`` locator where ``${browser}`` is a reference to a WebDriver\ninstance and ``${locator}`` is the name of the locator strategy. To use\nthis locator, it must first be registered by using the\n`Add Location Strategy` keyword:\n\n| `Add Location Strategy` | custom | Custom Locator Strategy |\n\nThe first argument of `Add Location Strategy` specifies the name of\nthe strategy and it must be unique. After registering the strategy,\nthe usage is the same as with other locators:\n\n| `Click Element` | custom:example |\n\nSee the `Add Location Strategy` keyword for more details.\n\n= Browser and Window =\n\nThere is different conceptual meaning when SeleniumLibrary talks\nabout windows or browsers. This chapter explains those differences.\n\n== Browser ==\n\nWhen `Open Browser` or `Create WebDriver` keyword is called, it\nwill create a new Selenium WebDriver instance by using the\n[https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver]\nAPI. In SeleniumLibrary terms, a new browser is created. It is\npossible to start multiple independent browsers (Selenium Webdriver\ninstances) at the same time, by calling `Open Browser` or\n`Create WebDriver` multiple times. These browsers are usually\nindependent of each other and do not share data like cookies,\nsessions or profiles. Typically when the browser starts, it\ncreates a single window which is shown to the user.\n\n== Window ==\n\nWindows are the part of a browser that loads the web site and presents\nit to the user. All content of the site is the content of the window.\nWindows are children of a browser. In SeleniumLibrary browser is a\nsynonym for WebDriver instance. One browser may have multiple\nwindows. Windows can appear as tabs, as separate windows or pop-ups with\ndifferent position and size. Windows belonging to the same browser\ntypically share the sessions detail, like cookies. If there is a\nneed to separate sessions detail, example login with two different\nusers, two browsers (Selenium WebDriver instances) must be created.\nNew windows can be opened example by the application under test or\nby example `Execute Javascript` keyword:\n\n| `Execute Javascript` window.open() # Opens a new window with location about:blank\n\nThe example below opens multiple browsers and windows,\nto demonstrate how the different keywords can be used to interact\nwith browsers, and windows attached to these browsers.\n\nStructure:\n| BrowserA\n| Window 1 (location=https://robotframework.org/)\n| Window 2 (location=https://robocon.io/)\n| Window 3 (location=https://github.com/robotframework/)\n|\n| BrowserB\n| Window 1 (location=https://github.com/)\n\nExample:\n| `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. |\n| `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. |\n| `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA |\n| `Go To` | https://robocon.io | | | # Second window navigates to robocon site. |\n| `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. |\n| ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA |\n| `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. |\n| `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. |\n| ${location} | `Get Location` | | | # ${location} is: https://www.github.com |\n| `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. |\n| ${location} | `Get Location` | | | # ${location} = https://robocon.io/ |\n| @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). |\n| @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. |\n\nThe above example, @{locations 1} contains the following items:\nhttps://robotframework.org/, https://robocon.io/ and\nhttps://github.com/robotframework/'. The @{locations 2}\ncontains the following items: https://robotframework.org/,\nhttps://robocon.io/, https://github.com/robotframework/'\nand 'https://github.com/.\n\n= Timeouts, waits, and delays =\n\nThis section discusses different ways how to wait for elements to\nappear on web pages and to slow down execution speed otherwise.\nIt also explains the `time format` that can be used when setting various\ntimeouts, waits, and delays.\n\n== Timeout ==\n\nSeleniumLibrary contains various keywords that have an optional\n``timeout`` argument that specifies how long these keywords should\nwait for certain events or actions. These keywords include, for example,\n``Wait ...`` keywords and keywords related to alerts. Additionally\n`Execute Async Javascript`. Although it does not have ``timeout``,\nargument, uses a timeout to define how long asynchronous JavaScript\ncan run.\n\nThe default timeout these keywords use can be set globally either by\nusing the `Set Selenium Timeout` keyword or with the ``timeout`` argument\nwhen `importing` the library. If no default timeout is set globally, the\ndefault is 5 seconds. If None is specified for the timeout argument in the\nkeywords, the default is used. See `time format` below for supported\ntimeout syntax.\n\n== Implicit wait ==\n\nImplicit wait specifies the maximum time how long Selenium waits when\nsearching for elements. It can be set by using the `Set Selenium Implicit\nWait` keyword or with the ``implicit_wait`` argument when `importing`\nthe library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp|\nSelenium documentation] for more information about this functionality.\n\nSee `time format` below for supported syntax.\n\n== Page load ==\nPage load timeout is the amount of time to wait for page load to complete\nuntil a timeout exception is raised.\n\nThe default page load timeout can be set globally\nwhen `importing` the library with the ``page_load_timeout`` argument\nor by using the `Set Selenium Page Load Timeout` keyword.\n\nSee `time format` below for supported timeout syntax.\n\nSupport for page load is new in SeleniumLibrary 6.1\n\n== Selenium speed ==\n\nSelenium execution speed can be slowed down globally by using `Set\nSelenium speed` keyword. This functionality is designed to be used for\ndemonstrating or debugging purposes. Using it to make sure that elements\nappear on a page is not a good idea. The above-explained timeouts\nand waits should be used instead.\n\nSee `time format` below for supported syntax.\n\n== Time format ==\n\nAll timeouts and waits can be given as numbers considered seconds\n(e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax\n(e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about\nthe time syntax see the\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide].\n\n= Run-on-failure functionality =\n\nSeleniumLibrary has a handy feature that it can automatically execute\na keyword if any of its own keywords fails. By default, it uses the\n`Capture Page Screenshot` keyword, but this can be changed either by\nusing the `Register Keyword To Run On Failure` keyword or with the\n``run_on_failure`` argument when `importing` the library. It is\npossible to use any keyword from any imported library or resource file.\n\nThe run-on-failure functionality can be disabled by using a special value\n``NOTHING`` or anything considered false (see `Boolean arguments`)\nsuch as ``NONE``.\n\n= Boolean arguments =\n\nStarting from 5.0 SeleniumLibrary relies on Robot Framework to perform the\nboolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint].\nMore details in Robot Framework\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide]\n\nPlease note SeleniumLibrary 3 and 4 did have own custom methods to covert\narguments to boolean values.\n\n= EventFiringWebDriver =\n\nThe SeleniumLibrary offers support for\n[https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver].\nSee the Selenium and SeleniumLibrary\n[https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support]\ndocumentation for further details.\n\nEventFiringWebDriver is new in SeleniumLibrary 4.0\n\n= Thread support =\n\nSeleniumLibrary is not thread-safe. This is mainly due because the underlying\n[https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe|\nSelenium tool is not thread-safe] within one browser/driver instance.\nBecause of the limitation in the Selenium side, the keywords or the\nAPI provided by the SeleniumLibrary is not thread-safe.\n\n= Plugins =\n\nSeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal\nfunctionality without creating a new library or hacking the source code. See\n[https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API]\ndocumentation for further details.\n\nPlugin API is new SeleniumLibrary 4.0", + "sha256": "3d660b78fb0d75d9f2f8265fa6f29967ae30b712f545661d64de0f05f2c1b913" + }, + "__intro__": { + "name": "__intro__", + "doc": "1 SeleniumLibrary is a web testing library for Robot Framework.\n\n This document explains how to use keywords provided by SeleniumLibrary.\n For information about installation, support, and more, please visit the\n [https://github.com/robotframework/SeleniumLibrary|project pages].\n For more information about Robot Framework, see http://robotframework.org.\n\n SeleniumLibrary uses the Selenium WebDriver modules internally to\n control a web browser. See http://seleniumhq.org for more information\n about Selenium in general and SeleniumLibrary README.rst\n [https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter]\n for more details about WebDriver binary installation.\n\n %TOC%\n\n = Locating elements =\n\n All keywords in SeleniumLibrary that need to interact with an element\n on a web page take an argument typically named ``locator`` that specifies\n how to find the element. Most often the locator is given as a string\n using the locator syntax described below, but `using WebElements` is\n possible too.\n\n == Locator syntax ==\n\n SeleniumLibrary supports finding elements based on different strategies\n such as the element id, XPath expressions, or CSS selectors. The strategy\n can either be explicitly specified with a prefix or the strategy can be\n implicit.\n\n === Default locator strategy ===\n\n By default, locators are considered to use the keyword specific default\n locator strategy. All keywords support finding elements based on ``id``\n and ``name`` attributes, but some keywords support additional attributes\n or other values that make sense in their context. For example, `Click\n Link` supports the ``href`` attribute and the link text and addition\n to the normal ``id`` and ``name``.\n\n Examples:\n\n | `Click Element` | example | # Match based on ``id`` or ``name``. |\n | `Click Link` | example | # Match also based on link text and ``href``. |\n | `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. |\n\n If a locator accidentally starts with a prefix recognized as `explicit\n locator strategy` or `implicit XPath strategy`, it is possible to use\n the explicit ``default`` prefix to enable the default strategy.\n\n Examples:\n\n | `Click Element` | name:foo | # Find element with name ``foo``. |\n | `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. |\n | `Click Element` | //foo | # Find element using XPath ``//foo``. |\n | `Click Element` | default: //foo | # Use default strategy with value ``//foo``. |\n\n === Explicit locator strategy ===\n\n The explicit locator strategy is specified with a prefix using either\n syntax ``strategy:value`` or ``strategy=value``. The former syntax\n is preferred because the latter is identical to Robot Framework's\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax|\n named argument syntax] and that can cause problems. Spaces around\n the separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo``\n are all equivalent.\n\n Locator strategies that are supported by default are listed in the table\n below. In addition to them, it is possible to register `custom locators`.\n\n | = Strategy = | = Match based on = | = Example = |\n | id | Element ``id``. | ``id:example`` |\n | name | ``name`` attribute. | ``name:example`` |\n | identifier | Either ``id`` or ``name``. | ``identifier:example`` |\n | class | Element ``class``. | ``class:example`` |\n | tag | Tag name. | ``tag:div`` |\n | xpath | XPath expression. | ``xpath://div[@id=\"example\"]`` |\n | css | CSS selector. | ``css:div#example`` |\n | dom | DOM expression. | ``dom:document.images[5]`` |\n | link | Exact text a link has. | ``link:The example`` |\n | partial link | Partial link text. | ``partial link:he ex`` |\n | sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` |\n | data | Element ``data-*`` attribute | ``data:id:my_id`` |\n | jquery | jQuery expression. | ``jquery:div.example`` |\n | default | Keyword specific default behavior. | ``default:example`` |\n\n See the `Default locator strategy` section below for more information\n about how the default strategy works. Using the explicit ``default``\n prefix is only necessary if the locator value itself accidentally\n matches some of the explicit strategies.\n\n Different locator strategies have different pros and cons. Using ids,\n either explicitly like ``id:foo`` or by using the `default locator\n strategy` simply like ``foo``, is recommended when possible, because\n the syntax is simple and locating elements by id is fast for browsers.\n If an element does not have an id or the id is not stable, other\n solutions need to be used. If an element has a unique tag name or class,\n using ``tag``, ``class`` or ``css`` strategy like ``tag:h1``,\n ``class:example`` or ``css:h1.example`` is often an easy solution. In\n more complex cases using XPath expressions is typically the best\n approach. They are very powerful but a downside is that they can also\n get complex.\n\n Examples:\n\n | `Click Element` | id:foo | # Element with id 'foo'. |\n | `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. |\n | `Click Element` | xpath: //div[@id=\"foo\"]//h1 | # Same as the above using XPath, not CSS. |\n | `Click Element` | xpath: //*[contains(text(), \"example\")] | # Element containing text 'example'. |\n\n *NOTE:*\n\n - The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0\n and newer.\n - Using the ``sizzle`` strategy or its alias ``jquery`` requires that\n the system under test contains the jQuery library.\n - Prior to SeleniumLibrary 3.0, table related keywords only supported\n ``xpath``, ``css`` and ``sizzle/jquery`` strategies.\n - ``data`` strategy is conveniance locator that will construct xpath from the parameters.\n If you have element like `
`, you locate the element via\n ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0\n\n === Implicit XPath strategy ===\n\n If the locator starts with ``//`` or multiple opening parenthesis in front\n of the ``//``, the locator is considered to be an XPath expression. In other\n words, using ``//div`` is equivalent to using explicit ``xpath://div`` and\n ``((//div))`` is equivalent to using explicit ``xpath:((//div))``\n\n Examples:\n\n | `Click Element` | //div[@id=\"foo\"]//h1 |\n | `Click Element` | (//div)[2] |\n\n The support for the ``(//`` prefix is new in SeleniumLibrary 3.0.\n Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0.\n\n === Chaining locators ===\n\n It is possible chain multiple locators together as single locator. Each chained locator must start with locator\n strategy. Chained locators must be separated with single space, two greater than characters and followed with\n space. It is also possible mix different locator strategies, example css or xpath. Also a list can also be\n used to specify multiple locators. This is useful, is some part of locator would match as the locator separator\n but it should not. Or if there is need to existing WebElement as locator.\n\n Although all locators support chaining, some locator strategies do not abey the chaining. This is because\n some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context\n and not for the element found be the previous locator. Chaining is supported by locator strategies which\n are based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery\n\n Examples:\n | `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class \"bar\" |\n\n List examples:\n | ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), \" >> \"] |\n | `Page Should Contain Element` | ${locator_list} | | |\n | ${element} = | Get WebElement | xpath://*[text(), \" >> \"] | |\n | ${locator_list} = | `Create List` | css:div#div_id | ${element} |\n | `Page Should Contain Element` | ${locator_list} | | |\n\n Chaining locators in new in SeleniumLibrary 5.0\n\n == Using WebElements ==\n\n In addition to specifying a locator as a string, it is possible to use\n Selenium's WebElement objects. This requires first getting a WebElement,\n for example, by using the `Get WebElement` keyword.\n\n | ${elem} = | `Get WebElement` | id:example |\n | `Click Element` | ${elem} | |\n\n == Custom locators ==\n\n If more complex lookups are required than what is provided through the\n default locators, custom lookup strategies can be created. Using custom\n locators is a two part process. First, create a keyword that returns\n a WebElement that should be acted on:\n\n | Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} |\n | | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); |\n | | [Return] | ${element} |\n\n This keyword is a reimplementation of the basic functionality of the\n ``id`` locator where ``${browser}`` is a reference to a WebDriver\n instance and ``${locator}`` is the name of the locator strategy. To use\n this locator, it must first be registered by using the\n `Add Location Strategy` keyword:\n\n | `Add Location Strategy` | custom | Custom Locator Strategy |\n\n The first argument of `Add Location Strategy` specifies the name of\n the strategy and it must be unique. After registering the strategy,\n the usage is the same as with other locators:\n\n | `Click Element` | custom:example |\n\n See the `Add Location Strategy` keyword for more details.\n\n = Browser and Window =\n\n There is different conceptual meaning when SeleniumLibrary talks\n about windows or browsers. This chapter explains those differences.\n\n == Browser ==\n\n When `Open Browser` or `Create WebDriver` keyword is called, it\n will create a new Selenium WebDriver instance by using the\n [https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver]\n API. In SeleniumLibrary terms, a new browser is created. It is\n possible to start multiple independent browsers (Selenium Webdriver\n instances) at the same time, by calling `Open Browser` or\n `Create WebDriver` multiple times. These browsers are usually\n independent of each other and do not share data like cookies,\n sessions or profiles. Typically when the browser starts, it\n creates a single window which is shown to the user.\n\n == Window ==\n\n Windows are the part of a browser that loads the web site and presents\n it to the user. All content of the site is the content of the window.\n Windows are children of a browser. In SeleniumLibrary browser is a\n synonym for WebDriver instance. One browser may have multiple\n windows. Windows can appear as tabs, as separate windows or pop-ups with\n different position and size. Windows belonging to the same browser\n typically share the sessions detail, like cookies. If there is a\n need to separate sessions detail, example login with two different\n users, two browsers (Selenium WebDriver instances) must be created.\n New windows can be opened example by the application under test or\n by example `Execute Javascript` keyword:\n\n | `Execute Javascript` window.open() # Opens a new window with location about:blank\n\n The example below opens multiple browsers and windows,\n to demonstrate how the different keywords can be used to interact\n with browsers, and windows attached to these browsers.\n\n Structure:\n | BrowserA\n | Window 1 (location=https://robotframework.org/)\n | Window 2 (location=https://robocon.io/)\n | Window 3 (location=https://github.com/robotframework/)\n |\n | BrowserB\n | Window 1 (location=https://github.com/)\n\n Example:\n | `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. |\n | `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. |\n | `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA |\n | `Go To` | https://robocon.io | | | # Second window navigates to robocon site. |\n | `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. |\n | ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA |\n | `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. |\n | `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. |\n | ${location} | `Get Location` | | | # ${location} is: https://www.github.com |\n | `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. |\n | ${location} | `Get Location` | | | # ${location} = https://robocon.io/ |\n | @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). |\n | @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. |\n\n The above example, @{locations 1} contains the following items:\n https://robotframework.org/, https://robocon.io/ and\n https://github.com/robotframework/'. The @{locations 2}\n contains the following items: https://robotframework.org/,\n https://robocon.io/, https://github.com/robotframework/'\n and 'https://github.com/.\n\n = Timeouts, waits, and delays =\n\n This section discusses different ways how to wait for elements to\n appear on web pages and to slow down execution speed otherwise.\n It also explains the `time format` that can be used when setting various\n timeouts, waits, and delays.\n\n == Timeout ==\n\n SeleniumLibrary contains various keywords that have an optional\n ``timeout`` argument that specifies how long these keywords should\n wait for certain events or actions. These keywords include, for example,\n ``Wait ...`` keywords and keywords related to alerts. Additionally\n `Execute Async Javascript`. Although it does not have ``timeout``,\n argument, uses a timeout to define how long asynchronous JavaScript\n can run.\n\n The default timeout these keywords use can be set globally either by\n using the `Set Selenium Timeout` keyword or with the ``timeout`` argument\n when `importing` the library. If no default timeout is set globally, the\n default is 5 seconds. If None is specified for the timeout argument in the\n keywords, the default is used. See `time format` below for supported\n timeout syntax.\n\n == Implicit wait ==\n\n Implicit wait specifies the maximum time how long Selenium waits when\n searching for elements. It can be set by using the `Set Selenium Implicit\n Wait` keyword or with the ``implicit_wait`` argument when `importing`\n the library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp|\n Selenium documentation] for more information about this functionality.\n\n See `time format` below for supported syntax.\n\n == Page load ==\n Page load timeout is the amount of time to wait for page load to complete\n until a timeout exception is raised.\n\n The default page load timeout can be set globally\n when `importing` the library with the ``page_load_timeout`` argument\n or by using the `Set Selenium Page Load Timeout` keyword.\n\n See `time format` below for supported timeout syntax.\n\n Support for page load is new in SeleniumLibrary 6.1\n\n == Selenium speed ==\n\n Selenium execution speed can be slowed down globally by using `Set\n Selenium speed` keyword. This functionality is designed to be used for\n demonstrating or debugging purposes. Using it to make sure that elements\n appear on a page is not a good idea. The above-explained timeouts\n and waits should be used instead.\n\n See `time format` below for supported syntax.\n\n == Time format ==\n\n All timeouts and waits can be given as numbers considered seconds\n (e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax\n (e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about\n the time syntax see the\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide].\n\n = Run-on-failure functionality =\n\n SeleniumLibrary has a handy feature that it can automatically execute\n a keyword if any of its own keywords fails. By default, it uses the\n `Capture Page Screenshot` keyword, but this can be changed either by\n using the `Register Keyword To Run On Failure` keyword or with the\n ``run_on_failure`` argument when `importing` the library. It is\n possible to use any keyword from any imported library or resource file.\n\n The run-on-failure functionality can be disabled by using a special value\n ``NOTHING`` or anything considered false (see `Boolean arguments`)\n such as ``NONE``.\n\n = Boolean arguments =\n\n Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the\n boolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint].\n More details in Robot Framework\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide]\n\n Please note SeleniumLibrary 3 and 4 did have own custom methods to covert\n arguments to boolean values.\n\n = EventFiringWebDriver =\n\n The SeleniumLibrary offers support for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver].\n See the Selenium and SeleniumLibrary\n [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support]\n documentation for further details.\n\n EventFiringWebDriver is new in SeleniumLibrary 4.0\n\n = Thread support =\n\n SeleniumLibrary is not thread-safe. This is mainly due because the underlying\n [https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe|\n Selenium tool is not thread-safe] within one browser/driver instance.\n Because of the limitation in the Selenium side, the keywords or the\n API provided by the SeleniumLibrary is not thread-safe.\n\n = Plugins =\n\n SeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal\n functionality without creating a new library or hacking the source code. See\n [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API]\n documentation for further details.\n\n Plugin API is new SeleniumLibrary 4.0\n ", + "sha256": "59c13272c5a498ee00aa6f3e5e2d1f9cec5c355267e1b03f88c604f15dab6c4e" + } +} \ No newline at end of file diff --git a/utest/test/robotframework_seleniumlibrary_translation_list/translate2.json b/utest/test/robotframework_seleniumlibrary_translation_list/translate2.json new file mode 100644 index 000000000..f5698eed2 --- /dev/null +++ b/utest/test/robotframework_seleniumlibrary_translation_list/translate2.json @@ -0,0 +1,917 @@ +{ + "alert_should_be_present": { + "name": "2 alert_should_be_present", + "doc": "2 Verifies that an alert is present and by default, accepts it.\n\n Fails if no alert is present. If ``text`` is a non-empty string,\n then it is used to verify alert's message. The alert is accepted\n by default, but that behavior can be controlled by using the\n ``action`` argument same way as with `Handle Alert`.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n If it is not given, the global default `timeout` is used instead.\n\n ``action`` and ``timeout`` arguments are new in SeleniumLibrary 3.0.\n In earlier versions, the alert was always accepted and a timeout was\n hardcoded to one second.\n ", + "sha256": "c2389ab996f30509c4a5951f32dcfe2c8630040e00cedba19e19faa76a15299d" + }, + "alert_should_not_be_present": { + "name": "alert_should_not_be_present", + "doc": "Verifies that no alert is present.\n\n If the alert actually exists, the ``action`` argument determines\n how it should be handled. By default, the alert is accepted, but\n it can be also dismissed or left open the same way as with the\n `Handle Alert` keyword.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n By default, is not waited for the alert at all, but a custom time can\n be given if alert may be delayed. See the `time format` section\n for information about the syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "75343dfda0a68c40607e961ead1e104553ba074110f33627131125e8c11ecef0" + }, + "handle_alert": { + "name": "hallinnoi_hälytys", + "doc": "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi", + "sha256": "7620b9059b37d2cb1d5823256d0f71d32d3f66af153d6be8ff5100219d4270d6" + }, + "input_text_into_alert": { + "name": "input_text_into_alert", + "doc": "Types the given ``text`` into an input field in an alert.\n\n The alert is accepted by default, but that behavior can be controlled\n by using the ``action`` argument same way as with `Handle Alert`.\n\n ``timeout`` specifies how long to wait for the alert to appear.\n If it is not given, the global default `timeout` is used instead.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "77f522107ebbde4fbcca0e9d1f1e31911dad7f3256ea39d078ed3365cfefbc46" + }, + "close_all_browsers": { + "name": "close_all_browsers", + "doc": "Closes all open browsers and resets the browser cache.\n\n After this keyword, new indexes returned from `Open Browser` keyword\n are reset to 1.\n\n This keyword should be used in test or suite teardown to make sure\n all browsers are closed.\n ", + "sha256": "34bfcab8a0c99c9fc0ebeeaec4432664ab8fbcc99673bd4bb3f9be2e897dbb5b" + }, + "close_browser": { + "name": "close_browser", + "doc": "Closes the current browser.", + "sha256": "a13d34e21bad1e0a76dab6f27c3f8b803825b8996c989f5b106918e27f0d0eb1" + }, + "create_webdriver": { + "name": "create_webdriver", + "doc": "Creates an instance of Selenium WebDriver.\n\n Like `Open Browser`, but allows passing arguments to the created\n WebDriver instance directly. This keyword should only be used if\n the functionality provided by `Open Browser` is not adequate.\n\n ``driver_name`` must be a WebDriver implementation name like Firefox,\n Chrome, Ie, Edge, Safari, or Remote.\n\n The initialized WebDriver can be configured either with a Python\n dictionary ``kwargs`` or by using keyword arguments ``**init_kwargs``.\n These arguments are passed directly to WebDriver without any\n processing. See [https://seleniumhq.github.io/selenium/docs/api/py/api.html|\n Selenium API documentation] for details about the supported arguments.\n\n Examples:\n | # Use proxy with Firefox | | | |\n | ${proxy}= | `Evaluate` | selenium.webdriver.Proxy() | modules=selenium, selenium.webdriver |\n | ${proxy.http_proxy}= | `Set Variable` | localhost:8888 | |\n | `Create Webdriver` | Firefox | proxy=${proxy} | |\n\n Returns the index of this browser instance which can be used later to\n switch back to it. Index starts from 1 and is reset back to it when\n `Close All Browsers` keyword is used. See `Switch Browser` for an\n example.\n ", + "sha256": "c7efa8a6295acc8336de8f8fdccec61b8a19cfc1b091382753929f9d86d2e292" + }, + "get_action_chain_delay": { + "name": "get_action_chain_delay", + "doc": "Gets the currently stored value for chain_delay_value in timestr format.\n ", + "sha256": "167a6689441f92c4099130c03e41a6c1595bcc1a37a207ac0f970b08b1591fdf" + }, + "get_browser_aliases": { + "name": "get_browser_aliases", + "doc": "Returns aliases of all active browser that has an alias as NormalizedDict.\n The dictionary contains the aliases as keys and the index as value.\n This can be accessed as dictionary ``${aliases.key}`` or as list ``@{aliases}[0]``.\n\n Example:\n | `Open Browser` | https://example.com | alias=BrowserA | |\n | `Open Browser` | https://example.com | alias=BrowserB | |\n | &{aliases} | `Get Browser Aliases` | | # &{aliases} = { BrowserA=1|BrowserB=2 } |\n | `Log` | ${aliases.BrowserA} | | # logs ``1`` |\n | FOR | ${alias} | IN | @{aliases} |\n | | `Log` | ${alias} | # logs ``BrowserA`` and ``BrowserB`` |\n | END | | | |\n\n See `Switch Browser` for more information and examples.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "defef82080de396568467a48c850a3db67484a7b786d8ebd76a3f3ba02c71dff" + }, + "get_browser_ids": { + "name": "get_browser_ids", + "doc": "Returns index of all active browser as list.\n\n Example:\n | @{browser_ids}= | Get Browser Ids | | |\n | FOR | ${id} | IN | @{browser_ids} |\n | | @{window_titles}= | Get Window Titles | browser=${id} |\n | | Log | Browser ${id} has these windows: ${window_titles} | |\n | END | | | |\n\n See `Switch Browser` for more information and examples.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "c320152b2a66ba066b100fb8c729f3d36c04a5b72ed753b09d29b6e13613a004" + }, + "get_location": { + "name": "get_location", + "doc": "Returns the current browser window URL.", + "sha256": "3dda250c7af426a85b6ec9c6be5ec5b4a4df41d4b2c72f0fa53b905384c29fc1" + }, + "get_selenium_implicit_wait": { + "name": "get_selenium_implicit_wait", + "doc": "Gets the implicit wait value used by Selenium.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Implicit wait` section above for more information.\n ", + "sha256": "f506381005ec3abf34b359df073e602f6589fac8d030a5369156016bbfacfde2" + }, + "get_selenium_page_load_timeout": { + "name": "get_selenium_page_load_timeout", + "doc": "Gets the time to wait for a page load to complete\n before raising a timeout exception.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Page load` section above for more information.\n\n New in SeleniumLibrary 6.1\n ", + "sha256": "18d82c9e55e7d06156a7fcccd2f96ddd6185a4c3625c344073a3f3e33d6e1e72" + }, + "get_selenium_speed": { + "name": "get_selenium_speed", + "doc": "Gets the delay that is waited after each Selenium command.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Selenium Speed` section above for more information.\n ", + "sha256": "e310cfaddced1d3088b673df4c7c469f10d3992116e2fabe048be986462febc5" + }, + "get_selenium_timeout": { + "name": "get_selenium_timeout", + "doc": "Gets the timeout that is used by various keywords.\n\n The value is returned as a human-readable string like ``1 second``.\n\n See the `Timeout` section above for more information.\n ", + "sha256": "9ebe70c2d1751c70d0f646c8c0e91e3c924ae6062c4c961432405b1fa2e0efe3" + }, + "get_session_id": { + "name": "get_session_id", + "doc": "Returns the currently active browser session id.\n\n New in SeleniumLibrary 3.2\n ", + "sha256": "26f4581c49c3930c0bbc7ff188330eff3bdb9822556ed029c8b47e5cb75949d2" + }, + "get_source": { + "name": "get_source", + "doc": "Returns the entire HTML source of the current page or frame.", + "sha256": "186bf0854602fddcbf9400b50a6db19549cfa23171c01e4708702cbfeaf4a921" + }, + "get_title": { + "name": "get_title", + "doc": "Returns the title of the current page.", + "sha256": "15ca2c42f74a7447ac29d6431219afa7b827245f9bd45e8d220c597c8c76ea72" + }, + "go_back": { + "name": "go_back", + "doc": "Simulates the user clicking the back button on their browser.", + "sha256": "c1ad3668ded03441f5e9019fe3e6417d6c0786fad522ef2d126b233112436ae7" + }, + "go_to": { + "name": "go_to", + "doc": "Navigates the current browser window to the provided ``url``.", + "sha256": "c7db5e459ba7a16a1e895bd0a948765b75bfc536284a2a50ac02e7153ccb0450" + }, + "location_should_be": { + "name": "location_should_be", + "doc": "Verifies that the current URL is exactly ``url``.\n\n The ``url`` argument contains the exact url that should exist in browser.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.2.0.\n ", + "sha256": "ea4b77e8386a52d7881a76cc42cf6c7754da4c44f1b54aa8d71467770a919839" + }, + "location_should_contain": { + "name": "location_should_contain", + "doc": "Verifies that the current URL contains ``expected``.\n\n The ``expected`` argument contains the expected value in url.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.2.0.\n ", + "sha256": "be7e648ca2a1f5a7d83f5fe99d0e9aef696f0c645b57985059179476c4d1d0ed" + }, + "log_location": { + "name": "log_location", + "doc": "Logs and returns the current browser window URL.", + "sha256": "ecdeee422f6587f42650730b5d1510d9f207cda56a2346fa3f6245ad62f4bac5" + }, + "log_source": { + "name": "log_source", + "doc": "Logs and returns the HTML source of the current page or frame.\n\n The ``loglevel`` argument defines the used log level. Valid log\n levels are ``WARN``, ``INFO`` (default), ``DEBUG``, ``TRACE``\n and ``NONE`` (no logging).\n ", + "sha256": "ccfb24c918224eb021f3f020cd9dd1375b128835d8295fc0a40d7f76c628d0b7" + }, + "log_title": { + "name": "log_title", + "doc": "Logs and returns the title of the current page.", + "sha256": "3722f0e150770d3b876af7a430c3a0e22f09a3b847c61b467cce146ed64ceea5" + }, + "open_browser": { + "name": "open_browser", + "doc": "Opens a new browser instance to the optional ``url``.\n\n The ``browser`` argument specifies which browser to use. The\n supported browsers are listed in the table below. The browser names\n are case-insensitive and some browsers have multiple supported names.\n\n | = Browser = | = Name(s) = |\n | Firefox | firefox, ff |\n | Google Chrome | googlechrome, chrome, gc |\n | Headless Firefox | headlessfirefox |\n | Headless Chrome | headlesschrome |\n | Internet Explorer | internetexplorer, ie |\n | Edge | edge |\n | Safari | safari |\n\n To be able to actually use one of these browsers, you need to have\n a matching Selenium browser driver available. See the\n [https://github.com/robotframework/SeleniumLibrary#browser-drivers|\n project documentation] for more details. Headless Firefox and\n Headless Chrome are new additions in SeleniumLibrary 3.1.0\n and require Selenium 3.8.0 or newer.\n\n After opening the browser, it is possible to use optional\n ``url`` to navigate the browser to the desired address.\n\n Optional ``alias`` is an alias given for this browser instance and\n it can be used for switching between browsers. When same ``alias``\n is given with two `Open Browser` keywords, the first keyword will\n open a new browser, but the second one will switch to the already\n opened browser and will not open a new browser. The ``alias``\n definition overrules ``browser`` definition. When same ``alias``\n is used but a different ``browser`` is defined, then switch to\n a browser with same alias is done and new browser is not opened.\n An alternative approach for switching is using an index returned\n by this keyword. These indices start from 1, are incremented when new\n browsers are opened, and reset back to 1 when `Close All Browsers`\n is called. See `Switch Browser` for more information and examples.\n\n Optional ``remote_url`` is the URL for a\n [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid].\n\n Optional ``desired_capabilities`` is deprecated and will be ignored. Capabilities of each\n individual browser is now done through options or services. Please refer to those arguments\n for configuring specific browsers.\n\n Optional ``ff_profile_dir`` is the path to the Firefox profile\n directory if you wish to overwrite the default profile Selenium\n uses. Notice that prior to SeleniumLibrary 3.0, the library\n contained its own profile that was used by default. The\n ``ff_profile_dir`` can also be an instance of the\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html|selenium.webdriver.FirefoxProfile]\n . As a third option, it is possible to use `FirefoxProfile` methods\n and attributes to define the profile using methods and attributes\n in the same way as with ``options`` argument. Example: It is possible\n to use FirefoxProfile `set_preference` to define different\n profile settings. See ``options`` argument documentation in below\n how to handle backslash escaping.\n\n Optional ``options`` argument allows defining browser specific\n Selenium options. Example for Chrome, the ``options`` argument\n allows defining the following\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|methods and attributes]\n and for Firefox these\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.options.html?highlight=firefox#selenium.webdriver.firefox.options.Options|methods and attributes]\n are available. Please note that not all browsers, supported by the\n SeleniumLibrary, have Selenium options available. Therefore please\n consult the Selenium documentation which browsers do support\n the Selenium options. Selenium options are also supported, when ``remote_url``\n argument is used.\n\n The SeleniumLibrary ``options`` argument accepts Selenium\n options in two different formats: as a string and as Python object\n which is an instance of the Selenium options class.\n\n The string format allows defining Selenium options methods\n or attributes and their arguments in Robot Framework test data.\n The method and attributes names are case and space sensitive and\n must match to the Selenium options methods and attributes names.\n When defining a method, it must be defined in a similar way as in\n python: method name, opening parenthesis, zero to many arguments\n and closing parenthesis. If there is a need to define multiple\n arguments for a single method, arguments must be separated with\n comma, just like in Python. Example: `add_argument(\"--headless\")`\n or `add_experimental_option(\"key\", \"value\")`. Attributes are\n defined in a similar way as in Python: attribute name, equal sign,\n and attribute value. Example, `headless=True`. Multiple methods\n and attributes must be separated by a semicolon. Example:\n `add_argument(\"--headless\");add_argument(\"--start-maximized\")`.\n\n Arguments allow defining Python data types and arguments are\n evaluated by using Python\n [https://docs.python.org/3/library/ast.html#ast.literal_eval|ast.literal_eval].\n Strings must be quoted with single or double quotes, example \"value\"\n or 'value'. It is also possible to define other Python builtin\n data types, example `True` or `None`, by not using quotes\n around the arguments.\n\n The string format is space friendly. Usually, spaces do not alter\n the defining methods or attributes. There are two exceptions.\n In some Robot Framework test data formats, two or more spaces are\n considered as cell separator and instead of defining a single\n argument, two or more arguments may be defined. Spaces in string\n arguments are not removed and are left as is. Example\n `add_argument ( \"--headless\" )` is same as\n `add_argument(\"--headless\")`. But `add_argument(\" --headless \")` is\n not same same as `add_argument ( \"--headless\" )`, because\n spaces inside of quotes are not removed. Please note that if\n options string contains backslash, example a Windows OS path,\n the backslash needs escaping both in Robot Framework data and\n in Python side. This means single backslash must be writen using\n four backslash characters. Example, Windows path:\n \"C:\\path\\to\\profile\" must be written as\n \"C:\\\\\\\\path\\\\\\to\\\\\\\\profile\". Another way to write\n backslash is use Python\n [https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals|raw strings]\n and example write: r\"C:\\\\path\\\\to\\\\profile\".\n\n As last format, ``options`` argument also supports receiving\n the Selenium options as Python class instance. In this case, the\n instance is used as-is and the SeleniumLibrary will not convert\n the instance to other formats.\n For example, if the following code return value is saved to\n `${options}` variable in the Robot Framework data:\n | options = webdriver.ChromeOptions()\n | options.add_argument('--disable-dev-shm-usage')\n | return options\n\n Then the `${options}` variable can be used as an argument to\n ``options``.\n\n Example the ``options`` argument can be used to launch Chomium-based\n applications which utilize the\n [https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver|Chromium Embedded Framework]\n . To lauch Chomium-based application, use ``options`` to define\n `binary_location` attribute and use `add_argument` method to define\n `remote-debugging-port` port for the application. Once the browser\n is opened, the test can interact with the embedded web-content of\n the system under test.\n\n Optional ``service_log_path`` argument defines the name of the\n file where to write the browser driver logs. If the\n ``service_log_path`` argument contain a marker ``{index}``, it\n will be automatically replaced with unique running\n index preventing files to be overwritten. Indices start's from 1,\n and how they are represented can be customized using Python's\n [https://docs.python.org/3/library/string.html#format-string-syntax|\n format string syntax].\n\n Optional ``executable_path`` argument defines the path to the driver\n executable, example to a chromedriver or a geckodriver. If not defined\n it is assumed the executable is in the\n [https://en.wikipedia.org/wiki/PATH_(variable)|$PATH].\n\n Examples:\n | `Open Browser` | http://example.com | Chrome | |\n | `Open Browser` | http://example.com | Firefox | alias=Firefox |\n | `Open Browser` | http://example.com | Edge | remote_url=http://127.0.0.1:4444/wd/hub |\n | `Open Browser` | about:blank | | |\n | `Open Browser` | browser=Chrome | | |\n\n Alias examples:\n | ${1_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Opens new browser because alias is new. |\n | ${2_index} = | `Open Browser` | http://example.com | Firefox | | # Opens new browser because alias is not defined. |\n | ${3_index} = | `Open Browser` | http://example.com | Chrome | alias=Chrome | # Switches to the browser with Chrome alias. |\n | ${4_index} = | `Open Browser` | http://example.com | Chrome | alias=${1_index} | # Switches to the browser with Chrome alias. |\n | Should Be Equal | ${1_index} | ${3_index} | | | |\n | Should Be Equal | ${1_index} | ${4_index} | | | |\n | Should Be Equal | ${2_index} | ${2} | | | |\n\n Example when using\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|Chrome options]\n method:\n | `Open Browser` | http://example.com | Chrome | options=add_argument(\"--disable-popup-blocking\"); add_argument(\"--ignore-certificate-errors\") | # Sting format. |\n | ${options} = | Get Options | | | # Selenium options instance. |\n | `Open Browser` | http://example.com | Chrome | options=${options} | |\n | `Open Browser` | None | Chrome | options=binary_location=\"/path/to/binary\";add_argument(\"remote-debugging-port=port\") | # Start Chomium-based application. |\n | `Open Browser` | None | Chrome | options=binary_location=r\"C:\\\\path\\\\to\\\\binary\" | # Windows OS path escaping. |\n\n Example for FirefoxProfile\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=/path/to/profile | # Using profile from disk. |\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=${FirefoxProfile_instance} | # Using instance of FirefoxProfile. |\n | `Open Browser` | http://example.com | Firefox | ff_profile_dir=set_preference(\"key\", \"value\");set_preference(\"other\", \"setting\") | # Defining profile using FirefoxProfile mehtods. |\n\n If the provided configuration options are not enough, it is possible\n to use `Create Webdriver` to customize browser initialization even\n more.\n\n Applying ``desired_capabilities`` argument also for local browser is\n new in SeleniumLibrary 3.1.\n\n Using ``alias`` to decide, is the new browser opened is new\n in SeleniumLibrary 4.0. The ``options`` and ``service_log_path``\n are new in SeleniumLibrary 4.0. Support for ``ff_profile_dir``\n accepting an instance of the `selenium.webdriver.FirefoxProfile`\n and support defining FirefoxProfile with methods and\n attributes are new in SeleniumLibrary 4.0.\n\n Making ``url`` optional is new in SeleniumLibrary 4.1.\n\n The ``executable_path`` argument is new in SeleniumLibrary 4.2.\n ", + "sha256": "0c3f6191eb0bb2f557a3f93ab0c99c6137361091c73d09186c3846208a9ad7ff" + }, + "reload_page": { + "name": "reload_page", + "doc": "Simulates user reloading page.", + "sha256": "29308a1588c11a36ee1e46274959c9fb83b01fa628d38f7d1e60615cfa3c1d54" + }, + "set_action_chain_delay": { + "name": "set_action_chain_delay", + "doc": "Sets the duration of delay in ActionChains() used by SeleniumLibrary.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n\n Value is always stored as milliseconds internally.\n\n The previous value is returned and can be used to restore\n the original value later if needed.\n ", + "sha256": "30a861e88589e077326d025611cd558432a5426b6b002aface8b8367286eca24" + }, + "set_browser_implicit_wait": { + "name": "set_browser_implicit_wait", + "doc": "Sets the implicit wait value used by Selenium.\n\n Same as `Set Selenium Implicit Wait` but only affects the current\n browser.\n ", + "sha256": "a5097a7357967bebd69e46c700917daaa41994d0235b77da90ce0b88d1bd3518" + }, + "set_selenium_implicit_wait": { + "name": "set_selenium_implicit_wait", + "doc": "Sets the implicit wait value used by Selenium.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n This keyword sets the implicit wait for all opened browsers.\n Use `Set Browser Implicit Wait` to set it only to the current\n browser.\n\n See the `Implicit wait` section above for more information.\n\n Example:\n | ${orig wait} = | `Set Selenium Implicit Wait` | 10 seconds |\n | `Perform AJAX call that is slow` |\n | `Set Selenium Implicit Wait` | ${orig wait} |\n ", + "sha256": "1df9421daaba885bd06552d7b62030b285ac8472b98e09e0719554fd2448547c" + }, + "set_selenium_page_load_timeout": { + "name": "set_selenium_page_load_timeout", + "doc": "Sets the page load timeout value used by Selenium.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n In contrast to `Set Selenium Timeout` and `Set Selenium Implicit Wait`,\n this keywords sets the time for the Webdriver to wait until the page\n is loaded before raising a timeout exception.\n\n See the `Page load` section above for more information.\n\n Example:\n | ${orig page load timeout} = | `Set Selenium Page Load Timeout` | 30 seconds |\n | `Open page that loads slowly` |\n | `Set Selenium Page Load Timeout` | ${orig page load timeout} |\n\n New in SeleniumLibrary 6.1\n ", + "sha256": "37e2b5f6af58ce3b2e1d520c0c2d56b99cadf175dd31f1ccfb05de36c8cfdab0" + }, + "set_selenium_speed": { + "name": "set_selenium_speed", + "doc": "Sets the delay that is waited after each Selenium command.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n See the `Selenium Speed` section above for more information.\n\n Example:\n | `Set Selenium Speed` | 0.5 seconds |\n ", + "sha256": "143bd7c58689c676a711dcf2571cfdd8ee609325264bd632db2945dce3300ae5" + }, + "set_selenium_timeout": { + "name": "set_selenium_timeout", + "doc": "Sets the timeout that is used by various keywords.\n\n The value can be given as a number that is considered to be\n seconds or as a human-readable string like ``1 second``.\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n See the `Timeout` section above for more information.\n\n Example:\n | ${orig timeout} = | `Set Selenium Timeout` | 15 seconds |\n | `Open page that loads slowly` |\n | `Set Selenium Timeout` | ${orig timeout} |\n ", + "sha256": "6e78114e0e60f0148629589b897d6a67b1c492317eb883b2ca4f3c6457a5d01b" + }, + "switch_browser": { + "name": "switch_browser", + "doc": "Switches between active browsers using ``index_or_alias``.\n\n Indices are returned by the `Open Browser` keyword and aliases can\n be given to it explicitly. Indices start from 1.\n\n Example:\n | `Open Browser` | http://google.com | ff |\n | `Location Should Be` | http://google.com | |\n | `Open Browser` | http://yahoo.com | ie | alias=second |\n | `Location Should Be` | http://yahoo.com | |\n | `Switch Browser` | 1 | # index |\n | `Page Should Contain` | I'm feeling lucky | |\n | `Switch Browser` | second | # alias |\n | `Page Should Contain` | More Yahoo! | |\n | `Close All Browsers` | | |\n\n Above example expects that there was no other open browsers when\n opening the first one because it used index ``1`` when switching to\n it later. If you are not sure about that, you can store the index\n into a variable as below.\n\n | ${index} = | `Open Browser` | http://google.com |\n | # Do something ... | | |\n | `Switch Browser` | ${index} | |\n ", + "sha256": "de918f9e83ebecafb37ba3704649efb39dfbf405960597e1e99dddffdf69c1fb" + }, + "title_should_be": { + "name": "title_should_be", + "doc": "Verifies that the current page title equals ``title``.\n\n The ``message`` argument can be used to override the default error\n message.\n\n ``message`` argument is new in SeleniumLibrary 3.1.\n ", + "sha256": "f3ed755ed3bdbb8e7b334bce951620ceb83c3aca1cad51a31b2eea42260e1199" + }, + "add_cookie": { + "name": "add_cookie", + "doc": "Adds a cookie to your current session.\n\n ``name`` and ``value`` are required, ``path``, ``domain``, ``secure``\n and ``expiry`` are optional. Expiry supports the same formats as\n the [http://robotframework.org/robotframework/latest/libraries/DateTime.html|DateTime]\n library or an epoch timestamp.\n\n Example:\n | `Add Cookie` | foo | bar | |\n | `Add Cookie` | foo | bar | domain=example.com |\n | `Add Cookie` | foo | bar | expiry=2027-09-28 16:21:35 | # Expiry as timestamp. |\n | `Add Cookie` | foo | bar | expiry=1822137695 | # Expiry as epoch seconds. |\n\n Prior to SeleniumLibrary 3.0 setting expiry did not work.\n ", + "sha256": "4824fdf8e69148f3f74ed2a177fc4417caa1b7d24b5fd55378e8cdbd3ace04a5" + }, + "delete_all_cookies": { + "name": "delete_all_cookies", + "doc": "Deletes all cookies.", + "sha256": "3300bc6758bd113107fb425664eacbda4143514393c4d4197ac28626592b77c5" + }, + "delete_cookie": { + "name": "delete_cookie", + "doc": "Deletes the cookie matching ``name``.\n\n If the cookie is not found, nothing happens.\n ", + "sha256": "9f69becc9575a4dc10a09bebdcb7405fbfba883c8268c889baca4659ba549d04" + }, + "get_cookie": { + "name": "get_cookie", + "doc": "Returns information of cookie with ``name`` as an object.\n\n If no cookie is found with ``name``, keyword fails. The cookie object\n contains details about the cookie. Attributes available in the object\n are documented in the table below.\n\n | = Attribute = | = Explanation = |\n | name | The name of a cookie. |\n | value | Value of the cookie. |\n | path | Indicates a URL path, for example ``/``. |\n | domain | The domain, the cookie is visible to. |\n | secure | When true, the cookie is only used with HTTPS connections. |\n | httpOnly | When true, the cookie is not accessible via JavaScript. |\n | expiry | Python datetime object indicating when the cookie expires. |\n | extra | Possible attributes outside of the WebDriver specification |\n\n See the\n [https://w3c.github.io/webdriver/#cookies|WebDriver specification]\n for details about the cookie information.\n Notice that ``expiry`` is specified as a\n [https://docs.python.org/3/library/datetime.html#datetime.datetime|datetime object],\n not as seconds since Unix Epoch like WebDriver natively does.\n\n In some cases, example when running a browser in the cloud, it is possible that\n the cookie contains other attributes than is defined in the\n [https://w3c.github.io/webdriver/#cookies|WebDriver specification].\n These other attributes are available in an ``extra`` attribute in the cookie\n object and it contains a dictionary of the other attributes. The ``extra``\n attribute is new in SeleniumLibrary 4.0.\n\n Example:\n | `Add Cookie` | foo | bar |\n | ${cookie} = | `Get Cookie` | foo |\n | `Should Be Equal` | ${cookie.name} | foo |\n | `Should Be Equal` | ${cookie.value} | bar |\n | `Should Be True` | ${cookie.expiry.year} > 2017 |\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "747951f772be34600739a36f99d276499abc5137ddb8994e1773b68cc7c2e05b" + }, + "get_cookies": { + "name": "get_cookies", + "doc": "Returns all cookies of the current page.\n\n If ``as_dict`` argument evaluates as false, see `Boolean arguments`\n for more details, then cookie information is returned as\n a single string in format ``name1=value1; name2=value2; name3=value3``.\n When ``as_dict`` argument evaluates as true, cookie information\n is returned as Robot Framework dictionary format. The string format\n can be used, for example, for logging purposes or in headers when\n sending HTTP requests. The dictionary format is helpful when\n the result can be passed to requests library's Create Session\n keyword's optional cookies parameter.\n\n The `` as_dict`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "7a9bda6590cdb1aa8825e385ffefc087a7ca087936dd11350d6234e6e2c05e6c" + }, + "add_location_strategy": { + "name": "add_location_strategy", + "doc": "Adds a custom location strategy.\n\n See `Custom locators` for information on how to create and use\n custom strategies. `Remove Location Strategy` can be used to\n remove a registered strategy.\n\n Location strategies are automatically removed after leaving the\n current scope by default. Setting ``persist`` to a true value (see\n `Boolean arguments`) will cause the location strategy to stay\n registered throughout the life of the test.\n ", + "sha256": "046e816fd4d028592aaa9146fd815aec20809f88d4160fdf166fb19d5fdcfa0c" + }, + "assign_id_to_element": { + "name": "assign_id_to_element", + "doc": "Assigns a temporary ``id`` to the element specified by ``locator``.\n\n This is mainly useful if the locator is complicated and/or slow XPath\n expression and it is needed multiple times. Identifier expires when\n the page is reloaded.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | `Assign ID to Element` | //ul[@class='example' and ./li[contains(., 'Stuff')]] | my id |\n | `Page Should Contain Element` | my id |\n ", + "sha256": "2ce9ab7a44154be53f32d6d6e8b1b6e9dd8bbff880048c99ed4b62763a0b522c" + }, + "clear_element_text": { + "name": "clear_element_text", + "doc": "Clears the value of the text-input-element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "31d7803b76e63ff90ff333f06e323aba4f820632b8795d51d24242fb65f4e7d2" + }, + "click_button": { + "name": "click_button", + "doc": "Clicks the button identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "72dcaeaa3bc1a4e14c596d72a19cbd82e0881732440153cbfb27272b2066dd77" + }, + "click_element": { + "name": "click_element", + "doc": "Click the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``modifier`` argument can be used to pass\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys|Selenium Keys]\n when clicking the element. The `+` can be used as a separator\n for different Selenium Keys. The `CTRL` is internally translated to\n the `CONTROL` key. The ``modifier`` is space and case insensitive, example\n \"alt\" and \" aLt \" are supported formats to\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ALT|ALT key]\n . If ``modifier`` does not match to Selenium Keys, keyword fails.\n\n If ``action_chain`` argument is true, see `Boolean arguments` for more\n details on how to set boolean argument, then keyword uses ActionChain\n based click instead of the .click() function. If both\n ``action_chain`` and ``modifier`` are defined, the click will be\n performed using ``modifier`` and ``action_chain`` will be ignored.\n\n Example:\n | Click Element | id:button | | # Would click element without any modifiers. |\n | Click Element | id:button | CTRL | # Would click element with CTLR key pressed down. |\n | Click Element | id:button | CTRL+ALT | # Would click element with CTLR and ALT keys pressed down. |\n | Click Element | id:button | action_chain=True | # Clicks the button using an Selenium ActionChains |\n\n The ``modifier`` argument is new in SeleniumLibrary 3.2\n The ``action_chain`` argument is new in SeleniumLibrary 4.1\n ", + "sha256": "5099da1ff98ae3351fb740f301498066e1f86b8f9a6ef7f178e2b29d5d5afb35" + }, + "click_element_at_coordinates": { + "name": "click_element_at_coordinates", + "doc": "Click the element ``locator`` at ``xoffset/yoffset``.\n\n The Cursor is moved and the center of the element and x/y coordinates are\n calculated from that point.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "6c9be5ef41acf068a8ecf3972fe88f5f9c5257cf843d014dd9a76f7b4a3719c7" + }, + "click_image": { + "name": "click_image", + "doc": "Clicks an image identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "a83623f5affb23d6a089b6cab14e9983dd55eba3b11deedf672c6d2c3d387cf4" + }, + "click_link": { + "name": "click_link", + "doc": "Clicks a link identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See the `Click Element` keyword for details about the\n ``modifier`` argument.\n\n The ``modifier`` argument is new in SeleniumLibrary 3.3\n ", + "sha256": "d8c5ec4c5359fed7c6a5094f5d18e8766b4dfb6f4e4d5ea1d61d50b7b09e7c31" + }, + "cover_element": { + "name": "cover_element", + "doc": "Will cover elements identified by ``locator`` with a blue div without breaking page layout.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.3.0\n\n Example:\n |`Cover Element` | css:div#container |\n ", + "sha256": "0dd30bea744e70b71f3e5fc5358833c291d404cdfa23970d09ece25f2380fb28" + }, + "double_click_element": { + "name": "double_click_element", + "doc": "Double clicks the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "c7b11722014178d683d80e276fcea367307d1d4cbe3b93b17cbbbe30b35b7174" + }, + "drag_and_drop": { + "name": "drag_and_drop", + "doc": "Drags the element identified by ``locator`` into the ``target`` element.\n\n The ``locator`` argument is the locator of the dragged element\n and the ``target`` is the locator of the target. See the\n `Locating elements` section for details about the locator syntax.\n\n Example:\n | `Drag And Drop` | css:div#element | css:div.target |\n ", + "sha256": "af13a511a462a2540dc93baf3bc42d05143aaf0de6ce9771029044a25b40bd64" + }, + "drag_and_drop_by_offset": { + "name": "drag_and_drop_by_offset", + "doc": "Drags the element identified with ``locator`` by ``xoffset/yoffset``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The element will be moved by ``xoffset`` and ``yoffset``, each of which\n is a negative or positive number specifying the offset.\n\n Example:\n | `Drag And Drop By Offset` | myElem | 50 | -35 | # Move myElem 50px right and 35px down |\n ", + "sha256": "89750f538dc14ca0c04fbe1a3aba732352f9723d658bbd971905003ee9c351f6" + }, + "element_attribute_value_should_be": { + "name": "element_attribute_value_should_be", + "doc": "Verifies element identified by ``locator`` contains expected attribute value.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n `Element Attribute Value Should Be` | css:img | href | value\n\n New in SeleniumLibrary 3.2.\n ", + "sha256": "330701ee8d3307c6543bdfeafa649d14689f639f2e139e499aae8ec495d7d015" + }, + "element_should_be_disabled": { + "name": "element_should_be_disabled", + "doc": "Verifies that element identified by ``locator`` is disabled.\n\n This keyword considers also elements that are read-only to be\n disabled.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "6f34019f6e68805c2b73ef5207b424743c9461dfd30061f163d21948304bb012" + }, + "element_should_be_enabled": { + "name": "element_should_be_enabled", + "doc": "Verifies that element identified by ``locator`` is enabled.\n\n This keyword considers also elements that are read-only to be\n disabled.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "014f8538093bdcef0ed8c7a13020ae513a4a14bd2d0b71f1843de951f5c7b5d3" + }, + "element_should_be_focused": { + "name": "element_should_be_focused", + "doc": "Verifies that element identified by ``locator`` is focused.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "f327420520f06421e0a11062af115eaa7bb3eaf97a0ae4b6f02c0c82c9fa1f73" + }, + "element_should_be_visible": { + "name": "element_should_be_visible", + "doc": "Verifies that the element identified by ``locator`` is visible.\n\n Herein, visible means that the element is logically visible, not\n optically visible in the current browser viewport. For example,\n an element that carries ``display:none`` is not logically visible,\n so using this keyword on that element would fail.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n ", + "sha256": "98c4fb9d0b90e73c3d702b553aa6a30f027320463eb18e298cd5b9133f1cc36a" + }, + "element_should_contain": { + "name": "element_should_contain", + "doc": "Verifies that element ``locator`` contains text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False. New in SeleniumLibrary 3.1.\n\n ``ignore_case`` argument is new in SeleniumLibrary 3.1.\n\n Use `Element Text Should Be` if you want to match the exact text,\n not a substring.\n ", + "sha256": "998a924785fef84597b5e5fc866f4c5d7e4b0a753cba68d15be0f3b44588c06d" + }, + "element_should_not_be_visible": { + "name": "element_should_not_be_visible", + "doc": "Verifies that the element identified by ``locator`` is NOT visible.\n\n Passes if the element does not exists. See `Element Should Be Visible`\n for more information about visibility and supported arguments.\n ", + "sha256": "811779774da3cf876101661d4c15a6e89ea0568493be61b19fded7a0bd40f0c4" + }, + "element_should_not_contain": { + "name": "element_should_not_contain", + "doc": "Verifies that element ``locator`` does not contain text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n ``ignore_case`` argument new in SeleniumLibrary 3.1.\n ", + "sha256": "ef9492bae813b1597fabc9d6f02a21c05ff736a18fb6eb20fb81e6ca40011437" + }, + "element_text_should_be": { + "name": "element_text_should_be", + "doc": "Verifies that element ``locator`` contains exact the text ``expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n ``ignore_case`` argument is new in SeleniumLibrary 3.1.\n\n Use `Element Should Contain` if a substring match is desired.\n ", + "sha256": "4036c0bb4fe36085fcab4421f3ffb65265d70d8cb852106ea13a983438a77723" + }, + "element_text_should_not_be": { + "name": "element_text_should_not_be", + "doc": "Verifies that element ``locator`` does not contain exact the text ``not_expected``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``ignore_case`` argument can be set to True to compare case\n insensitive, default is False.\n\n New in SeleniumLibrary 3.1.1\n ", + "sha256": "67821af845f34ba19ebffb38fa558c375f7261e3d9c9f04cb653bad828e99cf4" + }, + "get_all_links": { + "name": "get_all_links", + "doc": "Returns a list containing ids of all links found in current page.\n\n If a link has no id, an empty string will be in the list instead.\n ", + "sha256": "f17319af1acc205f3ee5fe01b5e8960bba45ff05629b4b1d2e4fdec770163c1a" + }, + "get_dom_attribute": { + "name": "get_dom_attribute", + "doc": "Returns the value of ``attribute`` from the element ``locator``. `Get DOM Attribute` keyword\n only returns attributes declared within the element's HTML markup. If the requested attribute\n is not there, the keyword returns ${None}.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${id}= | `Get DOM Attribute` | css:h1 | id |\n\n ", + "sha256": "1337e3b21fae3759b85da9dba5fda08378fd8ea4ff16b9d9a03fa54f1d75853f" + }, + "get_element_attribute": { + "name": "get_element_attribute", + "doc": "Returns the value of ``attribute`` from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${id}= | `Get Element Attribute` | css:h1 | id |\n\n Passing attribute name as part of the ``locator`` was removed\n in SeleniumLibrary 3.2. The explicit ``attribute`` argument\n should be used instead.\n ", + "sha256": "3325a9affcfb67bbb11b250a7479d125f3a7c0ca3e6b4772b35f873c6942a300" + }, + "get_element_count": { + "name": "get_element_count", + "doc": "Returns the number of elements matching ``locator``.\n\n If you wish to assert the number of matching elements, use\n `Page Should Contain Element` with ``limit`` argument. Keyword will\n always return an integer.\n\n Example:\n | ${count} = | `Get Element Count` | name:div_name |\n | `Should Be True` | ${count} > 2 | |\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "edc00542de29af7b4b11d459c21c6a8f87fd21233f49c1b9a5b4d8e06d0128f8" + }, + "get_element_size": { + "name": "get_element_size", + "doc": "Returns width and height of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Both width and height are returned as integers.\n\n Example:\n | ${width} | ${height} = | `Get Element Size` | css:div#container |\n ", + "sha256": "d1dc235938760fc871c68838032587be56a8ebb13dc295f68e9df6a03c72d266" + }, + "get_horizontal_position": { + "name": "get_horizontal_position", + "doc": "Returns the horizontal position of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The position is returned in pixels off the left side of the page,\n as an integer.\n\n See also `Get Vertical Position`.\n ", + "sha256": "7b81ffe406d7708e72861971ec879a7cdb3adff3cf3a6ad4c816c0b36de84a79" + }, + "get_property": { + "name": "get_property", + "doc": "Returns the value of ``property`` from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Example:\n | ${text_length}= | `Get Property` | css:h1 | text_length |\n\n ", + "sha256": "6335a05f73d42212f78d4285872595fec96dbb4e669b8026b2e9bdab4f3284eb" + }, + "get_text": { + "name": "get_text", + "doc": "Returns the text value of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "c5df21cb13fca76338626c63ce4e0e83be2e5563eb296833f55678c3424ad333" + }, + "get_value": { + "name": "get_value", + "doc": "Returns the value attribute of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5856fe53c0581268a5a395418f08aedb118762d5ec8fbd553cf2d44b82aa27c6" + }, + "get_vertical_position": { + "name": "get_vertical_position", + "doc": "Returns the vertical position of the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The position is returned in pixels off the top of the page,\n as an integer.\n\n See also `Get Horizontal Position`.\n ", + "sha256": "a1f1cc8075b6323bf4b900ea52357586f28721239e45ec11fb1a130faa9246c0" + }, + "get_webelement": { + "name": "get_webelement", + "doc": "Returns the first WebElement matching the given ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5deaaabc9162680121dbe744d4e476e40c7eacba17922459c209f211ba74b5cd" + }, + "get_webelements": { + "name": "get_webelements", + "doc": "Returns a list of WebElement objects matching the ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Starting from SeleniumLibrary 3.0, the keyword returns an empty\n list if there are no matching elements. In previous releases, the\n keyword failed in this case.\n ", + "sha256": "ab7b4634b7c54b2b17daf4c290704fe45af948eeff41f9dbc1c01fab33273496" + }, + "mouse_down": { + "name": "mouse_down", + "doc": "Simulates pressing the left mouse button on the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The element is pressed without releasing the mouse button.\n\n See also the more specific keywords `Mouse Down On Image` and\n `Mouse Down On Link`.\n ", + "sha256": "c0e5431b9b9eb6875830eadccc1ed0f9a9d34781ecef40ab059194054eeae9e4" + }, + "mouse_down_on_image": { + "name": "mouse_down_on_image", + "doc": "Simulates a mouse down event on an image identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n ", + "sha256": "3b7c0b9a83908e60012f095acc71305c853dd07864497077420f1a3930ea144c" + }, + "mouse_down_on_link": { + "name": "mouse_down_on_link", + "doc": "Simulates a mouse down event on a link identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n ", + "sha256": "8ef3134ef374ebc89f76985b09abd2caac10f603e8db38cf78dcbac9c826cc3e" + }, + "mouse_out": { + "name": "mouse_out", + "doc": "Simulates moving the mouse away from the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "835368b635d5d1c5c50250595a8e7cb2feb9eb4af4fa14753c561a9c35894db1" + }, + "mouse_over": { + "name": "mouse_over", + "doc": "Simulates hovering the mouse over the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "b4c14a2a10cfddb07d7748630ba6546991d3da2311a20aa146685a0f78e41241" + }, + "mouse_up": { + "name": "mouse_up", + "doc": "Simulates releasing the left mouse button on the element ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "47c3666126bc84aa9104f6137fd51817efcd1804aaf7c965df143a6aad71895a" + }, + "open_context_menu": { + "name": "open_context_menu", + "doc": "Opens the context menu on the element identified by ``locator``.", + "sha256": "8cb9023a05753eb5cc230116dec98188b5bdfac0b94955b69957726131189493" + }, + "page_should_contain": { + "name": "page_should_contain", + "doc": "Verifies that current page contains ``text``.\n\n If this keyword fails, it automatically logs the page source\n using the log level specified with the optional ``loglevel``\n argument. Valid log levels are ``TRACE`` (default), ``DEBUG``,\n ``INFO``, ``WARN``, and ``NONE``. If the log level is ``NONE``\n or below the current active log level the source will not be logged.\n\n !! WARNING !! If you have an iframe selected, `Page Should Contain`\n will reset the frame reference back to the main frame. This is due\n to the fact that is searches for the ``text`` in all frames. To locate\n an element in an iframe after calling `Page Should Contian` one needs\n to (re)select the frame.\n ", + "sha256": "bb1186dbfae09e52cad4cad8def5bf2980085e48f75b6af2330bcd4da67477af" + }, + "page_should_contain_element": { + "name": "page_should_contain_element", + "doc": "Verifies that element ``locator`` is found on the current page.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n The ``message`` argument can be used to override the default error\n message.\n\n The ``limit`` argument can used to define how many elements the\n page should contain. When ``limit`` is ``None`` (default) page can\n contain one or more elements. When limit is a number, page must\n contain same number of elements.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n\n Examples assumes that locator matches to two elements.\n | `Page Should Contain Element` | div_name | limit=1 | # Keyword fails. |\n | `Page Should Contain Element` | div_name | limit=2 | # Keyword passes. |\n | `Page Should Contain Element` | div_name | limit=none | # None is considered one or more. |\n | `Page Should Contain Element` | div_name | | # Same as above. |\n\n The ``limit`` argument is new in SeleniumLibrary 3.0.\n ", + "sha256": "d2c24d9ce997c94b3cd391306893b9d864c389a047c274ca1ab323e51f960f8e" + }, + "page_should_contain_image": { + "name": "page_should_contain_image", + "doc": "Verifies image identified by ``locator`` is found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "84ab3a648d3b18c5e266ba075408f3cb2ac3b736e1e2009a6cca125de5d07a50" + }, + "page_should_contain_link": { + "name": "page_should_contain_link", + "doc": "Verifies link identified by ``locator`` is found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "005f6565f4fcd9b91f87a2274c32fae7545619549be26f23b2cc06856e44ecba" + }, + "page_should_not_contain": { + "name": "page_should_not_contain", + "doc": "Verifies the current page does not contain ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "72389be32f084ed5a3716a32e833e117c419bc2c6ebfa525a79e69054bb2a8cc" + }, + "page_should_not_contain_element": { + "name": "page_should_not_contain_element", + "doc": "Verifies that element ``locator`` is not found on the current page.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n See `Page Should Contain` for an explanation about ``message`` and\n ``loglevel`` arguments.\n ", + "sha256": "3939f5d1fce87d85f013ae3e4327b50404cf832231d4ca2e677013808ee8ff92" + }, + "page_should_not_contain_image": { + "name": "page_should_not_contain_image", + "doc": "Verifies image identified by ``locator`` is not found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, images are searched\n using ``id``, ``name``, ``src`` and ``alt``.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "7367c4581992c47a2fbd74fd0beccc254e883879f6b93f206242d0ecb6397448" + }, + "page_should_not_contain_link": { + "name": "page_should_not_contain_link", + "doc": "Verifies link identified by ``locator`` is not found from current page.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, links are searched\n using ``id``, ``name``, ``href`` and the link text.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n ", + "sha256": "61fca3076c7b671f21528f5d141ee7b43ecc1acada608b4157d08ecb38fae0e1" + }, + "press_key": { + "name": "press_key", + "doc": "Simulates user pressing key on element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n ``key`` is either a single character, a string, or a numerical ASCII\n code of the key lead by '\\'.\n\n Examples:\n | `Press Key` | text_field | q |\n | `Press Key` | text_field | abcde |\n | `Press Key` | login_button | \\13 | # ASCII code for enter key |\n\n `Press Key` and `Press Keys` differ in the methods to simulate key\n presses. `Press Key` uses the WebDriver `SEND_KEYS_TO_ELEMENT` command\n using the selenium send_keys method. Although one is not recommended\n over the other if `Press Key` does not work we recommend trying\n `Press Keys`.\n send_\n ", + "sha256": "fd4035762f6f532aed3cd2b93ad24002a51503e8a86cd7da956a3e2cf8a1038d" + }, + "press_keys": { + "name": "press_keys", + "doc": "Simulates the user pressing key(s) to an element or on the active browser.\n\n If ``locator`` evaluates as false, see `Boolean arguments` for more\n details, then the ``keys`` are sent to the currently active browser.\n Otherwise element is searched and ``keys`` are send to the element\n identified by the ``locator``. In later case, keyword fails if element\n is not found. See the `Locating elements` section for details about\n the locator syntax.\n\n ``keys`` arguments can contain one or many strings, but it can not\n be empty. ``keys`` can also be a combination of\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html|Selenium Keys]\n and strings or a single Selenium Key. If Selenium Key is combined\n with strings, Selenium key and strings must be separated by the\n `+` character, like in `CONTROL+c`. Selenium Keys\n are space and case sensitive and Selenium Keys are not parsed\n inside of the string. Example AALTO, would send string `AALTO`\n and `ALT` not parsed inside of the string. But `A+ALT+O` would\n found Selenium ALT key from the ``keys`` argument. It also possible\n to press many Selenium Keys down at the same time, example\n 'ALT+ARROW_DOWN`.\n\n If Selenium Keys are detected in the ``keys`` argument, keyword\n will press the Selenium Key down, send the strings and\n then release the Selenium Key. If keyword needs to send a Selenium\n Key as a string, then each character must be separated with\n `+` character, example `E+N+D`.\n\n `CTRL` is alias for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.CONTROL|Selenium CONTROL]\n and ESC is alias for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ESCAPE|Selenium ESCAPE]\n\n New in SeleniumLibrary 3.3\n\n Examples:\n | `Press Keys` | text_field | AAAAA | | # Sends string \"AAAAA\" to element. |\n | `Press Keys` | None | BBBBB | | # Sends string \"BBBBB\" to currently active browser. |\n | `Press Keys` | text_field | E+N+D | | # Sends string \"END\" to element. |\n | `Press Keys` | text_field | XXX | YY | # Sends strings \"XXX\" and \"YY\" to element. |\n | `Press Keys` | text_field | XXX+YY | | # Same as above. |\n | `Press Keys` | text_field | ALT+ARROW_DOWN | | # Pressing \"ALT\" key down, then pressing ARROW_DOWN and then releasing both keys. |\n | `Press Keys` | text_field | ALT | ARROW_DOWN | # Pressing \"ALT\" key and then pressing ARROW_DOWN. |\n | `Press Keys` | text_field | CTRL+c | | # Pressing CTRL key down, sends string \"c\" and then releases CTRL key. |\n | `Press Keys` | button | RETURN | | # Pressing \"ENTER\" key to element. |\n\n `Press Key` and `Press Keys` differ in the methods to simulate key\n presses. `Press Keys` uses the Selenium/WebDriver Actions.\n `Press Keys` also has a more extensive syntax for describing keys,\n key combinations, and key actions. Although one is not recommended\n over the other if `Press Keys` does not work we recommend trying\n `Press Key`.\n ", + "sha256": "549b119394b8f48407c11208e1f38c3f2c753e9a40b5c6f1f47b3320df3f3612" + }, + "remove_location_strategy": { + "name": "remove_location_strategy", + "doc": "Removes a previously added custom location strategy.\n\n See `Custom locators` for information on how to create and use\n custom strategies.\n ", + "sha256": "827184ef194cec97d793297edbc6544d2e6774a80a14136ccfa0d5cc04fbc09e" + }, + "scroll_element_into_view": { + "name": "scroll_element_into_view", + "doc": "Scrolls the element identified by ``locator`` into view.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.2.0\n ", + "sha256": "0d567a31d5b64fcfb38b47c2f5f452de4fbe3d08aa0c0547644d4c59b243ef60" + }, + "set_focus_to_element": { + "name": "set_focus_to_element", + "doc": "Sets the focus to the element identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Prior to SeleniumLibrary 3.0 this keyword was named `Focus`.\n ", + "sha256": "0b02399995113cd6ac38557106b4697e4d86f9874173ed593a8853e63362c74f" + }, + "simulate_event": { + "name": "simulate_event", + "doc": "Simulates ``event`` on the element identified by ``locator``.\n\n This keyword is useful if element has ``OnEvent`` handler that\n needs to be explicitly invoked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Prior to SeleniumLibrary 3.0 this keyword was named `Simulate`.\n ", + "sha256": "49cd268150ae4f3170f13d6b5a25809f41080efa3f3b5ca0fa2e2d8cd3ea7795" + }, + "wait_for_expected_condition": { + "name": "wait_for_expected_condition", + "doc": "Waits until ``condition`` is true or ``timeout`` expires.\n\n The condition must be one of selenium's expected condition which\n can be found within the selenium\n [https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions|Python API]\n documentation. The expected condition can written as snake_case\n (ex title_is) or it can be space delimited (ex Title Is). Some\n conditions require additional arguments or ``args`` which should\n be passed along after the expected condition.\n\n Fails if the timeout expires before the condition becomes true.\n The default value is 10 seconds.\n\n Examples:\n | `Wait For Expected Condition` | alert_is_present |\n | `Wait For Expected Condition` | Title Is | New Title |\n\n If the expected condition expects a locator then one can pass\n as arguments a tuple containing the selenium locator strategies\n and the locator.\n\n Example of expected condition expecting locator:\n | ${byElem}= | Evaluate (\"id\",\"added_btn\")\n | `Wait For Expected Condition` | Presence Of Element Located | ${byElem}\n ", + "sha256": "7e512f1e3c97525aa828d624627aaf3f8b76ac0ec1aaa507b36ff9c8fff34d5a" + }, + "checkbox_should_be_selected": { + "name": "checkbox_should_be_selected", + "doc": "Verifies checkbox ``locator`` is selected/checked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "e50bf6856c0f0c3f373adb3bcc3b7d677738088632055f507797887c9f822136" + }, + "checkbox_should_not_be_selected": { + "name": "checkbox_should_not_be_selected", + "doc": "Verifies checkbox ``locator`` is not selected/checked.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "8488752a0365d5c94b3a7885d53b67f99d92ccc5687fdc59411b42a40fa95443" + }, + "choose_file": { + "name": "choose_file", + "doc": "Inputs the ``file_path`` into the file input field ``locator``.\n\n This keyword is most often used to input files into upload forms.\n The keyword does not check ``file_path`` is the file or folder\n available on the machine where tests are executed. If the ``file_path``\n points at a file and when using Selenium Grid, Selenium will\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.command.html?highlight=upload#selenium.webdriver.remote.command.Command.UPLOAD_FILE|magically],\n transfer the file from the machine where the tests are executed\n to the Selenium Grid node where the browser is running.\n Then Selenium will send the file path, from the nodes file\n system, to the browser.\n\n That ``file_path`` is not checked, is new in SeleniumLibrary 4.0.\n\n Example:\n | `Choose File` | my_upload_field | ${CURDIR}/trades.csv |\n ", + "sha256": "244543282ef6c62ec448fb42ed37706978ecf84aec27a9c7774fdd39bc84697c" + }, + "input_password": { + "name": "input_password", + "doc": "Types the given password into the text field identified by ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax. See `Input Text` for ``clear`` argument details.\n\n Difference compared to `Input Text` is that this keyword does not\n log the given password on the INFO level. Notice that if you use\n the keyword like\n\n | Input Password | password_field | password |\n\n the password is shown as a normal keyword argument. A way to avoid\n that is using variables like\n\n | Input Password | password_field | ${PASSWORD} |\n\n Please notice that Robot Framework logs all arguments using\n the TRACE level and tests must not be executed using level below\n DEBUG if the password should not be logged in any format.\n\n The `clear` argument is new in SeleniumLibrary 4.0. Hiding password\n logging from Selenium logs is new in SeleniumLibrary 4.2.\n ", + "sha256": "2471a62ea46d3d4815fe3700c92b61bd4abee39926bc4dadeb072bb88ba69fd5" + }, + "input_text": { + "name": "input_text", + "doc": "Types the given ``text`` into the text field identified by ``locator``.\n\n When ``clear`` is true, the input element is cleared before\n the text is typed into the element. When false, the previous text\n is not cleared from the element. Use `Input Password` if you\n do not want the given ``text`` to be logged.\n\n If [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid]\n is used and the ``text`` argument points to a file in the file system,\n then this keyword prevents the Selenium to transfer the file to the\n Selenium Grid hub. Instead, this keyword will send the ``text`` string\n as is to the element. If a file should be transferred to the hub and\n upload should be performed, please use `Choose File` keyword.\n\n See the `Locating elements` section for details about the locator\n syntax. See the `Boolean arguments` section how Boolean values are\n handled.\n\n Disabling the file upload the Selenium Grid node and the `clear`\n argument are new in SeleniumLibrary 4.0\n ", + "sha256": "77be02dfff6bb6cc9d97af190e48a4c333913ca5058e67c85a4055bb84a9f494" + }, + "page_should_contain_button": { + "name": "page_should_contain_button", + "doc": "Verifies button ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n ", + "sha256": "f5fdc2763607b8a19e0dcbc2c8bc0512959193b4312232d89bdf5e3c1287ee25" + }, + "page_should_contain_checkbox": { + "name": "page_should_contain_checkbox", + "doc": "Verifies checkbox ``locator`` is found from the current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "827b0517772c7f3d0a8c9c41a1557892b98f0c9ee7228aa80a17df7d1766b338" + }, + "page_should_contain_radio_button": { + "name": "page_should_contain_radio_button", + "doc": "Verifies radio button ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, radio buttons are\n searched using ``id``, ``name`` and ``value``.\n ", + "sha256": "a1bd5c4a731ebb21b599006d59a7c7d163da5fb64ca87ac20d853559ff948a95" + }, + "page_should_contain_textfield": { + "name": "page_should_contain_textfield", + "doc": "Verifies text field ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7b7414371c1321271f8616d6668e9b94001ab4443df27f26fe10c5e968be00c5" + }, + "page_should_not_contain_button": { + "name": "page_should_not_contain_button", + "doc": "Verifies button ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, buttons are\n searched using ``id``, ``name``, and ``value``.\n ", + "sha256": "c8b007d236e708e3d637b414d88b333f31bc64f396fe9034bc79be14288666ed" + }, + "page_should_not_contain_checkbox": { + "name": "page_should_not_contain_checkbox", + "doc": "Verifies checkbox ``locator`` is not found from the current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "88204d5dcc80e3fed6bfc74f5b2e02a3507d9ac290faf29c5818f54fc7c7109d" + }, + "page_should_not_contain_radio_button": { + "name": "page_should_not_contain_radio_button", + "doc": "Verifies radio button ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax. When using the default locator strategy, radio buttons are\n searched using ``id``, ``name`` and ``value``.\n ", + "sha256": "f2310d4b57e4303ef5f38cc2cdc705ca95582a56ced04899d806beab1a63cef0" + }, + "page_should_not_contain_textfield": { + "name": "page_should_not_contain_textfield", + "doc": "Verifies text field ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2d91d04a7f6bb6ffd6fb86459718e337880326ddbba3a1631de12737ecab5339" + }, + "radio_button_should_be_set_to": { + "name": "radio_button_should_be_set_to", + "doc": "Verifies radio button group ``group_name`` is set to ``value``.\n\n ``group_name`` is the ``name`` of the radio button group.\n ", + "sha256": "baedeb274f24cfa1951591b65fd654551c128c26db397414fce039f3c2ef68cc" + }, + "radio_button_should_not_be_selected": { + "name": "radio_button_should_not_be_selected", + "doc": "Verifies radio button group ``group_name`` has no selection.\n\n ``group_name`` is the ``name`` of the radio button group.\n ", + "sha256": "552945bd4776a7545990b26941784cf5a8bd5d1725fb1ccd6241d7f4404dea0e" + }, + "select_checkbox": { + "name": "select_checkbox", + "doc": "Selects the checkbox identified by ``locator``.\n\n Does nothing if checkbox is already selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "a864b4289721b7356ee6cc8f51612cdb5b91f5e439a264380665dd3c359cf09a" + }, + "select_radio_button": { + "name": "select_radio_button", + "doc": "Sets the radio button group ``group_name`` to ``value``.\n\n The radio button to be selected is located by two arguments:\n - ``group_name`` is the name of the radio button group.\n - ``value`` is the ``id`` or ``value`` attribute of the actual\n radio button.\n\n Examples:\n | `Select Radio Button` | size | XL |\n | `Select Radio Button` | contact | email |\n ", + "sha256": "ffbddc133ea67fa89fc81c47e311a5c1c0d17de62b307fb25cb0811ebf995909" + }, + "submit_form": { + "name": "submit_form", + "doc": "Submits a form identified by ``locator``.\n\n If ``locator`` is not given, first form on the page is submitted.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "19787cfd196cb398177f114d219b7047839b1b875ad44e4741c02be1f2219fb7" + }, + "textarea_should_contain": { + "name": "textarea_should_contain", + "doc": "Verifies text area ``locator`` contains text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "1f0212530a7318d4b84aab2f76e6a786698c18553eb45f6d7b5ce1526aa8806a" + }, + "textarea_value_should_be": { + "name": "textarea_value_should_be", + "doc": "Verifies text area ``locator`` has exactly text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "351e1fbde625caa68c16d8203c380853b86f12203e2a58fe32fed5154779df55" + }, + "textfield_should_contain": { + "name": "textfield_should_contain", + "doc": "Verifies text field ``locator`` contains text ``expected``.\n\n ``message`` can be used to override the default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "8d542b446cce4ae3a59f57d2492144fa0264dc10bcc29a7a75e210368e7b24a9" + }, + "textfield_value_should_be": { + "name": "textfield_value_should_be", + "doc": "Verifies text field ``locator`` has exactly text ``expected``.\n\n ``message`` can be used to override default error message.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "bf88210c7d1673f6f28e6a5af94ecca2f23d655f0da09f31557b5d619ca4bb83" + }, + "unselect_checkbox": { + "name": "unselect_checkbox", + "doc": "Removes the selection of checkbox identified by ``locator``.\n\n Does nothing if the checkbox is not selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "73e850a91f88669d5f169f1da487263b966b34b9d5979fa7eacc353b9af6d3ad" + }, + "current_frame_should_contain": { + "name": "current_frame_should_contain", + "doc": "Verifies that the current frame contains ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n\n Prior to SeleniumLibrary 3.0 this keyword was named\n `Current Frame Contains`.\n ", + "sha256": "d42932ad52a7f5a80466c5fc70cde1994b5dc91e42d5a92d5a4c84c5952106bc" + }, + "current_frame_should_not_contain": { + "name": "current_frame_should_not_contain", + "doc": "Verifies that the current frame does not contain ``text``.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "39c919106caf859d8c436e8334ba7dbfbaaadc761810034f9c24433ef930029d" + }, + "frame_should_contain": { + "name": "frame_should_contain", + "doc": "Verifies that frame identified by ``locator`` contains ``text``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "e7cf02e4cd77e7196d87f875db7285146a629fe895b3576c9dbd33ae4ab362fd" + }, + "select_frame": { + "name": "select_frame", + "doc": "Sets frame identified by ``locator`` as the current frame.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Works both with frames and iframes. Use `Unselect Frame` to cancel\n the frame selection and return to the main frame.\n\n Example:\n | `Select Frame` | top-frame | # Select frame with id or name 'top-frame' |\n | `Click Link` | example | # Click link 'example' in the selected frame |\n | `Unselect Frame` | | # Back to main frame. |\n | `Select Frame` | //iframe[@name='xxx'] | # Select frame using xpath |\n ", + "sha256": "c2c67edf46d18644488c6395a750e293ab150011cdcdfe0741481328e01163f6" + }, + "unselect_frame": { + "name": "unselect_frame", + "doc": "Sets the main frame as the current frame.\n\n In practice cancels the previous `Select Frame` call.\n ", + "sha256": "9fc68af60f0d437e37ccc1fccb858b2c6554427f3f269518d4e7f849df3c43ec" + }, + "execute_async_javascript": { + "name": "execute_async_javascript", + "doc": "Executes asynchronous JavaScript code with possible arguments.\n\n Similar to `Execute Javascript` except that scripts executed with\n this keyword must explicitly signal they are finished by invoking the\n provided callback. This callback is always injected into the executed\n function as the last argument.\n\n Scripts must complete within the script timeout or this keyword will\n fail. See the `Timeout` section for more information.\n\n Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_async_script|\n arguments] as part of ``code`` argument. See `Execute Javascript` for\n more details.\n\n Examples:\n | `Execute Async JavaScript` | var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 2000); |\n | `Execute Async JavaScript` | ${CURDIR}/async_js_to_execute.js |\n | ${result} = | `Execute Async JavaScript` |\n | ... | var callback = arguments[arguments.length - 1]; |\n | ... | function answer(){callback(\"text\");}; |\n | ... | window.setTimeout(answer, 2000); |\n | `Should Be Equal` | ${result} | text |\n ", + "sha256": "a67bddb89758620a690da6f26a06985d8a546d32da40a6509296e93dc1f68c51" + }, + "execute_javascript": { + "name": "execute_javascript", + "doc": "Executes the given JavaScript code with possible arguments.\n\n ``code`` may be divided into multiple cells in the test data and\n ``code`` may contain multiple lines of code and arguments. In that case,\n the JavaScript code parts are concatenated together without adding\n spaces and optional arguments are separated from ``code``.\n\n If ``code`` is a path to an existing file, the JavaScript\n to execute will be read from that file. Forward slashes work as\n a path separator on all operating systems.\n\n The JavaScript executes in the context of the currently selected\n frame or window as the body of an anonymous function. Use ``window``\n to refer to the window of your application and ``document`` to refer\n to the document object of the current frame or window, e.g.\n ``document.getElementById('example')``.\n\n This keyword returns whatever the executed JavaScript code returns.\n Return values are converted to the appropriate Python types.\n\n Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_script|\n arguments] as part of ``code`` argument. The JavaScript code and\n arguments must be separated with `JAVASCRIPT` and `ARGUMENTS` markers\n and must be used exactly with this format. If the Javascript code is\n first, then the `JAVASCRIPT` marker is optional. The order of\n `JAVASCRIPT` and `ARGUMENTS` markers can be swapped, but if `ARGUMENTS`\n is the first marker, then `JAVASCRIPT` marker is mandatory. It is only\n allowed to use `JAVASCRIPT` and `ARGUMENTS` markers only one time in the\n ``code`` argument.\n\n Examples:\n | `Execute JavaScript` | window.myFunc('arg1', 'arg2') |\n | `Execute JavaScript` | ${CURDIR}/js_to_execute.js |\n | `Execute JavaScript` | alert(arguments[0]); | ARGUMENTS | 123 |\n | `Execute JavaScript` | ARGUMENTS | 123 | JAVASCRIPT | alert(arguments[0]); |\n ", + "sha256": "5037e85a542b11eebcf4a3fd0b9eae560f17cd117b7fdfc9c7148c9091b44cc4" + }, + "register_keyword_to_run_on_failure": { + "name": "register_keyword_to_run_on_failure", + "doc": "Sets the keyword to execute, when a SeleniumLibrary keyword fails.\n\n ``keyword`` is the name of a keyword that will be executed if a\n SeleniumLibrary keyword fails. It is possible to use any available\n keyword, including user keywords or keywords from other libraries,\n but the keyword must not take any arguments.\n\n The initial keyword to use is set when `importing` the library, and\n the keyword that is used by default is `Capture Page Screenshot`.\n Taking a screenshot when something failed is a very useful\n feature, but notice that it can slow down the execution.\n\n It is possible to use string ``NOTHING`` or ``NONE``,\n case-insensitively, as well as Python ``None`` to disable this\n feature altogether.\n\n This keyword returns the name of the previously registered\n failure keyword or Python ``None`` if this functionality was\n previously disabled. The return value can be always used to\n restore the original value later.\n\n Example:\n | `Register Keyword To Run On Failure` | Log Source |\n | ${previous kw}= | `Register Keyword To Run On Failure` | NONE |\n | `Register Keyword To Run On Failure` | ${previous kw} |\n\n Changes in SeleniumLibrary 3.0:\n - Possible to use string ``NONE`` or Python ``None`` to disable the\n functionality.\n - Return Python ``None`` when the functionality was disabled earlier.\n In previous versions special value ``No Keyword`` was returned and\n it could not be used to restore the original state.\n ", + "sha256": "9eaadf25a89adfb670897301330147203808d9cec135d82015215fe7a14c7313" + }, + "capture_element_screenshot": { + "name": "capture_element_screenshot", + "doc": "Captures a screenshot from the element identified by ``locator`` and embeds it into log file.\n\n See `Capture Page Screenshot` for details about ``filename`` argument.\n See the `Locating elements` section for details about the locator\n syntax.\n\n An absolute path to the created element screenshot is returned.\n\n Support for capturing the screenshot from an element has limited support\n among browser vendors. Please check the browser vendor driver documentation\n does the browser support capturing a screenshot from an element.\n\n New in SeleniumLibrary 3.3. Support for EMBED is new in SeleniumLibrary 4.2.\n\n Examples:\n | `Capture Element Screenshot` | id:image_id | |\n | `Capture Element Screenshot` | id:image_id | ${OUTPUTDIR}/id_image_id-1.png |\n | `Capture Element Screenshot` | id:image_id | EMBED |\n ", + "sha256": "a5dabc5a6525bca9796834b47e1fff61557439b12dd78240701233af0b95c73f" + }, + "capture_page_screenshot": { + "name": "capture_page_screenshot", + "doc": "Takes a screenshot of the current page and embeds it into a log file.\n\n ``filename`` argument specifies the name of the file to write the\n screenshot into. The directory where screenshots are saved can be\n set when `importing` the library or by using the `Set Screenshot\n Directory` keyword. If the directory is not configured, screenshots\n are saved to the same directory where Robot Framework's log file is\n written.\n\n If ``filename`` equals to EMBED (case insensitive), then screenshot\n is embedded as Base64 image to the log.html. In this case file is not\n created in the filesystem.\n\n Starting from SeleniumLibrary 1.8, if ``filename`` contains marker\n ``{index}``, it will be automatically replaced with an unique running\n index, preventing files to be overwritten. Indices start from 1,\n and how they are represented can be customized using Python's\n [https://docs.python.org/3/library/string.html#format-string-syntax|\n format string syntax].\n\n An absolute path to the created screenshot file is returned or if\n ``filename`` equals to EMBED, word `EMBED` is returned.\n\n Support for EMBED is new in SeleniumLibrary 4.2\n\n Examples:\n | `Capture Page Screenshot` | |\n | `File Should Exist` | ${OUTPUTDIR}/selenium-screenshot-1.png |\n | ${path} = | `Capture Page Screenshot` |\n | `File Should Exist` | ${OUTPUTDIR}/selenium-screenshot-2.png |\n | `File Should Exist` | ${path} |\n | `Capture Page Screenshot` | custom_name.png |\n | `File Should Exist` | ${OUTPUTDIR}/custom_name.png |\n | `Capture Page Screenshot` | custom_with_index_{index}.png |\n | `File Should Exist` | ${OUTPUTDIR}/custom_with_index_1.png |\n | `Capture Page Screenshot` | formatted_index_{index:03}.png |\n | `File Should Exist` | ${OUTPUTDIR}/formatted_index_001.png |\n | `Capture Page Screenshot` | EMBED |\n | `File Should Not Exist` | EMBED |\n ", + "sha256": "271132ea5ad25ba3e6182db7560e7eaf512df0bae8f437f756419b9611a4bebe" + }, + "set_screenshot_directory": { + "name": "set_screenshot_directory", + "doc": "Sets the directory for captured screenshots.\n\n ``path`` argument specifies the absolute path to a directory where\n the screenshots should be written to. If the directory does not\n exist, it will be created. The directory can also be set when\n `importing` the library. If it is not configured anywhere,\n screenshots are saved to the same directory where Robot Framework's\n log file is written.\n\n If ``path`` equals to EMBED (case insensitive) and\n `Capture Page Screenshot` or `capture Element Screenshot` keywords\n filename argument is not changed from the default value, then\n the page or element screenshot is embedded as Base64 image to\n the log.html.\n\n The previous value is returned and can be used to restore\n the original value later if needed.\n\n Returning the previous value is new in SeleniumLibrary 3.0.\n The persist argument was removed in SeleniumLibrary 3.2 and\n EMBED is new in SeleniumLibrary 4.2.\n ", + "sha256": "c8241dd4f1113b3db620de1f45f2390c227b081400b04e0178561dde2c38748e" + }, + "get_list_items": { + "name": "get_list_items", + "doc": "Returns all labels or values of selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Returns visible labels by default, but values can be returned by\n setting the ``values`` argument to a true value (see `Boolean\n arguments`).\n\n Example:\n | ${labels} = | `Get List Items` | mylist | |\n | ${values} = | `Get List Items` | css:#example select | values=True |\n\n Support to return values is new in SeleniumLibrary 3.0.\n ", + "sha256": "60f7293239f288f08276b8fa63d98a6be52ff42a0627b9b0da14ba6dab51bd94" + }, + "get_selected_list_label": { + "name": "get_selected_list_label", + "doc": "Returns the label of selected option from selection list ``locator``.\n\n If there are multiple selected options, the label of the first option\n is returned.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "f9281509d3c4ac39f4b98d9d9d4f0f2dd6b579c37204b33ec7d47b6bef999672" + }, + "get_selected_list_labels": { + "name": "get_selected_list_labels", + "doc": "Returns labels of selected options from selection list ``locator``.\n\n Starting from SeleniumLibrary 3.0, returns an empty list if there\n are no selections. In earlier versions, this caused an error.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "e3bf2c1db04dbb52c99c7397065da52699bb4b7bdc5ceaeb45d525e8176acb48" + }, + "get_selected_list_value": { + "name": "get_selected_list_value", + "doc": "Returns the value of selected option from selection list ``locator``.\n\n If there are multiple selected options, the value of the first option\n is returned.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2b935dd4627ca62d92a311569036b2978032aa67e542f5b7ef91a514f01f323d" + }, + "get_selected_list_values": { + "name": "get_selected_list_values", + "doc": "Returns values of selected options from selection list ``locator``.\n\n Starting from SeleniumLibrary 3.0, returns an empty list if there\n are no selections. In earlier versions, this caused an error.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "83b79c56056a6d51529e36a093ba14ec0b805a96bdb9e6870214eb4de987bea6" + }, + "list_selection_should_be": { + "name": "list_selection_should_be", + "doc": "Verifies selection list ``locator`` has ``expected`` options selected.\n\n It is possible to give expected options both as visible labels and\n as values. Starting from SeleniumLibrary 3.0, mixing labels and\n values is not possible. Order of the selected options is not\n validated.\n\n If no expected options are given, validates that the list has\n no selections. A more explicit alternative is using `List Should\n Have No Selections`.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n Examples:\n | `List Selection Should Be` | gender | Female | |\n | `List Selection Should Be` | interests | Test Automation | Python |\n ", + "sha256": "1d70ccc8a2dc868e265fc29e9cbc2317799eb12d0dd3f21d61fa4ffea7a7e4c2" + }, + "list_should_have_no_selections": { + "name": "list_should_have_no_selections", + "doc": "Verifies selection list ``locator`` has no options selected.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "429fc50c47319d8267bc5c2306a7d1d191a124d457a6f6655bb4ff5d64d71def" + }, + "page_should_contain_list": { + "name": "page_should_contain_list", + "doc": "Verifies selection list ``locator`` is found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "9ad2d87bd51bee3365d5ca32153adae2ea4b137f916f07fc39416a54aa117bf6" + }, + "page_should_not_contain_list": { + "name": "page_should_not_contain_list", + "doc": "Verifies selection list ``locator`` is not found from current page.\n\n See `Page Should Contain Element` for an explanation about ``message``\n and ``loglevel`` arguments.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "2f2e58b399f73b2ab4dc795368b0b18b9a63c37e2764de722d897039d6e7881c" + }, + "select_all_from_list": { + "name": "select_all_from_list", + "doc": "Selects all options from multi-selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7113bdf3faec639e3bdb3b1beb09c526dec522a0181ae11fd94398fdfb3f6fd2" + }, + "select_from_list_by_index": { + "name": "select_from_list_by_index", + "doc": "Selects options from selection list ``locator`` by ``indexes``.\n\n Indexes of list options start from 0.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "220f77e512662cfff307efa29f5b46dba2e0d1b04760707cface96f63ff87e7c" + }, + "select_from_list_by_label": { + "name": "select_from_list_by_label", + "doc": "Selects options from selection list ``locator`` by ``labels``.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "12c2af99cb8c78b6edd06ee17d902a575d1a2a4932d21bb67b040233a5a80318" + }, + "select_from_list_by_value": { + "name": "select_from_list_by_value", + "doc": "Selects options from selection list ``locator`` by ``values``.\n\n If more than one option is given for a single-selection list,\n the last value will be selected. With multi-selection lists all\n specified options are selected, but possible old selections are\n not cleared.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "9989cd962aeddb746a6ac8c632023bb9fbbe1ae832ae618635fb1c072049d7ab" + }, + "unselect_all_from_list": { + "name": "unselect_all_from_list", + "doc": "Unselects all options from multi-selection list ``locator``.\n\n See the `Locating elements` section for details about the locator\n syntax.\n\n New in SeleniumLibrary 3.0.\n ", + "sha256": "e273c674b217707452b897e66ccfa2ff12ef2279198364b4f95350b0cc557c4c" + }, + "unselect_from_list_by_index": { + "name": "unselect_from_list_by_index", + "doc": "Unselects options from selection list ``locator`` by ``indexes``.\n\n Indexes of list options start from 0. This keyword works only with\n multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "5aac4cc2fa0bec90621d29b2eac7064d18510c447b7357d8eb5948d2cd459cef" + }, + "unselect_from_list_by_label": { + "name": "unselect_from_list_by_label", + "doc": "Unselects options from selection list ``locator`` by ``labels``.\n\n This keyword works only with multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "3dfe87450d9a1a8cad3f8cad3e159b8bd4c3e25f25f91dd747aeb23403b18ab5" + }, + "unselect_from_list_by_value": { + "name": "unselect_from_list_by_value", + "doc": "Unselects options from selection list ``locator`` by ``values``.\n\n This keyword works only with multi-selection lists.\n\n See the `Locating elements` section for details about the locator\n syntax.\n ", + "sha256": "7ee06a01319ea95e02d4ba34cfbc0d845cf5dbaf58244d93338760609a67ec02" + }, + "get_table_cell": { + "name": "get_table_cell", + "doc": "Returns contents of a table cell.\n\n The table is located using the ``locator`` argument and its cell\n found using ``row`` and ``column``. See the `Locating elements`\n section for details about the locator syntax.\n\n Both row and column indexes start from 1, and header and footer\n rows are included in the count. It is possible to refer to rows\n and columns from the end by using negative indexes so that -1\n is the last row/column, -2 is the second last, and so on.\n\n All ```` and ```` elements anywhere in the table are\n considered to be cells.\n\n See `Page Should Contain` for an explanation about the ``loglevel``\n argument.\n ", + "sha256": "616f2d925fbd431f1cdde9427ff865b4f402806b2f15b99dfd033a96e0d0a42e" + }, + "table_cell_should_contain": { + "name": "table_cell_should_contain", + "doc": "Verifies table cell contains text ``expected``.\n\n See `Get Table Cell` that this keyword uses internally for\n an explanation about accepted arguments.\n ", + "sha256": "628c09aa35b649beda7c500e914fa906cf91f9eb30afad19973809784ee1f8d6" + }, + "table_column_should_contain": { + "name": "table_column_should_contain", + "doc": "Verifies table column contains text ``expected``.\n\n The table is located using the ``locator`` argument and its column\n found using ``column``. See the `Locating elements` section for\n details about the locator syntax.\n\n Column indexes start from 1. It is possible to refer to columns\n from the end by using negative indexes so that -1 is the last column,\n -2 is the second last, and so on.\n\n If a table contains cells that span multiple columns, those merged\n cells count as a single column.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "e0f898ce00b22cd66e2f4c5ab1cdcbea733f294d53bc210ec33667dfcd1963de" + }, + "table_footer_should_contain": { + "name": "table_footer_should_contain", + "doc": "Verifies table footer contains text ``expected``.\n\n Any ```` element inside ```` element is considered to\n be part of the footer.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "454fb3be070acb378460038572ed4268de8b18b96b3aaa903d3a1f0093147691" + }, + "table_header_should_contain": { + "name": "table_header_should_contain", + "doc": "Verifies table header contains text ``expected``.\n\n Any ```` element anywhere in the table is considered to be\n part of the header.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "66208e9741c9d18d1c09645bfcb9b54b4ffe2c104e5402c86f2cf54feb02de79" + }, + "table_row_should_contain": { + "name": "table_row_should_contain", + "doc": "Verifies that table row contains text ``expected``.\n\n The table is located using the ``locator`` argument and its column\n found using ``column``. See the `Locating elements` section for\n details about the locator syntax.\n\n Row indexes start from 1. It is possible to refer to rows\n from the end by using negative indexes so that -1 is the last row,\n -2 is the second last, and so on.\n\n If a table contains cells that span multiple rows, a match\n only occurs for the uppermost row of those merged cells.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "2ad4f79443748abaa86e768fb0994f32a2d1386c435688727093fb0c1034d23f" + }, + "table_should_contain": { + "name": "table_should_contain", + "doc": "Verifies table contains text ``expected``.\n\n The table is located using the ``locator`` argument. See the\n `Locating elements` section for details about the locator syntax.\n\n See `Page Should Contain Element` for an explanation about the\n ``loglevel`` argument.\n ", + "sha256": "ea4dc362f588ab33332b985ea6ff059499de1e4c25bdbfceb6e6517cd36b24fc" + }, + "wait_for_condition": { + "name": "wait_for_condition", + "doc": "Waits until ``condition`` is true or ``timeout`` expires.\n\n The condition can be arbitrary JavaScript expression but it\n must return a value to be evaluated. See `Execute JavaScript` for\n information about accessing content on pages.\n\n Fails if the timeout expires before the condition becomes true. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n\n Examples:\n | `Wait For Condition` | return document.title == \"New Title\" |\n | `Wait For Condition` | return jQuery.active == 0 |\n | `Wait For Condition` | style = document.querySelector('h1').style; return style.background == \"red\" && style.color == \"white\" |\n ", + "sha256": "4998ab3cee46a578df2b064d390401d2ec0268454607ef194db5c0d3d73c81db" + }, + "wait_until_element_contains": { + "name": "wait_until_element_contains", + "doc": "Waits until the element ``locator`` contains ``text``.\n\n Fails if ``timeout`` expires before the text appears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "982c68220bb622a3d985c04b39ea3bc11b20437e73bcf8e38d51ed7e2032852c" + }, + "wait_until_element_does_not_contain": { + "name": "wait_until_element_does_not_contain", + "doc": "Waits until the element ``locator`` does not contain ``text``.\n\n Fails if ``timeout`` expires before the text disappears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "a2b8bc5ee7de21f06e79317935026beddee2105ae645c22b322446dd5a8be0ad" + }, + "wait_until_element_is_enabled": { + "name": "wait_until_element_is_enabled", + "doc": "Waits until the element ``locator`` is enabled.\n\n Element is considered enabled if it is not disabled nor read-only.\n\n Fails if ``timeout`` expires before the element is enabled. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n Considering read-only elements to be disabled is a new feature\n in SeleniumLibrary 3.0.\n ", + "sha256": "6202e0635b377e2e7d5eaa091eb6a582b64bc49f9d5edf6ddeb7754723015543" + }, + "wait_until_element_is_not_visible": { + "name": "wait_until_element_is_not_visible", + "doc": "Waits until the element ``locator`` is not visible.\n\n Fails if ``timeout`` expires before the element is not visible. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "e112e160d739b0cd0f8730703738cc0692e1c0d57e42308b6d50206db23e6d52" + }, + "wait_until_element_is_visible": { + "name": "wait_until_element_is_visible", + "doc": "Waits until the element ``locator`` is visible.\n\n Fails if ``timeout`` expires before the element is visible. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "90878c583a727db5da943e7f532efa4e73c59a525a0107233fd59740bb9dd116" + }, + "wait_until_location_contains": { + "name": "wait_until_location_contains", + "doc": "Waits until the current URL contains ``expected``.\n\n The ``expected`` argument contains the expected value in url.\n\n Fails if ``timeout`` expires before the location contains. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "33b91c79fe956c37284bccdb56d318e679ec774ca1565db5e2140250b6b46fb5" + }, + "wait_until_location_does_not_contain": { + "name": "wait_until_location_does_not_contain", + "doc": "Waits until the current URL does not contains ``location``.\n\n The ``location`` argument contains value not expected in url.\n\n Fails if ``timeout`` expires before the location not contains. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.3\n ", + "sha256": "5ea0b9da22370c90d509d3e4a8aad47b69652b2bd0ce5b29a9264508d4bea432" + }, + "wait_until_location_is": { + "name": "wait_until_location_is", + "doc": "Waits until the current URL is ``expected``.\n\n The ``expected`` argument is the expected value in url.\n\n Fails if ``timeout`` expires before the location is. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.0\n ", + "sha256": "2a0604e9e096908cda4caef1486d56310d6f10d0d974804c96a32a0492eb1f82" + }, + "wait_until_location_is_not": { + "name": "wait_until_location_is_not", + "doc": "Waits until the current URL is not ``location``.\n\n The ``location`` argument is the unexpected value in url.\n\n Fails if ``timeout`` expires before the location is not. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n The ``message`` argument can be used to override the default error\n message.\n\n New in SeleniumLibrary 4.3\n ", + "sha256": "96f19cceb6f263cde977b3dfd4b90d06691a1533ebef77c9c5ef1f0e0925e228" + }, + "wait_until_page_contains": { + "name": "wait_until_page_contains", + "doc": "Waits until ``text`` appears on the current page.\n\n Fails if ``timeout`` expires before the text appears. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "2e6b9f7e424ed5ba676c82ce9b6ae964050a5fb7b47baa35a3f94125107d9e57" + }, + "wait_until_page_contains_element": { + "name": "wait_until_page_contains_element", + "doc": "Waits until the element ``locator`` appears on the current page.\n\n Fails if ``timeout`` expires before the element appears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n The ``limit`` argument can used to define how many elements the\n page should contain. When ``limit`` is `None` (default) page can\n contain one or more elements. When limit is a number, page must\n contain same number of elements.\n\n ``limit`` is new in SeleniumLibrary 4.4\n ", + "sha256": "712da49e8aff630cb2843522331935693ce334aea9ccb2aacb6c015af9c921b5" + }, + "wait_until_page_does_not_contain": { + "name": "wait_until_page_does_not_contain", + "doc": "Waits until ``text`` disappears from the current page.\n\n Fails if ``timeout`` expires before the text disappears. See\n the `Timeouts` section for more information about using timeouts\n and their default value.\n\n ``error`` can be used to override the default error message.\n ", + "sha256": "96c2f8840c677afdb9f207107bf3f7bbdfb9d1b56e3ce887cf34a88e3e273974" + }, + "wait_until_page_does_not_contain_element": { + "name": "wait_until_page_does_not_contain_element", + "doc": "Waits until the element ``locator`` disappears from the current page.\n\n Fails if ``timeout`` expires before the element disappears. See\n the `Timeouts` section for more information about using timeouts and\n their default value and the `Locating elements` section for details\n about the locator syntax.\n\n ``error`` can be used to override the default error message.\n\n The ``limit`` argument can used to define how many elements the\n page should not contain. When ``limit`` is `None` (default) page can`t\n contain any elements. When limit is a number, page must not\n contain same number of elements.\n\n ``limit`` is new in SeleniumLibrary 4.4\n ", + "sha256": "081d0393a8d8f100d9db65f81170222f4a6678fcc2703a3e123c907ef5ade430" + }, + "close_window": { + "name": "close_window", + "doc": "Closes currently opened and selected browser window/tab. ", + "sha256": "8d00f3bcf62126a5fcc61ca14d62631ad918c2993ee9e8f2641cb57595b591bb" + }, + "get_locations": { + "name": "get_locations", + "doc": "Returns and logs URLs of all windows of the selected browser.\n\n *Browser Scope:*\n\n The ``browser`` argument specifies the browser that shall return\n its windows information.\n\n - ``browser`` can be ``index_or_alias`` like in `Switch Browser`.\n\n - If ``browser`` is ``CURRENT`` (default, case-insensitive)\n the currently active browser is selected.\n\n - If ``browser`` is ``ALL`` (case-insensitive)\n the window information of all windows of all opened browsers are returned.", + "sha256": "3e73811fa673371891cffa16aa99f24fa6dbc87ff826d0d84be6d54fc937163c" + }, + "get_window_handles": { + "name": "get_window_handles", + "doc": "Returns all child window handles of the selected browser as a list.\n\n Can be used as a list of windows to exclude with `Select Window`.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.\n\n Prior to SeleniumLibrary 3.0, this keyword was named `List Windows`.\n ", + "sha256": "b051b51a36766e2a3c748a2ecbb76ed6516a20cec807a38d29a96f95c5ea7efa" + }, + "get_window_identifiers": { + "name": "get_window_identifiers", + "doc": "Returns and logs id attributes of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "9342df3471d9923e299c60511d11006762b1797802153c97ac0451adcdd5e0bf" + }, + "get_window_names": { + "name": "get_window_names", + "doc": "Returns and logs names of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "557778bcbb2b4be2e575416f5422c8077397f2e7d7614e3b064fe3f222bf3225" + }, + "get_window_position": { + "name": "get_window_position", + "doc": "Returns current window position.\n\n The position is relative to the top left corner of the screen. Returned\n values are integers. See also `Set Window Position`.\n\n Example:\n | ${x} | ${y}= | `Get Window Position` |\n ", + "sha256": "c9f1ab8ee31517bc91a6ae9f3dd3782c695f0c3c64adf1639fc3e34ea85e7d9c" + }, + "get_window_size": { + "name": "get_window_size", + "doc": "Returns current window width and height as integers.\n\n See also `Set Window Size`.\n\n If ``inner`` parameter is set to True, keyword returns\n HTML DOM window.innerWidth and window.innerHeight properties.\n See `Boolean arguments` for more details on how to set boolean\n arguments. The ``inner`` is new in SeleniumLibrary 4.0.\n\n Example:\n | ${width} | ${height}= | `Get Window Size` | |\n | ${width} | ${height}= | `Get Window Size` | True |\n ", + "sha256": "d9fc8a6bc4dd38749c761722027b783dfd74ff3c69d16ad3e4ceceb162f2ed64" + }, + "get_window_titles": { + "name": "get_window_titles", + "doc": "Returns and logs titles of all windows of the selected browser.\n\n How to select the ``browser`` scope of this keyword, see `Get Locations`.", + "sha256": "7b2a62a9e808f584ec9674faae954855135aec5ac168ec0b929b11ac73f7fcec" + }, + "maximize_browser_window": { + "name": "maximize_browser_window", + "doc": "Maximizes current browser window.", + "sha256": "de016b8b98dc0a25f624060424c8ae449cc680990baf8789da09181b2643d77b" + }, + "minimize_browser_window": { + "name": "minimize_browser_window", + "doc": "Minimizes current browser window.", + "sha256": "6a99ddaa41cde69ae82c33df6d43976d9ad76a358be5d4e35f065895e94e95db" + }, + "set_window_position": { + "name": "set_window_position", + "doc": "Sets window position using ``x`` and ``y`` coordinates.\n\n The position is relative to the top left corner of the screen,\n but some browsers exclude possible task bar set by the operating\n system from the calculation. The actual position may thus be\n different with different browsers.\n\n Values can be given using strings containing numbers or by using\n actual numbers. See also `Get Window Position`.\n\n Example:\n | `Set Window Position` | 100 | 200 |\n ", + "sha256": "d9c3d6dc138cd350941a1660e5601dbc4441ee6c0a7df08902c76dd15953017c" + }, + "set_window_size": { + "name": "set_window_size", + "doc": "Sets current windows size to given ``width`` and ``height``.\n\n Values can be given using strings containing numbers or by using\n actual numbers. See also `Get Window Size`.\n\n Browsers have a limit on their minimum size. Trying to set them\n smaller will cause the actual size to be bigger than the requested\n size.\n\n If ``inner`` parameter is set to True, keyword sets the necessary\n window width and height to have the desired HTML DOM _window.innerWidth_\n and _window.innerHeight_. See `Boolean arguments` for more details on how to set boolean\n arguments.\n\n The ``inner`` argument is new since SeleniumLibrary 4.0.\n\n This ``inner`` argument does not support Frames. If a frame is selected,\n switch to default before running this.\n\n Example:\n | `Set Window Size` | 800 | 600 | |\n | `Set Window Size` | 800 | 600 | True |\n ", + "sha256": "31b5febddcb935b20320728accc28a892b8a0956301646827aa8c7c74e1cdfec" + }, + "switch_window": { + "name": "switch_window", + "doc": "Switches to browser window matching ``locator``.\n\n If the window is found, all subsequent commands use the selected\n window, until this keyword is used again. If the window is not\n found, this keyword fails. The previous windows handle is returned\n and can be used to switch back to it later.\n\n Notice that alerts should be handled with\n `Handle Alert` or other alert related keywords.\n\n The ``locator`` can be specified using different strategies somewhat\n similarly as when `locating elements` on pages.\n\n - By default, the ``locator`` is matched against window handle, name,\n title, and URL. Matching is done in that order and the first\n matching window is selected.\n\n - The ``locator`` can specify an explicit strategy by using the format\n ``strategy:value`` (recommended) or ``strategy=value``. Supported\n strategies are ``name``, ``title``, and ``url``. These matches windows\n using their name, title, or URL, respectively. Additionally, ``default``\n can be used to explicitly use the default strategy explained above.\n\n - If the ``locator`` is ``NEW`` (case-insensitive), the latest\n opened window is selected. It is an error if this is the same\n as the current window.\n\n - If the ``locator`` is ``MAIN`` (default, case-insensitive),\n the main window is selected.\n\n - If the ``locator`` is ``CURRENT`` (case-insensitive), nothing is\n done. This effectively just returns the current window handle.\n\n - If the ``locator`` is not a string, it is expected to be a list\n of window handles _to exclude_. Such a list of excluded windows\n can be got from `Get Window Handles` before doing an action that\n opens a new window.\n\n The ``timeout`` is used to specify how long keyword will poll to select\n the new window. The ``timeout`` is new in SeleniumLibrary 3.2.\n\n Example:\n | `Click Link` | popup1 | | # Open new window |\n | `Switch Window` | example | | # Select window using default strategy |\n | `Title Should Be` | Pop-up 1 | |\n | `Click Button` | popup2 | | # Open another window |\n | ${handle} = | `Switch Window` | NEW | # Select latest opened window |\n | `Title Should Be` | Pop-up 2 | |\n | `Switch Window` | ${handle} | | # Select window using handle |\n | `Title Should Be` | Pop-up 1 | |\n | `Switch Window` | MAIN | | # Select the main window |\n | `Title Should Be` | Main | |\n | ${excludes} = | `Get Window Handles` | | # Get list of current windows |\n | `Click Link` | popup3 | | # Open one more window |\n | `Switch Window` | ${excludes} | | # Select window using excludes |\n | `Title Should Be` | Pop-up 3 | |\n\n The ``browser`` argument allows with ``index_or_alias`` to implicitly switch to\n a specific browser when switching to a window. See `Switch Browser`\n\n - If the ``browser`` is ``CURRENT`` (case-insensitive), no other browser is\n selected.\n\n *NOTE:*\n\n - The ``strategy:value`` syntax is only supported by SeleniumLibrary\n 3.0 and newer.\n - Prior to SeleniumLibrary 3.0 matching windows by name, title\n and URL was case-insensitive.\n - Earlier versions supported aliases ``None``, ``null`` and the\n empty string for selecting the main window, and alias ``self``\n for selecting the current window. Support for these aliases was\n removed in SeleniumLibrary 3.2.\n ", + "sha256": "2ae583a5179810f31a4f7ae665918443d1f068c53e255c552b51bd1f5205c608" + }, + "__init__": { + "name": "__init__", + "doc": "2 SeleniumLibrary is a web testing library for Robot Framework.\n\nThis document explains how to use keywords provided by SeleniumLibrary.\nFor information about installation, support, and more, please visit the\n[https://github.com/robotframework/SeleniumLibrary|project pages].\nFor more information about Robot Framework, see http://robotframework.org.\n\nSeleniumLibrary uses the Selenium WebDriver modules internally to\ncontrol a web browser. See http://seleniumhq.org for more information\nabout Selenium in general and SeleniumLibrary README.rst\n[https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter]\nfor more details about WebDriver binary installation.\n\n%TOC%\n\n= Locating elements =\n\nAll keywords in SeleniumLibrary that need to interact with an element\non a web page take an argument typically named ``locator`` that specifies\nhow to find the element. Most often the locator is given as a string\nusing the locator syntax described below, but `using WebElements` is\npossible too.\n\n== Locator syntax ==\n\nSeleniumLibrary supports finding elements based on different strategies\nsuch as the element id, XPath expressions, or CSS selectors. The strategy\ncan either be explicitly specified with a prefix or the strategy can be\nimplicit.\n\n=== Default locator strategy ===\n\nBy default, locators are considered to use the keyword specific default\nlocator strategy. All keywords support finding elements based on ``id``\nand ``name`` attributes, but some keywords support additional attributes\nor other values that make sense in their context. For example, `Click\nLink` supports the ``href`` attribute and the link text and addition\nto the normal ``id`` and ``name``.\n\nExamples:\n\n| `Click Element` | example | # Match based on ``id`` or ``name``. |\n| `Click Link` | example | # Match also based on link text and ``href``. |\n| `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. |\n\nIf a locator accidentally starts with a prefix recognized as `explicit\nlocator strategy` or `implicit XPath strategy`, it is possible to use\nthe explicit ``default`` prefix to enable the default strategy.\n\nExamples:\n\n| `Click Element` | name:foo | # Find element with name ``foo``. |\n| `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. |\n| `Click Element` | //foo | # Find element using XPath ``//foo``. |\n| `Click Element` | default: //foo | # Use default strategy with value ``//foo``. |\n\n=== Explicit locator strategy ===\n\nThe explicit locator strategy is specified with a prefix using either\nsyntax ``strategy:value`` or ``strategy=value``. The former syntax\nis preferred because the latter is identical to Robot Framework's\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax|\nnamed argument syntax] and that can cause problems. Spaces around\nthe separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo``\nare all equivalent.\n\nLocator strategies that are supported by default are listed in the table\nbelow. In addition to them, it is possible to register `custom locators`.\n\n| = Strategy = | = Match based on = | = Example = |\n| id | Element ``id``. | ``id:example`` |\n| name | ``name`` attribute. | ``name:example`` |\n| identifier | Either ``id`` or ``name``. | ``identifier:example`` |\n| class | Element ``class``. | ``class:example`` |\n| tag | Tag name. | ``tag:div`` |\n| xpath | XPath expression. | ``xpath://div[@id=\"example\"]`` |\n| css | CSS selector. | ``css:div#example`` |\n| dom | DOM expression. | ``dom:document.images[5]`` |\n| link | Exact text a link has. | ``link:The example`` |\n| partial link | Partial link text. | ``partial link:he ex`` |\n| sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` |\n| data | Element ``data-*`` attribute | ``data:id:my_id`` |\n| jquery | jQuery expression. | ``jquery:div.example`` |\n| default | Keyword specific default behavior. | ``default:example`` |\n\nSee the `Default locator strategy` section below for more information\nabout how the default strategy works. Using the explicit ``default``\nprefix is only necessary if the locator value itself accidentally\nmatches some of the explicit strategies.\n\nDifferent locator strategies have different pros and cons. Using ids,\neither explicitly like ``id:foo`` or by using the `default locator\nstrategy` simply like ``foo``, is recommended when possible, because\nthe syntax is simple and locating elements by id is fast for browsers.\nIf an element does not have an id or the id is not stable, other\nsolutions need to be used. If an element has a unique tag name or class,\nusing ``tag``, ``class`` or ``css`` strategy like ``tag:h1``,\n``class:example`` or ``css:h1.example`` is often an easy solution. In\nmore complex cases using XPath expressions is typically the best\napproach. They are very powerful but a downside is that they can also\nget complex.\n\nExamples:\n\n| `Click Element` | id:foo | # Element with id 'foo'. |\n| `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. |\n| `Click Element` | xpath: //div[@id=\"foo\"]//h1 | # Same as the above using XPath, not CSS. |\n| `Click Element` | xpath: //*[contains(text(), \"example\")] | # Element containing text 'example'. |\n\n*NOTE:*\n\n- The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0\n and newer.\n- Using the ``sizzle`` strategy or its alias ``jquery`` requires that\n the system under test contains the jQuery library.\n- Prior to SeleniumLibrary 3.0, table related keywords only supported\n ``xpath``, ``css`` and ``sizzle/jquery`` strategies.\n- ``data`` strategy is conveniance locator that will construct xpath from the parameters.\n If you have element like `
`, you locate the element via\n ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0\n\n=== Implicit XPath strategy ===\n\nIf the locator starts with ``//`` or multiple opening parenthesis in front\nof the ``//``, the locator is considered to be an XPath expression. In other\nwords, using ``//div`` is equivalent to using explicit ``xpath://div`` and\n``((//div))`` is equivalent to using explicit ``xpath:((//div))``\n\nExamples:\n\n| `Click Element` | //div[@id=\"foo\"]//h1 |\n| `Click Element` | (//div)[2] |\n\nThe support for the ``(//`` prefix is new in SeleniumLibrary 3.0.\nSupporting multiple opening parenthesis is new in SeleniumLibrary 5.0.\n\n=== Chaining locators ===\n\nIt is possible chain multiple locators together as single locator. Each chained locator must start with locator\nstrategy. Chained locators must be separated with single space, two greater than characters and followed with\nspace. It is also possible mix different locator strategies, example css or xpath. Also a list can also be\nused to specify multiple locators. This is useful, is some part of locator would match as the locator separator\nbut it should not. Or if there is need to existing WebElement as locator.\n\nAlthough all locators support chaining, some locator strategies do not abey the chaining. This is because\nsome locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context\nand not for the element found be the previous locator. Chaining is supported by locator strategies which\nare based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery\n\nExamples:\n| `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class \"bar\" |\n\nList examples:\n| ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), \" >> \"] |\n| `Page Should Contain Element` | ${locator_list} | | |\n| ${element} = | Get WebElement | xpath://*[text(), \" >> \"] | |\n| ${locator_list} = | `Create List` | css:div#div_id | ${element} |\n| `Page Should Contain Element` | ${locator_list} | | |\n\nChaining locators in new in SeleniumLibrary 5.0\n\n== Using WebElements ==\n\nIn addition to specifying a locator as a string, it is possible to use\nSelenium's WebElement objects. This requires first getting a WebElement,\nfor example, by using the `Get WebElement` keyword.\n\n| ${elem} = | `Get WebElement` | id:example |\n| `Click Element` | ${elem} | |\n\n== Custom locators ==\n\nIf more complex lookups are required than what is provided through the\ndefault locators, custom lookup strategies can be created. Using custom\nlocators is a two part process. First, create a keyword that returns\na WebElement that should be acted on:\n\n| Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} |\n| | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); |\n| | [Return] | ${element} |\n\nThis keyword is a reimplementation of the basic functionality of the\n``id`` locator where ``${browser}`` is a reference to a WebDriver\ninstance and ``${locator}`` is the name of the locator strategy. To use\nthis locator, it must first be registered by using the\n`Add Location Strategy` keyword:\n\n| `Add Location Strategy` | custom | Custom Locator Strategy |\n\nThe first argument of `Add Location Strategy` specifies the name of\nthe strategy and it must be unique. After registering the strategy,\nthe usage is the same as with other locators:\n\n| `Click Element` | custom:example |\n\nSee the `Add Location Strategy` keyword for more details.\n\n= Browser and Window =\n\nThere is different conceptual meaning when SeleniumLibrary talks\nabout windows or browsers. This chapter explains those differences.\n\n== Browser ==\n\nWhen `Open Browser` or `Create WebDriver` keyword is called, it\nwill create a new Selenium WebDriver instance by using the\n[https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver]\nAPI. In SeleniumLibrary terms, a new browser is created. It is\npossible to start multiple independent browsers (Selenium Webdriver\ninstances) at the same time, by calling `Open Browser` or\n`Create WebDriver` multiple times. These browsers are usually\nindependent of each other and do not share data like cookies,\nsessions or profiles. Typically when the browser starts, it\ncreates a single window which is shown to the user.\n\n== Window ==\n\nWindows are the part of a browser that loads the web site and presents\nit to the user. All content of the site is the content of the window.\nWindows are children of a browser. In SeleniumLibrary browser is a\nsynonym for WebDriver instance. One browser may have multiple\nwindows. Windows can appear as tabs, as separate windows or pop-ups with\ndifferent position and size. Windows belonging to the same browser\ntypically share the sessions detail, like cookies. If there is a\nneed to separate sessions detail, example login with two different\nusers, two browsers (Selenium WebDriver instances) must be created.\nNew windows can be opened example by the application under test or\nby example `Execute Javascript` keyword:\n\n| `Execute Javascript` window.open() # Opens a new window with location about:blank\n\nThe example below opens multiple browsers and windows,\nto demonstrate how the different keywords can be used to interact\nwith browsers, and windows attached to these browsers.\n\nStructure:\n| BrowserA\n| Window 1 (location=https://robotframework.org/)\n| Window 2 (location=https://robocon.io/)\n| Window 3 (location=https://github.com/robotframework/)\n|\n| BrowserB\n| Window 1 (location=https://github.com/)\n\nExample:\n| `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. |\n| `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. |\n| `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA |\n| `Go To` | https://robocon.io | | | # Second window navigates to robocon site. |\n| `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. |\n| ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA |\n| `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. |\n| `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. |\n| ${location} | `Get Location` | | | # ${location} is: https://www.github.com |\n| `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. |\n| ${location} | `Get Location` | | | # ${location} = https://robocon.io/ |\n| @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). |\n| @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. |\n\nThe above example, @{locations 1} contains the following items:\nhttps://robotframework.org/, https://robocon.io/ and\nhttps://github.com/robotframework/'. The @{locations 2}\ncontains the following items: https://robotframework.org/,\nhttps://robocon.io/, https://github.com/robotframework/'\nand 'https://github.com/.\n\n= Timeouts, waits, and delays =\n\nThis section discusses different ways how to wait for elements to\nappear on web pages and to slow down execution speed otherwise.\nIt also explains the `time format` that can be used when setting various\ntimeouts, waits, and delays.\n\n== Timeout ==\n\nSeleniumLibrary contains various keywords that have an optional\n``timeout`` argument that specifies how long these keywords should\nwait for certain events or actions. These keywords include, for example,\n``Wait ...`` keywords and keywords related to alerts. Additionally\n`Execute Async Javascript`. Although it does not have ``timeout``,\nargument, uses a timeout to define how long asynchronous JavaScript\ncan run.\n\nThe default timeout these keywords use can be set globally either by\nusing the `Set Selenium Timeout` keyword or with the ``timeout`` argument\nwhen `importing` the library. If no default timeout is set globally, the\ndefault is 5 seconds. If None is specified for the timeout argument in the\nkeywords, the default is used. See `time format` below for supported\ntimeout syntax.\n\n== Implicit wait ==\n\nImplicit wait specifies the maximum time how long Selenium waits when\nsearching for elements. It can be set by using the `Set Selenium Implicit\nWait` keyword or with the ``implicit_wait`` argument when `importing`\nthe library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp|\nSelenium documentation] for more information about this functionality.\n\nSee `time format` below for supported syntax.\n\n== Page load ==\nPage load timeout is the amount of time to wait for page load to complete\nuntil a timeout exception is raised.\n\nThe default page load timeout can be set globally\nwhen `importing` the library with the ``page_load_timeout`` argument\nor by using the `Set Selenium Page Load Timeout` keyword.\n\nSee `time format` below for supported timeout syntax.\n\nSupport for page load is new in SeleniumLibrary 6.1\n\n== Selenium speed ==\n\nSelenium execution speed can be slowed down globally by using `Set\nSelenium speed` keyword. This functionality is designed to be used for\ndemonstrating or debugging purposes. Using it to make sure that elements\nappear on a page is not a good idea. The above-explained timeouts\nand waits should be used instead.\n\nSee `time format` below for supported syntax.\n\n== Time format ==\n\nAll timeouts and waits can be given as numbers considered seconds\n(e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax\n(e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about\nthe time syntax see the\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide].\n\n= Run-on-failure functionality =\n\nSeleniumLibrary has a handy feature that it can automatically execute\na keyword if any of its own keywords fails. By default, it uses the\n`Capture Page Screenshot` keyword, but this can be changed either by\nusing the `Register Keyword To Run On Failure` keyword or with the\n``run_on_failure`` argument when `importing` the library. It is\npossible to use any keyword from any imported library or resource file.\n\nThe run-on-failure functionality can be disabled by using a special value\n``NOTHING`` or anything considered false (see `Boolean arguments`)\nsuch as ``NONE``.\n\n= Boolean arguments =\n\nStarting from 5.0 SeleniumLibrary relies on Robot Framework to perform the\nboolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint].\nMore details in Robot Framework\n[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide]\n\nPlease note SeleniumLibrary 3 and 4 did have own custom methods to covert\narguments to boolean values.\n\n= EventFiringWebDriver =\n\nThe SeleniumLibrary offers support for\n[https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver].\nSee the Selenium and SeleniumLibrary\n[https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support]\ndocumentation for further details.\n\nEventFiringWebDriver is new in SeleniumLibrary 4.0\n\n= Thread support =\n\nSeleniumLibrary is not thread-safe. This is mainly due because the underlying\n[https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe|\nSelenium tool is not thread-safe] within one browser/driver instance.\nBecause of the limitation in the Selenium side, the keywords or the\nAPI provided by the SeleniumLibrary is not thread-safe.\n\n= Plugins =\n\nSeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal\nfunctionality without creating a new library or hacking the source code. See\n[https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API]\ndocumentation for further details.\n\nPlugin API is new SeleniumLibrary 4.0", + "sha256": "3d660b78fb0d75d9f2f8265fa6f29967ae30b712f545661d64de0f05f2c1b913" + }, + "__intro__": { + "name": "__intro__", + "doc": "2 SeleniumLibrary is a web testing library for Robot Framework.\n\n This document explains how to use keywords provided by SeleniumLibrary.\n For information about installation, support, and more, please visit the\n [https://github.com/robotframework/SeleniumLibrary|project pages].\n For more information about Robot Framework, see http://robotframework.org.\n\n SeleniumLibrary uses the Selenium WebDriver modules internally to\n control a web browser. See http://seleniumhq.org for more information\n about Selenium in general and SeleniumLibrary README.rst\n [https://github.com/robotframework/SeleniumLibrary#browser-drivers|Browser drivers chapter]\n for more details about WebDriver binary installation.\n\n %TOC%\n\n = Locating elements =\n\n All keywords in SeleniumLibrary that need to interact with an element\n on a web page take an argument typically named ``locator`` that specifies\n how to find the element. Most often the locator is given as a string\n using the locator syntax described below, but `using WebElements` is\n possible too.\n\n == Locator syntax ==\n\n SeleniumLibrary supports finding elements based on different strategies\n such as the element id, XPath expressions, or CSS selectors. The strategy\n can either be explicitly specified with a prefix or the strategy can be\n implicit.\n\n === Default locator strategy ===\n\n By default, locators are considered to use the keyword specific default\n locator strategy. All keywords support finding elements based on ``id``\n and ``name`` attributes, but some keywords support additional attributes\n or other values that make sense in their context. For example, `Click\n Link` supports the ``href`` attribute and the link text and addition\n to the normal ``id`` and ``name``.\n\n Examples:\n\n | `Click Element` | example | # Match based on ``id`` or ``name``. |\n | `Click Link` | example | # Match also based on link text and ``href``. |\n | `Click Button` | example | # Match based on ``id``, ``name`` or ``value``. |\n\n If a locator accidentally starts with a prefix recognized as `explicit\n locator strategy` or `implicit XPath strategy`, it is possible to use\n the explicit ``default`` prefix to enable the default strategy.\n\n Examples:\n\n | `Click Element` | name:foo | # Find element with name ``foo``. |\n | `Click Element` | default:name:foo | # Use default strategy with value ``name:foo``. |\n | `Click Element` | //foo | # Find element using XPath ``//foo``. |\n | `Click Element` | default: //foo | # Use default strategy with value ``//foo``. |\n\n === Explicit locator strategy ===\n\n The explicit locator strategy is specified with a prefix using either\n syntax ``strategy:value`` or ``strategy=value``. The former syntax\n is preferred because the latter is identical to Robot Framework's\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#named-argument-syntax|\n named argument syntax] and that can cause problems. Spaces around\n the separator are ignored, so ``id:foo``, ``id: foo`` and ``id : foo``\n are all equivalent.\n\n Locator strategies that are supported by default are listed in the table\n below. In addition to them, it is possible to register `custom locators`.\n\n | = Strategy = | = Match based on = | = Example = |\n | id | Element ``id``. | ``id:example`` |\n | name | ``name`` attribute. | ``name:example`` |\n | identifier | Either ``id`` or ``name``. | ``identifier:example`` |\n | class | Element ``class``. | ``class:example`` |\n | tag | Tag name. | ``tag:div`` |\n | xpath | XPath expression. | ``xpath://div[@id=\"example\"]`` |\n | css | CSS selector. | ``css:div#example`` |\n | dom | DOM expression. | ``dom:document.images[5]`` |\n | link | Exact text a link has. | ``link:The example`` |\n | partial link | Partial link text. | ``partial link:he ex`` |\n | sizzle | Sizzle selector deprecated. | ``sizzle:div.example`` |\n | data | Element ``data-*`` attribute | ``data:id:my_id`` |\n | jquery | jQuery expression. | ``jquery:div.example`` |\n | default | Keyword specific default behavior. | ``default:example`` |\n\n See the `Default locator strategy` section below for more information\n about how the default strategy works. Using the explicit ``default``\n prefix is only necessary if the locator value itself accidentally\n matches some of the explicit strategies.\n\n Different locator strategies have different pros and cons. Using ids,\n either explicitly like ``id:foo`` or by using the `default locator\n strategy` simply like ``foo``, is recommended when possible, because\n the syntax is simple and locating elements by id is fast for browsers.\n If an element does not have an id or the id is not stable, other\n solutions need to be used. If an element has a unique tag name or class,\n using ``tag``, ``class`` or ``css`` strategy like ``tag:h1``,\n ``class:example`` or ``css:h1.example`` is often an easy solution. In\n more complex cases using XPath expressions is typically the best\n approach. They are very powerful but a downside is that they can also\n get complex.\n\n Examples:\n\n | `Click Element` | id:foo | # Element with id 'foo'. |\n | `Click Element` | css:div#foo h1 | # h1 element under div with id 'foo'. |\n | `Click Element` | xpath: //div[@id=\"foo\"]//h1 | # Same as the above using XPath, not CSS. |\n | `Click Element` | xpath: //*[contains(text(), \"example\")] | # Element containing text 'example'. |\n\n *NOTE:*\n\n - The ``strategy:value`` syntax is only supported by SeleniumLibrary 3.0\n and newer.\n - Using the ``sizzle`` strategy or its alias ``jquery`` requires that\n the system under test contains the jQuery library.\n - Prior to SeleniumLibrary 3.0, table related keywords only supported\n ``xpath``, ``css`` and ``sizzle/jquery`` strategies.\n - ``data`` strategy is conveniance locator that will construct xpath from the parameters.\n If you have element like `
`, you locate the element via\n ``data:automation:automation-id-2``. This feature was added in SeleniumLibrary 5.2.0\n\n === Implicit XPath strategy ===\n\n If the locator starts with ``//`` or multiple opening parenthesis in front\n of the ``//``, the locator is considered to be an XPath expression. In other\n words, using ``//div`` is equivalent to using explicit ``xpath://div`` and\n ``((//div))`` is equivalent to using explicit ``xpath:((//div))``\n\n Examples:\n\n | `Click Element` | //div[@id=\"foo\"]//h1 |\n | `Click Element` | (//div)[2] |\n\n The support for the ``(//`` prefix is new in SeleniumLibrary 3.0.\n Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0.\n\n === Chaining locators ===\n\n It is possible chain multiple locators together as single locator. Each chained locator must start with locator\n strategy. Chained locators must be separated with single space, two greater than characters and followed with\n space. It is also possible mix different locator strategies, example css or xpath. Also a list can also be\n used to specify multiple locators. This is useful, is some part of locator would match as the locator separator\n but it should not. Or if there is need to existing WebElement as locator.\n\n Although all locators support chaining, some locator strategies do not abey the chaining. This is because\n some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context\n and not for the element found be the previous locator. Chaining is supported by locator strategies which\n are based on Selenium API, like `xpath` or `css`, but example chaining is not supported by `sizzle` or `jquery\n\n Examples:\n | `Click Element` | css:.bar >> xpath://a | # To find a link which is present after an element with class \"bar\" |\n\n List examples:\n | ${locator_list} = | `Create List` | css:div#div_id | xpath://*[text(), \" >> \"] |\n | `Page Should Contain Element` | ${locator_list} | | |\n | ${element} = | Get WebElement | xpath://*[text(), \" >> \"] | |\n | ${locator_list} = | `Create List` | css:div#div_id | ${element} |\n | `Page Should Contain Element` | ${locator_list} | | |\n\n Chaining locators in new in SeleniumLibrary 5.0\n\n == Using WebElements ==\n\n In addition to specifying a locator as a string, it is possible to use\n Selenium's WebElement objects. This requires first getting a WebElement,\n for example, by using the `Get WebElement` keyword.\n\n | ${elem} = | `Get WebElement` | id:example |\n | `Click Element` | ${elem} | |\n\n == Custom locators ==\n\n If more complex lookups are required than what is provided through the\n default locators, custom lookup strategies can be created. Using custom\n locators is a two part process. First, create a keyword that returns\n a WebElement that should be acted on:\n\n | Custom Locator Strategy | [Arguments] | ${browser} | ${locator} | ${tag} | ${constraints} |\n | | ${element}= | Execute Javascript | return window.document.getElementById('${locator}'); |\n | | [Return] | ${element} |\n\n This keyword is a reimplementation of the basic functionality of the\n ``id`` locator where ``${browser}`` is a reference to a WebDriver\n instance and ``${locator}`` is the name of the locator strategy. To use\n this locator, it must first be registered by using the\n `Add Location Strategy` keyword:\n\n | `Add Location Strategy` | custom | Custom Locator Strategy |\n\n The first argument of `Add Location Strategy` specifies the name of\n the strategy and it must be unique. After registering the strategy,\n the usage is the same as with other locators:\n\n | `Click Element` | custom:example |\n\n See the `Add Location Strategy` keyword for more details.\n\n = Browser and Window =\n\n There is different conceptual meaning when SeleniumLibrary talks\n about windows or browsers. This chapter explains those differences.\n\n == Browser ==\n\n When `Open Browser` or `Create WebDriver` keyword is called, it\n will create a new Selenium WebDriver instance by using the\n [https://www.seleniumhq.org/docs/03_webdriver.jsp|Selenium WebDriver]\n API. In SeleniumLibrary terms, a new browser is created. It is\n possible to start multiple independent browsers (Selenium Webdriver\n instances) at the same time, by calling `Open Browser` or\n `Create WebDriver` multiple times. These browsers are usually\n independent of each other and do not share data like cookies,\n sessions or profiles. Typically when the browser starts, it\n creates a single window which is shown to the user.\n\n == Window ==\n\n Windows are the part of a browser that loads the web site and presents\n it to the user. All content of the site is the content of the window.\n Windows are children of a browser. In SeleniumLibrary browser is a\n synonym for WebDriver instance. One browser may have multiple\n windows. Windows can appear as tabs, as separate windows or pop-ups with\n different position and size. Windows belonging to the same browser\n typically share the sessions detail, like cookies. If there is a\n need to separate sessions detail, example login with two different\n users, two browsers (Selenium WebDriver instances) must be created.\n New windows can be opened example by the application under test or\n by example `Execute Javascript` keyword:\n\n | `Execute Javascript` window.open() # Opens a new window with location about:blank\n\n The example below opens multiple browsers and windows,\n to demonstrate how the different keywords can be used to interact\n with browsers, and windows attached to these browsers.\n\n Structure:\n | BrowserA\n | Window 1 (location=https://robotframework.org/)\n | Window 2 (location=https://robocon.io/)\n | Window 3 (location=https://github.com/robotframework/)\n |\n | BrowserB\n | Window 1 (location=https://github.com/)\n\n Example:\n | `Open Browser` | https://robotframework.org | ${BROWSER} | alias=BrowserA | # BrowserA with first window is opened. |\n | `Execute Javascript` | window.open() | | | # In BrowserA second window is opened. |\n | `Switch Window` | locator=NEW | | | # Switched to second window in BrowserA |\n | `Go To` | https://robocon.io | | | # Second window navigates to robocon site. |\n | `Execute Javascript` | window.open() | | | # In BrowserA third window is opened. |\n | ${handle} | `Switch Window` | locator=NEW | | # Switched to third window in BrowserA |\n | `Go To` | https://github.com/robotframework/ | | | # Third windows goes to robot framework github site. |\n | `Open Browser` | https://github.com | ${BROWSER} | alias=BrowserB | # BrowserB with first windows is opened. |\n | ${location} | `Get Location` | | | # ${location} is: https://www.github.com |\n | `Switch Window` | ${handle} | browser=BrowserA | | # BrowserA second windows is selected. |\n | ${location} | `Get Location` | | | # ${location} = https://robocon.io/ |\n | @{locations 1} | `Get Locations` | | | # By default, lists locations under the currectly active browser (BrowserA). |\n | @{locations 2} | `Get Locations` | browser=ALL | | # By using browser=ALL argument keyword list all locations from all browsers. |\n\n The above example, @{locations 1} contains the following items:\n https://robotframework.org/, https://robocon.io/ and\n https://github.com/robotframework/'. The @{locations 2}\n contains the following items: https://robotframework.org/,\n https://robocon.io/, https://github.com/robotframework/'\n and 'https://github.com/.\n\n = Timeouts, waits, and delays =\n\n This section discusses different ways how to wait for elements to\n appear on web pages and to slow down execution speed otherwise.\n It also explains the `time format` that can be used when setting various\n timeouts, waits, and delays.\n\n == Timeout ==\n\n SeleniumLibrary contains various keywords that have an optional\n ``timeout`` argument that specifies how long these keywords should\n wait for certain events or actions. These keywords include, for example,\n ``Wait ...`` keywords and keywords related to alerts. Additionally\n `Execute Async Javascript`. Although it does not have ``timeout``,\n argument, uses a timeout to define how long asynchronous JavaScript\n can run.\n\n The default timeout these keywords use can be set globally either by\n using the `Set Selenium Timeout` keyword or with the ``timeout`` argument\n when `importing` the library. If no default timeout is set globally, the\n default is 5 seconds. If None is specified for the timeout argument in the\n keywords, the default is used. See `time format` below for supported\n timeout syntax.\n\n == Implicit wait ==\n\n Implicit wait specifies the maximum time how long Selenium waits when\n searching for elements. It can be set by using the `Set Selenium Implicit\n Wait` keyword or with the ``implicit_wait`` argument when `importing`\n the library. See [https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp|\n Selenium documentation] for more information about this functionality.\n\n See `time format` below for supported syntax.\n\n == Page load ==\n Page load timeout is the amount of time to wait for page load to complete\n until a timeout exception is raised.\n\n The default page load timeout can be set globally\n when `importing` the library with the ``page_load_timeout`` argument\n or by using the `Set Selenium Page Load Timeout` keyword.\n\n See `time format` below for supported timeout syntax.\n\n Support for page load is new in SeleniumLibrary 6.1\n\n == Selenium speed ==\n\n Selenium execution speed can be slowed down globally by using `Set\n Selenium speed` keyword. This functionality is designed to be used for\n demonstrating or debugging purposes. Using it to make sure that elements\n appear on a page is not a good idea. The above-explained timeouts\n and waits should be used instead.\n\n See `time format` below for supported syntax.\n\n == Time format ==\n\n All timeouts and waits can be given as numbers considered seconds\n (e.g. ``0.5`` or ``42``) or in Robot Framework's time syntax\n (e.g. ``1.5 seconds`` or ``1 min 30 s``). For more information about\n the time syntax see the\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework User Guide].\n\n = Run-on-failure functionality =\n\n SeleniumLibrary has a handy feature that it can automatically execute\n a keyword if any of its own keywords fails. By default, it uses the\n `Capture Page Screenshot` keyword, but this can be changed either by\n using the `Register Keyword To Run On Failure` keyword or with the\n ``run_on_failure`` argument when `importing` the library. It is\n possible to use any keyword from any imported library or resource file.\n\n The run-on-failure functionality can be disabled by using a special value\n ``NOTHING`` or anything considered false (see `Boolean arguments`)\n such as ``NONE``.\n\n = Boolean arguments =\n\n Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the\n boolean conversion based on keyword arguments [https://docs.python.org/3/library/typing.html|type hint].\n More details in Robot Framework\n [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions|user guide]\n\n Please note SeleniumLibrary 3 and 4 did have own custom methods to covert\n arguments to boolean values.\n\n = EventFiringWebDriver =\n\n The SeleniumLibrary offers support for\n [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver|EventFiringWebDriver].\n See the Selenium and SeleniumLibrary\n [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver|EventFiringWebDriver support]\n documentation for further details.\n\n EventFiringWebDriver is new in SeleniumLibrary 4.0\n\n = Thread support =\n\n SeleniumLibrary is not thread-safe. This is mainly due because the underlying\n [https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-thread-safe|\n Selenium tool is not thread-safe] within one browser/driver instance.\n Because of the limitation in the Selenium side, the keywords or the\n API provided by the SeleniumLibrary is not thread-safe.\n\n = Plugins =\n\n SeleniumLibrary offers plugins as a way to modify and add library keywords and modify some of the internal\n functionality without creating a new library or hacking the source code. See\n [https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins|plugin API]\n documentation for further details.\n\n Plugin API is new SeleniumLibrary 4.0\n ", + "sha256": "59c13272c5a498ee00aa6f3e5e2d1f9cec5c355267e1b03f88c604f15dab6c4e" + } +} \ No newline at end of file diff --git a/utest/test/translation/test_translation.py b/utest/test/translation/test_translation.py new file mode 100644 index 000000000..0281189dc --- /dev/null +++ b/utest/test/translation/test_translation.py @@ -0,0 +1,36 @@ +from pathlib import Path +import sys + +import pytest + +from SeleniumLibrary import SeleniumLibrary + + +@pytest.fixture() +def sl() -> SeleniumLibrary: + sys.path.append(str(Path(__file__).parent.parent.absolute())) + return SeleniumLibrary(language="FI") + + +def test_translation(sl: SeleniumLibrary): + spec = sl.keywords_spec["__init__"] + assert spec.argument_specification + doc: str = spec.documentation + assert doc.startswith( + "00 SeleniumLibrary is a web testing library for Robot Framework" + ) + + spec = sl.keywords_spec["hallinnoi_hälytys"] + doc: str = spec.documentation + assert doc == "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi" + + +def test_provide_translation_as_list(sl: SeleniumLibrary): + lang_plugin = "robotframework_seleniumlibrary_translation_list" + file_path = Path(__file__).parent.parent / lang_plugin / "translate2.json" + received_path = sl._get_translation("swe") + assert received_path == file_path, received_path.relative_to(file_path) + assert sl._get_translation("wrong") is None + received_path = sl._get_translation("Eng") + file_path = Path(__file__).parent.parent / lang_plugin / "translate1.json" + assert received_path == file_path, received_path.relative_to(file_path)