🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 15 (from laksa041)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
8 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.3 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://robotframework.org/SeleniumLibrary/SeleniumLibrary.html
Last Crawled2026-04-09 00:57:33 (8 days ago)
First Indexed2019-08-27 09:07:47 (6 years ago)
HTTP Status Code200
Meta TitleSeleniumLibrary
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
Library version: 6.8.0 Library scope: GLOBAL Introduction 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 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 Browser drivers chapter for more details about WebDriver binary installation. Locating elements Browser and Window Browser and Driver options and service class Timeouts, waits, and delays Run-on-failure functionality Boolean arguments EventFiringWebDriver Thread support Plugins Language Importing Keywords 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 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 <div data-automation="automation-id-2"> , 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 obey 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 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 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 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 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 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 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 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 type hint . More details in Robot Framework 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 EventFiringWebDriver . See the Selenium and SeleniumLibrary 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 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 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 module search path for Python packages starting with robotframework-seleniumlibrary-translation by using the 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 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 robotframework-seleniumlibrary-translation-fi repository. Importing Arguments timeout = 0:00:05 implicit_wait = 0:00:00 run_on_failure = Capture Page Screenshot screenshot_root_directory = None str | None plugins = None str | None event_firing_webdriver = None str | None page_load_timeout = 0:05:00 action_chain_delay = 0:00:00.250000 language = None str | None Documentation 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 or BASE64. See Set Screenshot Directory keyword for further details about EMBED and BASE64. 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 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. Keywords Add Cookie Documentation Adds a cookie to your current session. name and value are required, path , domain , secure and expiry are optional. Expiry supports the same formats as the DateTime library or an epoch timestamp. Example: Add Cookie foo bar Add Cookie foo bar domain=example.com Add Cookie foo bar expiry=2027-09-28 16:21:35 # Expiry as timestamp. Add Cookie foo bar expiry=1822137695 # Expiry as epoch seconds. Prior to SeleniumLibrary 3.0 setting expiry did not work. Add Location Strategy Arguments strategy_name str strategy_keyword str persist = False bool Documentation Adds a custom location strategy. See Custom locators for information on how to create and use custom strategies. Remove Location Strategy can be used to remove a registered strategy. Location strategies are automatically removed after leaving the current scope by default. Setting persist to a true value (see Boolean arguments ) will cause the location strategy to stay registered throughout the life of the test. Alert Should Be Present Documentation Verifies that an alert is present and by default, accepts it. Fails if no alert is present. If text is a non-empty string, then it is used to verify alert's message. The alert is accepted by default, but that behavior can be controlled by using the action argument same way as with Handle Alert . timeout specifies how long to wait for the alert to appear. If it is not given, the global default timeout is used instead. action and timeout arguments are new in SeleniumLibrary 3.0. In earlier versions, the alert was always accepted and a timeout was hardcoded to one second. Alert Should Not Be Present Documentation Verifies that no alert is present. If the alert actually exists, the action argument determines how it should be handled. By default, the alert is accepted, but it can be also dismissed or left open the same way as with the Handle Alert keyword. timeout specifies how long to wait for the alert to appear. By default, is not waited for the alert at all, but a custom time can be given if alert may be delayed. See the time format section for information about the syntax. New in SeleniumLibrary 3.0. Assign Id To Element Documentation Assigns a temporary id to the element specified by locator . This is mainly useful if the locator is complicated and/or slow XPath expression and it is needed multiple times. Identifier expires when the page is reloaded. See the Locating elements section for details about the locator syntax. Example: Assign ID to Element //ul[@class='example' and ./li[contains(., 'Stuff')]] my id Page Should Contain Element my id Capture Element Screenshot Arguments locator WebElement | str | List [ WebElement | str ] filename = selenium-element-screenshot-{index}.png str Documentation Captures a screenshot from the element identified by locator and embeds it into log file. See Capture Page Screenshot for details about filename argument. See the Locating elements section for details about the locator syntax. An absolute path to the created element screenshot is returned. If the filename equals to BASE64 (case insensitive), then the base64 string is returned in addition to the screenshot embedded to the log. See Capture Page Screenshot for more information. Support for capturing the screenshot from an element has limited support among browser vendors. Please check the browser vendor driver documentation does the browser support capturing a screenshot from an element. New in SeleniumLibrary 3.3. Support for EMBED is new in SeleniumLibrary 4.2. Support for BASE64 is new in SeleniumLibrary 6.8. Examples: Capture Element Screenshot id:image_id Capture Element Screenshot id:image_id ${OUTPUTDIR}/id_image_id-1.png Capture Element Screenshot id:image_id EMBED ${ess}= Capture Element Screenshot id:image_id BASE64 Capture Page Screenshot Arguments filename = selenium-screenshot-{index}.png str Documentation Takes a screenshot of the current page and embeds it into a log file. filename argument specifies the name of the file to write the screenshot into. The directory where screenshots are saved can be set when importing the library or by using the Set Screenshot Directory keyword. If the directory is not configured, screenshots are saved to the same directory where Robot Framework's log file is written. If filename equals to EMBED (case insensitive), then screenshot is embedded as Base64 image to the log.html. In this case file is not created in the filesystem. If filename equals to BASE64 (case insensitive), then the base64 string is returned and the screenshot is embedded to the log. This allows one to reuse the image elsewhere in the report. Example: ${ss}= Capture Page Screenshot BASE64 Set Test Message *HTML*Test Success<p><img src="data:image/png;base64,${ss}" width="256px"> Starting from SeleniumLibrary 1.8, if filename contains marker {index} , it will be automatically replaced with an unique running index, preventing files to be overwritten. Indices start from 1, and how they are represented can be customized using Python's format string syntax . An absolute path to the created screenshot file is returned or if filename equals to EMBED, word EMBED is returned. If filename equals to BASE64, the base64 string containing the screenshot is returned. Support for BASE64 is new in SeleniumLibrary 6.8 Examples: Capture Page Screenshot File Should Exist ${OUTPUTDIR}/selenium-screenshot-1.png ${path} = Capture Page Screenshot File Should Exist ${OUTPUTDIR}/selenium-screenshot-2.png File Should Exist ${path} Capture Page Screenshot custom_name.png File Should Exist ${OUTPUTDIR}/custom_name.png Capture Page Screenshot custom_with_index_{index}.png File Should Exist ${OUTPUTDIR}/custom_with_index_1.png Capture Page Screenshot formatted_index_{index:03}.png File Should Exist ${OUTPUTDIR}/formatted_index_001.png Capture Page Screenshot EMBED File Should Not Exist EMBED Checkbox Should Be Selected Arguments locator WebElement | str | List [ WebElement | str ] Documentation Verifies checkbox locator is selected/checked. See the Locating elements section for details about the locator syntax. Checkbox Should Not Be Selected Arguments locator WebElement | str | List [ WebElement | str ] Documentation Verifies checkbox locator is not selected/checked. See the Locating elements section for details about the locator syntax. Choose File Arguments locator WebElement | str | List [ WebElement | str ] file_path str Documentation Inputs the file_path into the file input field locator . This keyword is most often used to input files into upload forms. The keyword does not check file_path is the file or folder available on the machine where tests are executed. If the file_path points at a file and when using Selenium Grid, Selenium will magically , transfer the file from the machine where the tests are executed to the Selenium Grid node where the browser is running. Then Selenium will send the file path, from the nodes file system, to the browser. That file_path is not checked, is new in SeleniumLibrary 4.0. Example: Choose File my_upload_field ${CURDIR}/trades.csv Clear Element Text Arguments locator WebElement | str | List [ WebElement | str ] Documentation Clears the value of the text-input-element identified by locator . See the Locating elements section for details about the locator syntax. Click Button Documentation Clicks the button identified by locator . See the Locating elements section for details about the locator syntax. When using the default locator strategy, buttons are searched using id , name , and value . See the Click Element keyword for details about the modifier argument. The modifier argument is new in SeleniumLibrary 3.3 Click Element Arguments locator WebElement | str | List [ WebElement | str ] modifier = False bool | str action_chain = False bool Documentation Click the element identified by locator . See the Locating elements section for details about the locator syntax. The modifier argument can be used to pass Selenium Keys when clicking the element. The + can be used as a separator for different Selenium Keys. The CTRL is internally translated to the CONTROL key. The modifier is space and case insensitive, example "alt" and " aLt " are supported formats to ALT key . If modifier does not match to Selenium Keys, keyword fails. If action_chain argument is true, see Boolean arguments for more details on how to set boolean argument, then keyword uses ActionChain based click instead of the <web_element>.click() function. If both action_chain and modifier are defined, the click will be performed using modifier and action_chain will be ignored. Example: Click Element id:button # Would click element without any modifiers. Click Element id:button CTRL # Would click element with CTLR key pressed down. Click Element id:button CTRL+ALT # Would click element with CTLR and ALT keys pressed down. Click Element id:button action_chain=True # Clicks the button using an Selenium ActionChains The modifier argument is new in SeleniumLibrary 3.2 The action_chain argument is new in SeleniumLibrary 4.1 Click Element At Coordinates Documentation Click the element locator at xoffset/yoffset . The Cursor is moved and the center of the element and x/y coordinates are calculated from that point. See the Locating elements section for details about the locator syntax. Click Image Documentation Clicks an image identified by locator . See the Locating elements section for details about the locator syntax. When using the default locator strategy, images are searched using id , name , src and alt . See the Click Element keyword for details about the modifier argument. The modifier argument is new in SeleniumLibrary 3.3 Click Link Documentation Clicks a link identified by locator . See the Locating elements section for details about the locator syntax. When using the default locator strategy, links are searched using id , name , href and the link text. See the Click Element keyword for details about the modifier argument. The modifier argument is new in SeleniumLibrary 3.3 Close All Browsers Documentation Closes all open browsers and resets the browser cache. After this keyword, new indexes returned from Open Browser keyword are reset to 1. This keyword should be used in test or suite teardown to make sure all browsers are closed. Close Browser Documentation Closes the current browser. Close Window Documentation Closes currently opened and selected browser window/tab. Cover Element Arguments locator WebElement | str | List [ WebElement | str ] Documentation Will cover elements identified by locator with a blue div without breaking page layout. See the Locating elements section for details about the locator syntax. New in SeleniumLibrary 3.3.0 Example: | Cover Element | css:div#container | Create Webdriver Documentation Creates an instance of Selenium WebDriver. Like Open Browser , but allows passing arguments to the created WebDriver instance directly. This keyword should only be used if the functionality provided by Open Browser is not adequate. driver_name must be a WebDriver implementation name like Firefox, Chrome, Ie, Edge, Safari, or Remote. The initialized WebDriver can be configured either with a Python dictionary kwargs or by using keyword arguments **init_kwargs . These arguments are passed directly to WebDriver without any processing. See Selenium API documentation for details about the supported arguments. Examples: # Use proxy with Firefox ${proxy}= Evaluate selenium.webdriver.Proxy() modules=selenium, selenium.webdriver ${proxy.http_proxy}= Set Variable localhost:8888 Create Webdriver Firefox proxy=${proxy} Returns the index of this browser instance which can be used later to switch back to it. Index starts from 1 and is reset back to it when Close All Browsers keyword is used. See Switch Browser for an example. Current Frame Should Contain Documentation Verifies that the current frame contains text . See Page Should Contain for an explanation about the loglevel argument. Prior to SeleniumLibrary 3.0 this keyword was named Current Frame Contains . Current Frame Should Not Contain Documentation Verifies that the current frame does not contain text . See Page Should Contain for an explanation about the loglevel argument. Delete All Cookies Documentation Deletes all cookies. Delete Cookie Arguments name Documentation Deletes the cookie matching name . If the cookie is not found, nothing happens. Double Click Element Arguments locator WebElement | str | List [ WebElement | str ] Documentation Double clicks the element identified by locator . See the Locating elements section for details about the locator syntax. Drag And Drop Arguments locator WebElement | str | List [ WebElement | str ] target WebElement | str | List [ WebElement | str ] Documentation Drags the element identified by locator into the target element. The locator argument is the locator of the dragged element and the target is the locator of the target. See the Locating elements section for details about the locator syntax. Example: Drag And Drop css:div#element css:div.target Drag And Drop By Offset Documentation Drags the element identified with locator by xoffset/yoffset . See the Locating elements section for details about the locator syntax. The element will be moved by xoffset and yoffset , each of which is a negative or positive number specifying the offset. Example: Drag And Drop By Offset myElem 50 -35 # Move myElem 50px right and 35px down Element Attribute Value Should Be Documentation Verifies element identified by locator contains expected attribute value. See the Locating elements section for details about the locator syntax. Example: Element Attribute Value Should Be | css:img | href | value New in SeleniumLibrary 3.2. Element Should Be Disabled Arguments locator WebElement | str | List [ WebElement | str ] Documentation Verifies that element identified by locator is disabled. This keyword considers also elements that are read-only to be disabled. See the Locating elements section for details about the locator syntax. Element Should Be Enabled Arguments locator WebElement | str | List [ WebElement | str ] Documentation Verifies that element identified by locator is enabled. This keyword considers also elements that are read-only to be disabled. See the Locating elements section for details about the locator syntax. Element Should Be Focused Arguments locator WebElement | str | List [ WebElement | str ] Documentation Verifies that element identified by locator is focused. See the Locating elements section for details about the locator syntax. New in SeleniumLibrary 3.0. Element Should Be Visible Documentation Verifies that the element identified by locator is visible. Herein, visible means that the element is logically visible, not optically visible in the current browser viewport. For example, an element that carries display:none is not logically visible, so using this keyword on that element would fail. See the Locating elements section for details about the locator syntax. The message argument can be used to override the default error message. Element Should Contain Documentation Verifies that element locator contains text expected . See the Locating elements section for details about the locator syntax. The message argument can be used to override the default error message. The ignore_case argument can be set to True to compare case insensitive, default is False. New in SeleniumLibrary 3.1. ignore_case argument is new in SeleniumLibrary 3.1. Use Element Text Should Be if you want to match the exact text, not a substring. Element Should Not Be Visible Documentation Verifies that the element identified by locator is NOT visible. Passes if the element does not exists. See Element Should Be Visible for more information about visibility and supported arguments. Element Should Not Contain Documentation Verifies that element locator does not contain text expected . See the Locating elements section for details about the locator syntax. The message argument can be used to override the default error message. The ignore_case argument can be set to True to compare case insensitive, default is False. ignore_case argument new in SeleniumLibrary 3.1. Element Text Should Be Documentation Verifies that element locator contains exact the text expected . See the Locating elements section for details about the locator syntax. The message argument can be used to override the default error message. The ignore_case argument can be set to True to compare case insensitive, default is False. ignore_case argument is new in SeleniumLibrary 3.1. Use Element Should Contain if a substring match is desired. Element Text Should Not Be Documentation Verifies that element locator does not contain exact the text not_expected . See the Locating elements section for details about the locator syntax. The message argument can be used to override the default error message. The ignore_case argument can be set to True to compare case insensitive, default is False. New in SeleniumLibrary 3.1.1 Execute Async Javascript Documentation Executes asynchronous JavaScript code with possible arguments. Similar to Execute Javascript except that scripts executed with this keyword must explicitly signal they are finished by invoking the provided callback. This callback is always injected into the executed function as the last argument. Scripts must complete within the script timeout or this keyword will fail. See the Timeout section for more information. Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript arguments as part of code argument. See Execute Javascript for more details. Examples: Execute Async JavaScript var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 2000); Execute Async JavaScript ${CURDIR}/async_js_to_execute.js ${result} = Execute Async JavaScript ... var callback = arguments[arguments.length - 1]; ... function answer(){callback("text");}; ... window.setTimeout(answer, 2000); Should Be Equal ${result} text Execute Javascript Documentation Executes the given JavaScript code with possible arguments. code may be divided into multiple cells in the test data and code may contain multiple lines of code and arguments. In that case, the JavaScript code parts are concatenated together without adding spaces and optional arguments are separated from code . If code is a path to an existing file, the JavaScript to execute will be read from that file. Forward slashes work as a path separator on all operating systems. The JavaScript executes in the context of the currently selected frame or window as the body of an anonymous function. Use window to refer to the window of your application and document to refer to the document object of the current frame or window, e.g. document.getElementById('example') . This keyword returns whatever the executed JavaScript code returns. Return values are converted to the appropriate Python types. Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript arguments as part of code argument. The JavaScript code and arguments must be separated with JAVASCRIPT and ARGUMENTS markers and must be used exactly with this format. If the Javascript code is first, then the JAVASCRIPT marker is optional. The order of JAVASCRIPT and ARGUMENTS markers can be swapped, but if ARGUMENTS is the first marker, then JAVASCRIPT marker is mandatory. It is only allowed to use JAVASCRIPT and ARGUMENTS markers only one time in the code argument. Examples: Execute JavaScript window.myFunc('arg1', 'arg2') Execute JavaScript ${CURDIR}/js_to_execute.js Execute JavaScript alert(arguments[0]); ARGUMENTS 123 Execute JavaScript ARGUMENTS 123 JAVASCRIPT alert(arguments[0]); Frame Should Contain Arguments locator WebElement | str | List [ WebElement | str ] text str loglevel = TRACE str Documentation Verifies that frame identified by locator contains text . See the Locating elements section for details about the locator syntax. See Page Should Contain for an explanation about the loglevel argument. Get Action Chain Delay Documentation Gets the currently stored value for chain_delay_value in timestr format. Get All Links Documentation Returns a list containing ids of all links found in current page. If a link has no id, an empty string will be in the list instead. Get Browser Aliases Documentation Returns aliases of all active browser that has an alias as NormalizedDict. The dictionary contains the aliases as keys and the index as value. This can be accessed as dictionary ${aliases.key} or as list @{aliases}[0] . Example: Open Browser https://example.com alias=BrowserA Open Browser https://example.com alias=BrowserB &{aliases} Get Browser Aliases # &{aliases} = { BrowserA=1|BrowserB=2 } Log ${aliases.BrowserA} # logs 1 FOR ${alias} IN @{aliases} Log ${alias} # logs BrowserA and BrowserB END See Switch Browser for more information and examples. New in SeleniumLibrary 4.0 Get Browser Ids Documentation Returns index of all active browser as list. Example: @{browser_ids}= Get Browser Ids FOR ${id} IN @{browser_ids} @{window_titles}= Get Window Titles browser=${id} Log Browser ${id} has these windows: ${window_titles} END See Switch Browser for more information and examples. New in SeleniumLibrary 4.0 Get Cookie Return Type CookieInformation Documentation Returns information of cookie with name as an object. If no cookie is found with name , keyword fails. The cookie object contains details about the cookie. Attributes available in the object are documented in the table below. Attribute Explanation name The name of a cookie. value Value of the cookie. path Indicates a URL path, for example / . domain The domain, the cookie is visible to. secure When true, the cookie is only used with HTTPS connections. httpOnly When true, the cookie is not accessible via JavaScript. expiry Python datetime object indicating when the cookie expires. extra Possible attributes outside of the WebDriver specification See the WebDriver specification for details about the cookie information. Notice that expiry is specified as a datetime object , not as seconds since Unix Epoch like WebDriver natively does. In some cases, example when running a browser in the cloud, it is possible that the cookie contains other attributes than is defined in the WebDriver specification . These other attributes are available in an extra attribute in the cookie object and it contains a dictionary of the other attributes. The extra attribute is new in SeleniumLibrary 4.0. Example: Add Cookie foo bar ${cookie} = Get Cookie foo Should Be Equal ${cookie.name} foo Should Be Equal ${cookie.value} bar Should Be True ${cookie.expiry.year} > 2017 New in SeleniumLibrary 3.0. Get Cookies Documentation Returns all cookies of the current page. If as_dict argument evaluates as false, see Boolean arguments for more details, then cookie information is returned as a single string in format name1=value1; name2=value2; name3=value3 . When as_dict argument evaluates as true, cookie information is returned as Robot Framework dictionary format. The string format can be used, for example, for logging purposes or in headers when sending HTTP requests. The dictionary format is helpful when the result can be passed to requests library's Create Session keyword's optional cookies parameter. The ` as_dict ` argument is new in SeleniumLibrary 3.3 Get Dom Attribute Arguments locator WebElement | str | List [ WebElement | str ] attribute str Documentation Returns the value of attribute from the element locator . Get DOM Attribute keyword only returns attributes declared within the element's HTML markup. If the requested attribute is not there, the keyword returns ${None}. See the Locating elements section for details about the locator syntax. Example: ${id}= Get DOM Attribute css:h1 id Get Element Attribute Arguments locator WebElement | str | List [ WebElement | str ] attribute str Documentation Returns the value of attribute from the element locator . See the Locating elements section for details about the locator syntax. Example: ${id}= Get Element Attribute css:h1 id Passing attribute name as part of the locator was removed in SeleniumLibrary 3.2. The explicit attribute argument should be used instead. Get Element Count Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the number of elements matching locator . If you wish to assert the number of matching elements, use Page Should Contain Element with limit argument. Keyword will always return an integer. Example: ${count} = Get Element Count name:div_name Should Be True ${count} > 2 New in SeleniumLibrary 3.0. Get Element Size Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns width and height of the element identified by locator . See the Locating elements section for details about the locator syntax. Both width and height are returned as integers. Example: ${width} ${height} = Get Element Size css:div#container Get Horizontal Position Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the horizontal position of the element identified by locator . See the Locating elements section for details about the locator syntax. The position is returned in pixels off the left side of the page, as an integer. See also Get Vertical Position . Get List Items Arguments locator WebElement | str | List [ WebElement | str ] values = False bool Documentation Returns all labels or values of selection list locator . See the Locating elements section for details about the locator syntax. Returns visible labels by default, but values can be returned by setting the values argument to a true value (see Boolean arguments ). Example: ${labels} = Get List Items mylist ${values} = Get List Items css:#example select values=True Support to return values is new in SeleniumLibrary 3.0. Get Location Documentation Returns the current browser window URL. Get Locations Documentation Returns and logs URLs of all windows of the selected browser. Browser Scope: The browser argument specifies the browser that shall return its windows information. browser can be index_or_alias like in Switch Browser . If browser is CURRENT (default, case-insensitive) the currently active browser is selected. If browser is ALL (case-insensitive) the window information of all windows of all opened browsers are returned. Get Property Arguments locator WebElement | str | List [ WebElement | str ] property str Documentation Returns the value of property from the element locator . See the Locating elements section for details about the locator syntax. Example: ${text_length}= Get Property css:h1 text_length Get Selected List Label Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the label of selected option from selection list locator . If there are multiple selected options, the label of the first option is returned. See the Locating elements section for details about the locator syntax. Get Selected List Labels Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns labels of selected options from selection list locator . Starting from SeleniumLibrary 3.0, returns an empty list if there are no selections. In earlier versions, this caused an error. See the Locating elements section for details about the locator syntax. Get Selected List Value Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the value of selected option from selection list locator . If there are multiple selected options, the value of the first option is returned. See the Locating elements section for details about the locator syntax. Get Selected List Values Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns values of selected options from selection list locator . Starting from SeleniumLibrary 3.0, returns an empty list if there are no selections. In earlier versions, this caused an error. See the Locating elements section for details about the locator syntax. Get Selenium Implicit Wait Documentation Gets the implicit wait value used by Selenium. The value is returned as a human-readable string like 1 second . See the Implicit wait section above for more information. Get Selenium Page Load Timeout Documentation Gets the time to wait for a page load to complete before raising a timeout exception. The value is returned as a human-readable string like 1 second . See the Page load section above for more information. New in SeleniumLibrary 6.1 Get Selenium Speed Documentation Gets the delay that is waited after each Selenium command. The value is returned as a human-readable string like 1 second . See the Selenium Speed section above for more information. Get Selenium Timeout Documentation Gets the timeout that is used by various keywords. The value is returned as a human-readable string like 1 second . See the Timeout section above for more information. Get Session Id Documentation Returns the currently active browser session id. New in SeleniumLibrary 3.2 Get Source Documentation Returns the entire HTML source of the current page or frame. Get Table Cell Documentation Returns contents of a table cell. The table is located using the locator argument and its cell found using row and column . See the Locating elements section for details about the locator syntax. Both row and column indexes start from 1, and header and footer rows are included in the count. It is possible to refer to rows and columns from the end by using negative indexes so that -1 is the last row/column, -2 is the second last, and so on. All <th> and <td> elements anywhere in the table are considered to be cells. See Page Should Contain for an explanation about the loglevel argument. Get Text Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the text value of the element identified by locator . See the Locating elements section for details about the locator syntax. Get Title Documentation Returns the title of the current page. Get Value Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the value attribute of the element identified by locator . See the Locating elements section for details about the locator syntax. Get Vertical Position Arguments locator WebElement | str | List [ WebElement | str ] Documentation Returns the vertical position of the element identified by locator . See the Locating elements section for details about the locator syntax. The position is returned in pixels off the top of the page, as an integer. See also Get Horizontal Position . Get WebElement Arguments locator WebElement | str | List [ WebElement | str ] Return Type WebElement Documentation Returns the first WebElement matching the given locator . See the Locating elements section for details about the locator syntax. Get WebElements Arguments locator WebElement | str | List [ WebElement | str ] Return Type List [ WebElement ] Documentation Returns a list of WebElement objects matching the locator . See the Locating elements section for details about the locator syntax. Starting from SeleniumLibrary 3.0, the keyword returns an empty list if there are no matching elements. In previous releases, the keyword failed in this case. Get Window Handles Documentation Returns all child window handles of the selected browser as a list. Can be used as a list of windows to exclude with Select Window . How to select the browser scope of this keyword, see Get Locations . Prior to SeleniumLibrary 3.0, this keyword was named List Windows . Get Window Identifiers Documentation Returns and logs id attributes of all windows of the selected browser. How to select the browser scope of this keyword, see Get Locations . Get Window Names Documentation Returns and logs names of all windows of the selected browser. How to select the browser scope of this keyword, see Get Locations . Get Window Position Documentation Returns current window position. The position is relative to the top left corner of the screen. Returned values are integers. See also Set Window Position . Example: Get Window Size Documentation Returns current window width and height as integers. See also Set Window Size . If inner parameter is set to True, keyword returns HTML DOM window.innerWidth and window.innerHeight properties. See Boolean arguments for more details on how to set boolean arguments. The inner is new in SeleniumLibrary 4.0. Example: ${width} ${height}= Get Window Size ${width} ${height}= Get Window Size True Get Window Titles Documentation Returns and logs titles of all windows of the selected browser. How to select the browser scope of this keyword, see Get Locations . Go Back Documentation Simulates the user clicking the back button on their browser. Go To Arguments url Documentation Navigates the current browser window to the provided url . Handle Alert Documentation Handles the current alert and returns its message. By default, the alert is accepted, but this can be controlled with the action argument that supports the following case-insensitive values: ACCEPT : Accept the alert i.e. press Ok . Default. DISMISS : Dismiss the alert i.e. press Cancel . LEAVE : Leave the alert open. The timeout argument specifies how long to wait for the alert to appear. If it is not given, the global default timeout is used instead. Examples: Handle Alert # Accept alert. Handle Alert action=DISMISS # Dismiss alert. Handle Alert timeout=10 s # Use custom timeout and accept alert. Handle Alert DISMISS 1 min # Use custom timeout and dismiss alert. ${message} = Handle Alert # Accept alert and get its message. ${message} = Handle Alert LEAVE # Leave alert open and get its message. New in SeleniumLibrary 3.0. Input Password Documentation Types the given password into the text field identified by locator . See the Locating elements section for details about the locator syntax. See Input Text for clear argument details. Difference compared to Input Text is that this keyword does not log the given password on the INFO level. Notice that if you use the keyword like Input Password password_field password the password is shown as a normal keyword argument. A way to avoid that is using variables like Input Password password_field ${PASSWORD} Please notice that Robot Framework logs all arguments using the TRACE level and tests must not be executed using level below DEBUG if the password should not be logged in any format. The clear argument is new in SeleniumLibrary 4.0. Hiding password logging from Selenium logs is new in SeleniumLibrary 4.2. Input Text Documentation Types the given text into the text field identified by locator . When clear is true, the input element is cleared before the text is typed into the element. When false, the previous text is not cleared from the element. Use Input Password if you do not want the given text to be logged. If Selenium Grid is used and the text argument points to a file in the file system, then this keyword prevents the Selenium to transfer the file to the Selenium Grid hub. Instead, this keyword will send the text string as is to the element. If a file should be transferred to the hub and upload should be performed, please use Choose File keyword. See the Locating elements section for details about the locator syntax. See the Boolean arguments section how Boolean values are handled. Disabling the file upload the Selenium Grid node and the clear argument are new in SeleniumLibrary 4.0 Input Text Into Alert Documentation Types the given text into an input field in an alert. The alert is accepted by default, but that behavior can be controlled by using the action argument same way as with Handle Alert . timeout specifies how long to wait for the alert to appear. If it is not given, the global default timeout is used instead. New in SeleniumLibrary 3.0. List Selection Should Be Arguments locator WebElement | str | List [ WebElement | str ] * expected str Documentation Verifies selection list locator has expected options selected. It is possible to give expected options both as visible labels and as values. Starting from SeleniumLibrary 3.0, mixing labels and values is not possible. Order of the selected options is not validated. If no expected options are given, validates that the list has no selections. A more explicit alternative is using List Should Have No Selections . See the Locating elements section for details about the locator syntax. Examples: List Selection Should Be gender Female List Selection Should Be interests Test Automation Python List Should Have No Selections Arguments locator WebElement | str | List [ WebElement | str ] Documentation Verifies selection list locator has no options selected. See the Locating elements section for details about the locator syntax. Location Should Be Documentation Verifies that the current URL is exactly url . The url argument contains the exact url that should exist in browser. The message argument can be used to override the default error message. message argument is new in SeleniumLibrary 3.2.0. Location Should Contain Documentation Verifies that the current URL contains expected . The expected argument contains the expected value in url. The message argument can be used to override the default error message. message argument is new in SeleniumLibrary 3.2.0. Log Location Documentation Logs and returns the current browser window URL. Log Source Documentation Logs and returns the HTML source of the current page or frame. The loglevel argument defines the used log level. Valid log levels are WARN , INFO (default), DEBUG , TRACE and NONE (no logging). Log Title Documentation Logs and returns the title of the current page. Maximize Browser Window Documentation Maximizes current browser window. Minimize Browser Window Documentation Minimizes current browser window. Mouse Down Arguments locator WebElement | str | List [ WebElement | str ] Documentation Simulates pressing the left mouse button on the element locator . See the Locating elements section for details about the locator syntax. The element is pressed without releasing the mouse button. See also the more specific keywords Mouse Down On Image and Mouse Down On Link . Mouse Down On Image Arguments locator WebElement | str | List [ WebElement | str ] Documentation Simulates a mouse down event on an image identified by locator . See the Locating elements section for details about the locator syntax. When using the default locator strategy, images are searched using id , name , src and alt . Mouse Down On Link Arguments locator WebElement | str | List [ WebElement | str ] Documentation Simulates a mouse down event on a link identified by locator . See the Locating elements section for details about the locator syntax. When using the default locator strategy, links are searched using id , name , href and the link text. Mouse Out Arguments locator WebElement | str | List [ WebElement | str ] Documentation Simulates moving the mouse away from the element locator . See the Locating elements section for details about the locator syntax. Mouse Over Arguments locator WebElement | str | List [ WebElement | str ] Documentation Simulates hovering the mouse over the element locator . See the Locating elements section for details about the locator syntax. Mouse Up Arguments locator WebElement | str | List [ WebElement | str ] Documentation Simulates releasing the left mouse button on the element locator . See the Locating elements section for details about the locator syntax. Open Browser Documentation Opens a new browser instance to the optional url . The browser argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names. Browser Name(s) Firefox firefox, ff Google Chrome googlechrome, chrome, gc Headless Firefox headlessfirefox Headless Chrome headlesschrome Internet Explorer internetexplorer, ie Edge edge Safari safari To be able to actually use one of these browsers, you need to have a matching Selenium browser driver available. See the 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 open a new browser, but the second one will switch to the already opened browser and will not open a new browser. The alias definition overrules browser definition. When same alias is used but a different browser is defined, then switch to a browser with same alias is done and new browser is not opened. An alternative approach for switching is using an index returned by this keyword. These indices start from 1, are incremented when new 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 Selenium Grid . 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. The ff_profile_dir can also be an instance of the selenium.webdriver.FirefoxProfile . As a third option, it is possible to use FirefoxProfile methods and attributes to define the profile using methods and attributes in the same way as with options argument. Example: It is possible to use FirefoxProfile set_preference to define different 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 methods and attributes and for Firefox these methods and attributes 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 uses a Python like syntax to define Selenium options methods or attributes. Example when using 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 format string syntax . 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 $PATH . 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. The service argument is new in SeleniumLibrary 6.4. Page Should Contain Documentation Verifies that current page contains text . If this keyword fails, it automatically logs the page source using the log level specified with the optional loglevel 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. Page Should Contain Button Documentation Verifies button locator is found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. When using the default locator strategy, buttons are searched using id , name , and value . Page Should Contain Checkbox Documentation Verifies checkbox locator is found from the current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. Page Should Contain Element Documentation Verifies that element locator is found on the current page. See the Locating elements section for details about the locator syntax. The message argument can be used to override the default error message. The limit argument can used to define how many elements the page should contain. When limit is None (default) page can contain one or more elements. When limit is a number, page must contain same number of elements. See Page Should Contain for an explanation about the loglevel argument. Examples assumes that locator matches to two elements. Page Should Contain Element div_name limit=1 # Keyword fails. Page Should Contain Element div_name limit=2 # Keyword passes. Page Should Contain Element div_name limit=none # None is considered one or more. Page Should Contain Element div_name # Same as above. The limit argument is new in SeleniumLibrary 3.0. Page Should Contain Image Documentation Verifies image identified by locator is found from current page. See the Locating elements section for details about the locator syntax. When using the default locator strategy, images are searched using id , name , src and alt . See Page Should Contain Element for an explanation about message and loglevel arguments. Page Should Contain Link Documentation Verifies link identified by locator is found from current page. See the Locating elements section for details about the locator syntax. When using the default locator strategy, links are searched using id , name , href and the link text. See Page Should Contain Element for an explanation about message and loglevel arguments. Page Should Contain List Documentation Verifies selection list locator is found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. Page Should Contain Radio Button Documentation Verifies radio button locator is found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. When using the default locator strategy, radio buttons are searched using id , name and value . Page Should Contain Textfield Documentation Verifies text field locator is found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. Page Should Not Contain Documentation Verifies the current page does not contain text . See Page Should Contain for an explanation about the loglevel argument. Page Should Not Contain Button Documentation Verifies button locator is not found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. When using the default locator strategy, buttons are searched using id , name , and value . Page Should Not Contain Checkbox Documentation Verifies checkbox locator is not found from the current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. Page Should Not Contain Element Documentation Verifies that element locator is not found on the current page. See the Locating elements section for details about the locator syntax. See Page Should Contain for an explanation about message and loglevel arguments. Page Should Not Contain Image Documentation Verifies image identified by locator is not found from current page. See the Locating elements section for details about the locator syntax. When using the default locator strategy, images are searched using id , name , src and alt . See Page Should Contain Element for an explanation about message and loglevel arguments. Page Should Not Contain Link Documentation Verifies link identified by locator is not found from current page. See the Locating elements section for details about the locator syntax. When using the default locator strategy, links are searched using id , name , href and the link text. See Page Should Contain Element for an explanation about message and loglevel arguments. Page Should Not Contain List Documentation Verifies selection list locator is not found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. Page Should Not Contain Radio Button Documentation Verifies radio button locator is not found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. When using the default locator strategy, radio buttons are searched using id , name and value . Page Should Not Contain Textfield Documentation Verifies text field locator is not found from current page. See Page Should Contain Element for an explanation about message and loglevel arguments. See the Locating elements section for details about the locator syntax. Press Key Documentation Simulates user pressing key on element identified by locator . See the Locating elements section for details about the locator syntax. key is either a single character, a string, or a numerical ASCII code of the key lead by '\'. Examples: Press Key text_field q Press Key text_field abcde Press Key login_button \13 # ASCII code for enter key Press Key and Press Keys differ in the methods to simulate key presses. Press Key uses the WebDriver SEND_KEYS_TO_ELEMENT command 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 . Press Keys Documentation Simulates the user pressing key(s) to an element or on the active browser. If locator evaluates as false, see Boolean arguments for more details, then the keys are sent to the currently active browser. Otherwise element is searched and keys are send to the element identified by the locator . In later case, keyword fails if element is not found. See the Locating elements section for details about the locator syntax. keys arguments can contain one or many strings, but it can not be empty. keys can also be a combination of Selenium Keys and strings or a single Selenium Key. If Selenium Key is combined with strings, Selenium key and strings must be separated by the + character, like in CONTROL+c . Selenium Keys are space and case sensitive and Selenium Keys are not parsed inside of the string. Example AALTO, would send string AALTO and ALT not parsed inside of the string. But A+ALT+O would found Selenium ALT key from the keys argument. It also possible to press many Selenium Keys down at the same time, example 'ALT+ARROW_DOWN`. If Selenium Keys are detected in the keys argument, keyword will press the Selenium Key down, send the strings and then release the Selenium Key. If keyword needs to send a Selenium Key as a string, then each character must be separated with + character, example E+N+D . CTRL is alias for Selenium CONTROL and ESC is alias for Selenium ESCAPE New in SeleniumLibrary 3.3 Examples: Press Keys text_field AAAAA # Sends string "AAAAA" to element. Press Keys None BBBBB # Sends string "BBBBB" to currently active browser. Press Keys text_field E+N+D # Sends string "END" to element. Press Keys text_field XXX YY # Sends strings "XXX" and "YY" to element. Press Keys text_field XXX+YY # Same as above. Press Keys text_field ALT+ARROW_DOWN # Pressing "ALT" key down, then pressing ARROW_DOWN and then releasing both keys. Press Keys text_field ALT ARROW_DOWN # Pressing "ALT" key and then pressing ARROW_DOWN. Press Keys text_field CTRL+c # Pressing CTRL key down, sends string "c" and then releases CTRL key. Press Keys button RETURN # Pressing "ENTER" key to element. Press Key and Press Keys differ in the methods to simulate key presses. Press Keys uses the Selenium/WebDriver Actions. Press Keys also has a more extensive syntax for describing keys, key combinations, and key actions. Although one is not recommended over the other if Press Keys does not work we recommend trying Press Key . Print Page As Pdf Documentation 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. Radio Button Should Be Set To Documentation Verifies radio button group group_name is set to value . group_name is the name of the radio button group. Radio Button Should Not Be Selected Documentation Verifies radio button group group_name has no selection. group_name is the name of the radio button group. Register Keyword To Run On Failure Documentation Sets the keyword to execute, when a SeleniumLibrary keyword fails. keyword is the name of a keyword that will be executed if a SeleniumLibrary keyword fails. It is possible to use any available keyword, including user keywords or keywords from other libraries, but the keyword must not take any arguments. The initial keyword to use is set when importing the library, and the keyword that is used by default is Capture Page Screenshot . Taking a screenshot when something failed is a very useful feature, but notice that it can slow down the execution. It is possible to use string NOTHING or NONE , case-insensitively, as well as Python None to disable this feature altogether. This keyword returns the name of the previously registered failure keyword or Python None if this functionality was previously disabled. The return value can be always used to restore the original value later. Example: Changes in SeleniumLibrary 3.0: Possible to use string NONE or Python None to disable the functionality. Return Python None when the functionality was disabled earlier. In previous versions special value No Keyword was returned and it could not be used to restore the original state. Reload Page Documentation Simulates user reloading page. Remove Location Strategy Documentation Removes a previously added custom location strategy. See Custom locators for information on how to create and use custom strategies. Select All From List Arguments locator WebElement | str | List [ WebElement | str ] Documentation Selects all options from multi-selection list locator . See the Locating elements section for details about the locator syntax. Select Checkbox Arguments locator WebElement | str | List [ WebElement | str ] Documentation Selects the checkbox identified by locator . Does nothing if checkbox is already selected. See the Locating elements section for details about the locator syntax. Select Frame Arguments locator WebElement | str | List [ WebElement | str ] Documentation Sets frame identified by locator as the current frame. See the Locating elements section for details about the locator syntax. Works both with frames and iframes. Use Unselect Frame to cancel the frame selection and return to the main frame. Example: Select Frame top-frame # Select frame with id or name 'top-frame' Click Link example # Click link 'example' in the selected frame Unselect Frame # Back to main frame. Select Frame //iframe[@name='xxx'] # Select frame using xpath Select From List By Index Arguments locator WebElement | str | List [ WebElement | str ] * indexes str Documentation Selects options from selection list locator by indexes . Indexes of list options start from 0. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the Locating elements section for details about the locator syntax. Select From List By Label Arguments locator WebElement | str | List [ WebElement | str ] * labels str Documentation Selects options from selection list locator by labels . If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the Locating elements section for details about the locator syntax. Select From List By Value Arguments locator WebElement | str | List [ WebElement | str ] * values str Documentation Selects options from selection list locator by values . If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the Locating elements section for details about the locator syntax. Select Radio Button Documentation Sets the radio button group group_name to value . The radio button to be selected is located by two arguments: group_name is the name of the radio button group. value is the id or value attribute of the actual radio button. Examples: Set Action Chain Delay Documentation Sets the duration of delay in ActionChains() used by SeleniumLibrary. The value can be given as a number that is considered to be seconds or as a human-readable string like 1 second . Value is always stored as milliseconds internally. The previous value is returned and can be used to restore the original value later if needed. Set Browser Implicit Wait Documentation Sets the implicit wait value used by Selenium. Same as Set Selenium Implicit Wait but only affects the current browser. Set Focus To Element Arguments locator WebElement | str | List [ WebElement | str ] Documentation Sets the focus to the element identified by locator . See the Locating elements section for details about the locator syntax. Prior to SeleniumLibrary 3.0 this keyword was named Focus . Set Screenshot Directory Documentation Sets the directory for captured screenshots. path argument specifies the absolute path to a directory where the screenshots should be written to. If the directory does not exist, it will be created. The directory can also be set when importing the library. If it is not configured anywhere, screenshots are saved to the same directory where Robot Framework's log file is written. If path equals to EMBED (case insensitive) and Capture Page Screenshot or capture Element Screenshot keywords filename argument is not changed from the default value, then the page or element screenshot is embedded as Base64 image to the log.html. The previous value is returned and can be used to restore the original value later if needed. Returning the previous value is new in SeleniumLibrary 3.0. The persist argument was removed in SeleniumLibrary 3.2 and EMBED is new in SeleniumLibrary 4.2. Set Selenium Implicit Wait Documentation Sets the implicit wait value used by Selenium. The value can be given as a number that is considered to be seconds or as a human-readable string like 1 second . The previous value is returned and can be used to restore the original value later if needed. This keyword sets the implicit wait for all opened browsers. Use Set Browser Implicit Wait to set it only to the current browser. See the Implicit wait section above for more information. Example: ${orig wait} = Set Selenium Implicit Wait 10 seconds Perform AJAX call that is slow Set Selenium Implicit Wait ${orig wait} Set Selenium Page Load Timeout Documentation Sets the page load timeout value used by Selenium. The value can be given as a number that is considered to be seconds or as a human-readable string like 1 second . The previous value is returned and can be used to restore the original value later if needed. In contrast to Set Selenium Timeout and Set Selenium Implicit Wait , this keywords sets the time for the Webdriver to wait until the page is loaded before raising a timeout exception. See the Page load section above for more information. Example: ${orig page load timeout} = Set Selenium Page Load Timeout 30 seconds Open page that loads slowly Set Selenium Page Load Timeout ${orig page load timeout} New in SeleniumLibrary 6.1 Set Selenium Speed Documentation Sets the delay that is waited after each Selenium command. The value can be given as a number that is considered to be seconds or as a human-readable string like 1 second . The previous value is returned and can be used to restore the original value later if needed. See the Selenium Speed section above for more information. Example: Set Selenium Speed 0.5 seconds Set Selenium Timeout Documentation Sets the timeout that is used by various keywords. The value can be given as a number that is considered to be seconds or as a human-readable string like 1 second . The previous value is returned and can be used to restore the original value later if needed. See the Timeout section above for more information. Example: ${orig timeout} = Set Selenium Timeout 15 seconds Open page that loads slowly Set Selenium Timeout ${orig timeout} Set Window Position Documentation Sets window position using x and y coordinates. The position is relative to the top left corner of the screen, but some browsers exclude possible task bar set by the operating system from the calculation. The actual position may thus be different with different browsers. Values can be given using strings containing numbers or by using actual numbers. See also Get Window Position . Example: Set Window Size Documentation Sets current windows size to given width and height . Values can be given using strings containing numbers or by using actual numbers. See also Get Window Size . Browsers have a limit on their minimum size. Trying to set them smaller will cause the actual size to be bigger than the requested size. If inner parameter is set to True, keyword sets the necessary window width and height to have the desired HTML DOM window.innerWidth and window.innerHeight . See Boolean arguments for more details on how to set boolean arguments. The inner argument is new since SeleniumLibrary 4.0. This inner argument does not support Frames. If a frame is selected, switch to default before running this. Example: Set Window Size 800 600 Set Window Size 800 600 True Simulate Event Documentation Simulates event on the element identified by locator . This keyword is useful if element has OnEvent handler that needs to be explicitly invoked. See the Locating elements section for details about the locator syntax. Prior to SeleniumLibrary 3.0 this keyword was named Simulate . Submit Form Documentation Submits a form identified by locator . If locator is not given, first form on the page is submitted. See the Locating elements section for details about the locator syntax. Switch Browser Documentation Switches between active browsers using index_or_alias . Indices are returned by the Open Browser keyword and aliases can be given to it explicitly. Indices start from 1. Example: Open Browser http://google.com ff Location Should Be http://google.com Open Browser http://yahoo.com ie alias=second Location Should Be http://yahoo.com Switch Browser 1 # index Page Should Contain I'm feeling lucky Switch Browser second # alias Page Should Contain More Yahoo! Close All Browsers Above example expects that there was no other open browsers when opening the first one because it used index 1 when switching to it later. If you are not sure about that, you can store the index into a variable as below. Switch Window Documentation Switches to browser window matching locator . If the window is found, all subsequent commands use the selected window, until this keyword is used again. If the window is not found, this keyword fails. The previous windows handle is returned and can be used to switch back to it later. Notice that alerts should be handled with Handle Alert or other alert related keywords. The locator can be specified using different strategies somewhat similarly as when locating elements on pages. By default, the locator is matched against window handle, name, title, and URL. Matching is done in that order and the first matching window is selected. The locator can specify an explicit strategy by using the format strategy:value (recommended) or strategy=value . Supported strategies are name , title , and url . These matches windows using their name, title, or URL, respectively. Additionally, default can be used to explicitly use the default strategy explained above. If the locator is NEW (case-insensitive), the latest opened window is selected. It is an error if this is the same as the current window. If the locator is MAIN (default, case-insensitive), the main window is selected. If the locator is CURRENT (case-insensitive), nothing is done. This effectively just returns the current window handle. If the locator is not a string, it is expected to be a list of window handles to exclude . Such a list of excluded windows can be got from Get Window Handles before doing an action that opens a new window. The timeout is used to specify how long keyword will poll to select the new window. The timeout is new in SeleniumLibrary 3.2. Example: Click Link popup1 # Open new window Switch Window example # Select window using default strategy Title Should Be Pop-up 1 Click Button popup2 # Open another window ${handle} = Switch Window NEW # Select latest opened window Title Should Be Pop-up 2 Switch Window ${handle} # Select window using handle Title Should Be Pop-up 1 Switch Window MAIN # Select the main window Title Should Be Main ${excludes} = Get Window Handles # Get list of current windows Click Link popup3 # Open one more window Switch Window ${excludes} # Select window using excludes Title Should Be Pop-up 3 The browser argument allows with index_or_alias to implicitly switch to a specific browser when switching to a window. See Switch Browser If the browser is CURRENT (case-insensitive), no other browser is selected. NOTE: The strategy:value syntax is only supported by SeleniumLibrary 3.0 and newer. Prior to SeleniumLibrary 3.0 matching windows by name, title and URL was case-insensitive. Earlier versions supported aliases None , null and the empty string for selecting the main window, and alias self for selecting the current window. Support for these aliases was removed in SeleniumLibrary 3.2. Table Cell Should Contain Documentation Verifies table cell contains text expected . See Get Table Cell that this keyword uses internally for an explanation about accepted arguments. Table Column Should Contain Arguments locator WebElement | str | List [ WebElement | str ] column int expected str loglevel = TRACE str Documentation Verifies table column contains text expected . The table is located using the locator argument and its column found using column . See the Locating elements section for details about the locator syntax. Column indexes start from 1. It is possible to refer to columns from the end by using negative indexes so that -1 is the last column, -2 is the second last, and so on. If a table contains cells that span multiple columns, those merged cells count as a single column. See Page Should Contain Element for an explanation about the loglevel argument. Table Row Should Contain Documentation Verifies that table row contains text expected . The table is located using the locator argument and its column found using column . See the Locating elements section for details about the locator syntax. Row indexes start from 1. It is possible to refer to rows from the end by using negative indexes so that -1 is the last row, -2 is the second last, and so on. If a table contains cells that span multiple rows, a match only occurs for the uppermost row of those merged cells. See Page Should Contain Element for an explanation about the loglevel argument. Table Should Contain Arguments locator WebElement | str | List [ WebElement | str ] expected str loglevel = TRACE str Documentation Verifies table contains text expected . The table is located using the locator argument. See the Locating elements section for details about the locator syntax. See Page Should Contain Element for an explanation about the loglevel argument. Textarea Should Contain Documentation Verifies text area locator contains text expected . message can be used to override default error message. See the Locating elements section for details about the locator syntax. Textarea Value Should Be Documentation Verifies text area locator has exactly text expected . message can be used to override default error message. See the Locating elements section for details about the locator syntax. Textfield Should Contain Documentation Verifies text field locator contains text expected . message can be used to override the default error message. See the Locating elements section for details about the locator syntax. Textfield Value Should Be Documentation Verifies text field locator has exactly text expected . message can be used to override default error message. See the Locating elements section for details about the locator syntax. Title Should Be Documentation Verifies that the current page title equals title . The message argument can be used to override the default error message. message argument is new in SeleniumLibrary 3.1. Unselect All From List Arguments locator WebElement | str | List [ WebElement | str ] Documentation Unselects all options from multi-selection list locator . See the Locating elements section for details about the locator syntax. New in SeleniumLibrary 3.0. Unselect Checkbox Arguments locator WebElement | str | List [ WebElement | str ] Documentation Removes the selection of checkbox identified by locator . Does nothing if the checkbox is not selected. See the Locating elements section for details about the locator syntax. Unselect Frame Documentation Sets the main frame as the current frame. In practice cancels the previous Select Frame call. Unselect From List By Index Arguments locator WebElement | str | List [ WebElement | str ] * indexes str Documentation Unselects options from selection list locator by indexes . Indexes of list options start from 0. This keyword works only with multi-selection lists. See the Locating elements section for details about the locator syntax. Unselect From List By Label Arguments locator WebElement | str | List [ WebElement | str ] * labels str Documentation Unselects options from selection list locator by labels . This keyword works only with multi-selection lists. See the Locating elements section for details about the locator syntax. Unselect From List By Value Arguments locator WebElement | str | List [ WebElement | str ] * values str Documentation Unselects options from selection list locator by values . This keyword works only with multi-selection lists. See the Locating elements section for details about the locator syntax. Wait For Condition Documentation Waits until condition is true or timeout expires. The condition can be arbitrary JavaScript expression but it must return a value to be evaluated. See Execute JavaScript for information about accessing content on pages. Fails if the timeout expires before the condition becomes true. See the Timeouts section for more information about using timeouts and their default value. error can be used to override the default error message. Examples: Wait For Condition return document.title == "New Title" Wait For Condition return jQuery.active == 0 Wait For Condition style = document.querySelector('h1').style; return style.background == "red" && style.color == "white" Wait For Expected Condition Arguments condition <module 'string' from '/Users/emanlove/.pyenv/versions/3.12.6/lib/python3.12/string.py'> * args 🏷 timeout = 10 float | None Documentation Waits until condition is true or timeout expires. The condition must be one of selenium's expected condition which can be found within the selenium 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 be passed along after the expected condition. Fails if the timeout expires before the condition becomes true. The default value is 10 seconds. Examples: Wait For Expected Condition alert_is_present Wait For Expected Condition Title Is New Title If the expected condition expects a locator then one can pass as arguments a tuple containing the selenium locator strategies and the locator. Example of expected condition expecting locator: ${byElem}= | Evaluate ("id","added_btn") Wait For Expected Condition | Presence Of Element Located | ${byElem} Wait Until Element Contains Documentation Waits until the element locator contains text . Fails if timeout expires before the text appears. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. Wait Until Element Does Not Contain Documentation Waits until the element locator does not contain text . Fails if timeout expires before the text disappears. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. Wait Until Element Is Enabled Documentation Waits until the element locator is enabled. Element is considered enabled if it is not disabled nor read-only. Fails if timeout expires before the element is enabled. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. Considering read-only elements to be disabled is a new feature in SeleniumLibrary 3.0. Wait Until Element Is Not Visible Documentation Waits until the element locator is not visible. Fails if timeout expires before the element is not visible. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. Wait Until Element Is Visible Documentation Waits until the element locator is visible. Fails if timeout expires before the element is visible. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. Wait Until Location Contains Documentation Waits until the current URL contains expected . The expected argument contains the expected value in url. Fails if timeout expires before the location contains. See the Timeouts section for more information about using timeouts and their default value. The message argument can be used to override the default error message. New in SeleniumLibrary 4.0 Wait Until Location Does Not Contain Documentation Waits until the current URL does not contains location . The location argument contains value not expected in url. Fails if timeout expires before the location not contains. See the Timeouts section for more information about using timeouts and their default value. The message argument can be used to override the default error message. New in SeleniumLibrary 4.3 Wait Until Location Is Documentation Waits until the current URL is expected . The expected argument is the expected value in url. Fails if timeout expires before the location is. See the Timeouts section for more information about using timeouts and their default value. The message argument can be used to override the default error message. New in SeleniumLibrary 4.0 Wait Until Location Is Not Documentation Waits until the current URL is not location . The location argument is the unexpected value in url. Fails if timeout expires before the location is not. See the Timeouts section for more information about using timeouts and their default value. The message argument can be used to override the default error message. New in SeleniumLibrary 4.3 Wait Until Page Contains Documentation Waits until text appears on the current page. Fails if timeout expires before the text appears. See the Timeouts section for more information about using timeouts and their default value. error can be used to override the default error message. Wait Until Page Contains Element Documentation Waits until the element locator appears on the current page. Fails if timeout expires before the element appears. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. The limit argument can used to define how many elements the page should contain. When limit is None (default) page can contain one or more elements. When limit is a number, page must contain same number of elements. limit is new in SeleniumLibrary 4.4 Wait Until Page Does Not Contain Documentation Waits until text disappears from the current page. Fails if timeout expires before the text disappears. See the Timeouts section for more information about using timeouts and their default value. error can be used to override the default error message. Wait Until Page Does Not Contain Element Documentation Waits until the element locator disappears from the current page. Fails if timeout expires before the element disappears. See the Timeouts section for more information about using timeouts and their default value and the Locating elements section for details about the locator syntax. error can be used to override the default error message. The limit argument can used to define how many elements the page should not contain. When limit is None (default) page can`t contain any elements. When limit is a number, page must not contain same number of elements. limit is new in SeleniumLibrary 4.4 Data types Any (Standard) Documentation Any value is accepted. No conversion is done. Converted Types Any boolean (Standard) Documentation Strings TRUE , YES , ON and 1 are converted to Boolean True , the empty string as well as strings FALSE , NO , OFF and 0 are converted to Boolean False , and the string NONE is converted to the Python None object. Other strings and other accepted values are passed as-is, allowing keywords to handle them specially if needed. All string comparisons are case-insensitive. Examples: TRUE (converted to True ), off (converted to False ), example (used as-is) Converted Types string integer float None Usages Add Cookie Add Location Strategy Click Button Click Element Click Image Click Link Element Should Contain Element Should Not Contain Element Text Should Be Element Text Should Not Be Get Cookies Get List Items Get Window Size Input Password Input Text Open Browser Print Page As Pdf Set Window Size dictionary (Standard) Documentation Strings must be Python dictionary literals. They are converted to actual dictionaries using the ast.literal_eval function. They can contain any values ast.literal_eval supports, including dictionaries and other containers. If the type has nested types like dict[str, int] , items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: {'a': 1, 'b': 2} , {'key': 1, 'nested': {'key': 2}} Converted Types string Mapping float (Standard) Documentation Conversion is done using Python's float built-in function. Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes. Examples: 3.14 , 2.9979e8 , 10 000.000 01 Converted Types string Real integer (Standard) Documentation Conversion is done using Python's int built-in function. Floating point numbers are accepted only if they can be represented as integers exactly. For example, 1.0 is accepted and 1.1 is not. Starting from RF 4.1, it is possible to use hexadecimal, octal and binary numbers by prefixing values with 0x , 0o and 0b , respectively. Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes. Examples: 42 , -1 , 0b1010 , 10 000 000 , 0xBAD_C0FFEE Converted Types string float Usages Click Element At Coordinates Drag And Drop By Offset Get Element Count Get Element Size Get Horizontal Position Get Table Cell Get Vertical Position Get Window Position Page Should Contain Element Set Window Position Set Window Size Table Cell Should Contain Table Column Should Contain Table Row Should Contain Wait Until Page Contains Element Wait Until Page Does Not Contain Element list (Standard) None (Standard) Documentation String NONE (case-insensitive) is converted to Python None object. Other values cause an error. Converted Types string Usages __init__ Add Cookie Alert Should Be Present Alert Should Not Be Present Create Webdriver Element Attribute Value Should Be Element Should Be Visible Element Should Contain Element Should Not Be Visible Element Should Not Contain Element Text Should Be Element Text Should Not Be Handle Alert Input Text Into Alert Location Should Be Location Should Contain Open Browser Page Should Contain Button Page Should Contain Checkbox Page Should Contain Element Page Should Contain Image Page Should Contain Link Page Should Contain List Page Should Contain Radio Button Page Should Contain Textfield Page Should Not Contain Button Page Should Not Contain Checkbox Page Should Not Contain Element Page Should Not Contain Image Page Should Not Contain Link Page Should Not Contain List Page Should Not Contain Radio Button Page Should Not Contain Textfield Press Keys Print Page As Pdf Register Keyword To Run On Failure Set Screenshot Directory Submit Form Switch Window Textarea Should Contain Textarea Value Should Be Textfield Should Contain Textfield Value Should Be Title Should Be Wait For Condition Wait For Expected Condition Wait Until Element Contains Wait Until Element Does Not Contain Wait Until Element Is Enabled Wait Until Element Is Not Visible Wait Until Element Is Visible Wait Until Location Contains Wait Until Location Does Not Contain Wait Until Location Is Wait Until Location Is Not Wait Until Page Contains Wait Until Page Contains Element Wait Until Page Does Not Contain Wait Until Page Does Not Contain Element string (Standard) Documentation All arguments are converted to Unicode strings. Converted Types Any Usages __init__ Add Cookie Add Location Strategy Alert Should Be Present Alert Should Not Be Present Assign Id To Element Capture Element Screenshot Capture Page Screenshot Checkbox Should Be Selected Checkbox Should Not Be Selected Choose File Clear Element Text Click Button Click Element Click Element At Coordinates Click Image Click Link Cover Element Create Webdriver Current Frame Should Contain Current Frame Should Not Contain Double Click Element Drag And Drop Drag And Drop By Offset Element Attribute Value Should Be Element Should Be Disabled Element Should Be Enabled Element Should Be Focused Element Should Be Visible Element Should Contain Element Should Not Be Visible Element Should Not Contain Element Text Should Be Element Text Should Not Be Frame Should Contain Get All Links Get Browser Aliases Get Browser Ids Get Cookie Get Cookies Get Dom Attribute Get Element Attribute Get Element Count Get Element Size Get Horizontal Position Get List Items Get Location Get Locations Get Property Get Selected List Label Get Selected List Labels Get Selected List Value Get Selected List Values Get Selenium Implicit Wait Get Selenium Page Load Timeout Get Selenium Speed Get Selenium Timeout Get Session Id Get Source Get Table Cell Get Text Get Title Get Value Get Vertical Position Get WebElement Get WebElements Get Window Handles Get Window Identifiers Get Window Names Get Window Titles Handle Alert Input Password Input Text Input Text Into Alert List Selection Should Be List Should Have No Selections Location Should Be Location Should Contain Log Location Log Source Log Title Mouse Down Mouse Down On Image Mouse Down On Link Mouse Out Mouse Over Mouse Up Open Browser Open Context Menu Page Should Contain Page Should Contain Button Page Should Contain Checkbox Page Should Contain Element Page Should Contain Image Page Should Contain Link Page Should Contain List Page Should Contain Radio Button Page Should Contain Textfield Page Should Not Contain Page Should Not Contain Button Page Should Not Contain Checkbox Page Should Not Contain Element Page Should Not Contain Image Page Should Not Contain Link Page Should Not Contain List Page Should Not Contain Radio Button Page Should Not Contain Textfield Press Key Press Keys Print Page As Pdf Radio Button Should Be Set To Radio Button Should Not Be Selected Register Keyword To Run On Failure Remove Location Strategy Scroll Element Into View Select All From List Select Checkbox Select Frame Select From List By Index Select From List By Label Select From List By Value Select Radio Button Set Action Chain Delay Set Focus To Element Set Screenshot Directory Set Selenium Implicit Wait Set Selenium Page Load Timeout Set Selenium Speed Set Selenium Timeout Simulate Event Submit Form Switch Browser Switch Window Table Cell Should Contain Table Column Should Contain Table Footer Should Contain Table Header Should Contain Table Row Should Contain Table Should Contain Textarea Should Contain Textarea Value Should Be Textfield Should Contain Textfield Value Should Be Title Should Be Unselect All From List Unselect Checkbox Unselect From List By Index Unselect From List By Label Unselect From List By Value Wait For Condition Wait Until Element Contains Wait Until Element Does Not Contain Wait Until Element Is Enabled Wait Until Element Is Not Visible Wait Until Element Is Visible Wait Until Location Contains Wait Until Location Does Not Contain Wait Until Location Is Wait Until Location Is Not Wait Until Page Contains Wait Until Page Contains Element Wait Until Page Does Not Contain Wait Until Page Does Not Contain Element timedelta (Standard) Documentation Strings are expected to represent a time interval in one of the time formats Robot Framework supports: a number representing seconds like 42 or 10.5 a time string like 1 hour 2 seconds or 1h 2s a "timer" string like 01:02 (1 minute 2 seconds) or 01:00:03 (1 hour 3 seconds) Integers and floats are considered to be seconds. See the Robot Framework User Guide for more details about the supported time formats. Converted Types string integer float Usages Alert Should Be Present Alert Should Not Be Present Handle Alert Input Text Into Alert Set Action Chain Delay Set Browser Implicit Wait Set Selenium Implicit Wait Set Selenium Page Load Timeout Set Selenium Speed Set Selenium Timeout Wait For Condition Wait Until Element Contains Wait Until Element Does Not Contain Wait Until Element Is Enabled Wait Until Element Is Not Visible Wait Until Element Is Visible Wait Until Location Contains Wait Until Location Does Not Contain Wait Until Location Is Wait Until Location Is Not Wait Until Page Contains Wait Until Page Contains Element Wait Until Page Does Not Contain Wait Until Page Does Not Contain Element tuple (Standard) Documentation Strings must be Python tuple literals. They are converted to actual tuples using the ast.literal_eval function. They can contain any values ast.literal_eval supports, including tuples and other containers. If the type has nested types like tuple[str, int, int] , items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: ('one', 'two') , (('one', 1), ('two', 2)) Converted Types string Sequence
Markdown
# 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. - [en]() - [fi]() - [fr]() - [it]() - [nl]() - [pt-br]() - [pt-pt]() ✕ #### Keywords (182) \+ - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Assign Id To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element) - [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) - [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) - [Checkbox Should Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Be%20Selected) - [Checkbox Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Not%20Be%20Selected) - [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) - [Clear Element Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Clear%20Element%20Text) - [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) - [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) - [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates) - [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image) - [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) - [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) - [Close Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20Browser) - [Close Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20Window) - [Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element) - [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) - [Current Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Contain) - [Current Frame Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Not%20Contain) - [Delete All Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Delete%20All%20Cookies) - [Delete Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Delete%20Cookie) - [Double Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Double%20Click%20Element) - [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop) - [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) - [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) - [Element Should Be Disabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Disabled) - [Element Should Be Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Enabled) - [Element Should Be Focused](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Focused) - [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Execute Async Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) - [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) - [Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Frame%20Should%20Contain) - [Get Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Action%20Chain%20Delay) - [Get All Links](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20All%20Links) - [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases) - [Get Browser Ids](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Ids) - [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie) - [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies) - [Get Dom Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) - [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute) - [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position) - [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) - [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) - [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) - [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property) - [Get Selected List Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Label) - [Get Selected List Labels](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Labels) - [Get Selected List Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Value) - [Get Selected List Values](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Values) - [Get Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Implicit%20Wait) - [Get Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Page%20Load%20Timeout) - [Get Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Speed) - [Get Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Timeout) - [Get Session Id](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Session%20Id) - [Get Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source) - [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) - [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text) - [Get Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Title) - [Get Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Value) - [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position) - [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) - [Get WebElements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElements) - [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) - [Get Window Identifiers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Identifiers) - [Get Window Names](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Names) - [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position) - [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) - [Get Window Titles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Titles) - [Go Back](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20Back) - [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) - [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) - [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections) - [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) - [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain) - [Log Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Location) - [Log Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Source) - [Log Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Title) - [Maximize Browser Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Maximize%20Browser%20Window) - [Minimize Browser Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Minimize%20Browser%20Window) - [Mouse Down](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down) - [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image) - [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link) - [Mouse Out](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Out) - [Mouse Over](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Over) - [Mouse Up](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Up) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Open Context Menu](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Context%20Menu) - [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) - [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button) - [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image) - [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link) - [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List) - [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button) - [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield) - [Page Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain) - [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button) - [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox) - [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element) - [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image) - [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link) - [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List) - [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button) - [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield) - [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) - [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Radio Button Should Be Set To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Be%20Set%20To) - [Radio Button Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Not%20Be%20Selected) - [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) - [Reload Page](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Reload%20Page) - [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy) - [Scroll Element Into View](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Scroll%20Element%20Into%20View) - [Select All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20All%20From%20List) - [Select Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Checkbox) - [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) - [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index) - [Select From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label) - [Select From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value) - [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button) - [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay) - [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait) - [Set Focus To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Focus%20To%20Element) - [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) - [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) - [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) - [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) - [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) - [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position) - [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) - [Simulate Event](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Simulate%20Event) - [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form) - [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) - [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) - [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain) - [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain) - [Table Footer Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Footer%20Should%20Contain) - [Table Header Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Header%20Should%20Contain) - [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain) - [Table Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Should%20Contain) - [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain) - [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be) - [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain) - [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be) - [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) - [Unselect All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20All%20From%20List) - [Unselect Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Checkbox) - [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame) - [Unselect From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Index) - [Unselect From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Label) - [Unselect From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Value) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) | | | |---|---| | Library version: | 6\.8.0 | | Library scope: | GLOBAL | ## Introduction 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 [project pages](https://github.com/robotframework/SeleniumLibrary). 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 [Browser drivers chapter](https://github.com/robotframework/SeleniumLibrary#browser-drivers) for more details about WebDriver binary installation. - [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) - [Browser and Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Browser%20and%20Window) - [Browser and Driver options and service class](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Browser%20and%20Driver%20options%20and%20service%20class) - [Timeouts, waits, and delays](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeouts%2C%20waits%2C%20and%20delays) - [Run-on-failure functionality](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Run-on-failure%20functionality) - [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) - [EventFiringWebDriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#EventFiringWebDriver) - [Thread support](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Thread%20support) - [Plugins](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Plugins) - [Language](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Language) - [Importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) - [Keywords](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Keywords) ## 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Using%20WebElements) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) supports the `href` attribute and the link text and addition to the normal `id` and `name`. Examples: | | | | |---|---|---| | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | example | \# Match based on `id` or `name`. | | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | example | \# Match also based on link text and `href`. | | [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) | example | \# Match based on `id`, `name` or `value`. | If a locator accidentally starts with a prefix recognized as [explicit locator strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Explicit%20locator%20strategy) or [implicit XPath strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20XPath%20strategy), it is possible to use the explicit `default` prefix to enable the default strategy. Examples: | | | | |---|---|---| | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | name:foo | \# Find element with name `foo`. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | default:name:foo | \# Use default strategy with value `name:foo`. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | //foo | \# Find element using XPath `//foo`. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | 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 [named argument syntax](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Custom%20locators). | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Default%20locator%20strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Default%20locator%20strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | id:foo | \# Element with id 'foo'. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | css:div\#foo h1 | \# h1 element under div with id 'foo'. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | xpath: //div\[@id="foo"\]//h1 | \# Same as the above using XPath, not CSS. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | 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 \<div data-automation="automation-id-2"\>, 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | //div\[@id="foo"\]//h1 | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | (//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 obey 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | \${locator\_list} | | | | \${element} = | Get WebElement | xpath: //\*\[text(), " \>\> "\] | | | \${locator\_list} = | Create List | css:div\#div\_id | \${element } | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | \${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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) keyword. | | | | |---|---|---| | \${elem} = | [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) | id:example | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | \${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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) keyword: | | | | |---|---|---| | [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) | custom | Custom Locator Strategy | The first argument of [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | custom:example | See the [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) or [Create WebDriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) keyword is called, it will create a new Selenium WebDriver instance by using the [Selenium WebDriver](https://www.seleniumhq.org/docs/03_webdriver.jsp) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) or [Create WebDriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) 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/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <https://robotframework.org> | \${BROWSER} | alias=BrowserA | \# BrowserA with first window is opened. | | [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | window.open() | | | \# In BrowserA second window is opened. | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | locator=NEW | | | \# Switched to second window in BrowserA | | [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To) | <https://robocon.io> | | | \# Second window navigates to robocon site. | | [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | window.open() | | | \# In BrowserA third window is opened. | | \${handle} | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | locator=NEW | | \# Switched to third window in BrowserA | | [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To) | <https://github.com/robotframework/> | | | \# Third windows goes to robot framework github site. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <https://github.com> | \${BROWSER} | alias=BrowserB | \# BrowserB with first windows is opened. | | \${location} | [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) | | | \# \${location} is: <https://www.github.com> | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | \${handle} | browser=BrowserA | | \# BrowserA second windows is selected. | | \${location} | [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) | | | \# \${location} = <https://robocon.io/> | | @{locations 1} | [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) | | | \# By default, lists locations under the currectly active browser (BrowserA). | | @{locations 2} | [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keyword. ### Configuring the browser using the Selenium Options As noted within the keyword documentation for [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser), 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 [ast.literal\_eval](https://docs.python.org/3/library/ast.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#type-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 [raw strings](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) 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 [Chromium Embedded Framework](https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver) . 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 [the Selenium documentation](https://www.selenium.dev/documentation/webdriver/drivers/service/) . 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript). 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) keyword or with the `timeout` argument when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) keyword or with the `implicit_wait` argument when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library. See [Selenium documentation](https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp) for more information about this functionality. See [time format](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library with the `page_load_timeout` argument or by using the [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) keyword. See [time format](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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 [Robot Framework User Guide](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format). ## 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) keyword, but this can be changed either by using the [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) keyword or with the `run_on_failure` argument when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments)) such as `NONE`. ## Boolean arguments Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the boolean conversion based on keyword arguments [type hint](https://docs.python.org/3/library/typing.html). More details in Robot Framework [user guide](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions) Please note SeleniumLibrary 3 and 4 did have own custom methods to covert arguments to boolean values. ## EventFiringWebDriver The SeleniumLibrary offers support for [EventFiringWebDriver](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver). See the Selenium and SeleniumLibrary [EventFiringWebDriver support](https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver) 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 [Selenium tool is not thread-safe](https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-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 [plugin API](https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins) 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 [module search path](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path) for Python packages starting with robotframework-seleniumlibrary-translation by using the [Python pluging API](https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/). 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 [json](https://www.json.org/json-en.html) 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 [robotframework-seleniumlibrary-translation-fi](https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi) repository. ## Importing #### Arguments timeout \= 0:00:05 implicit\_wait \= 0:00:00 run\_on\_failure \= Capture Page Screenshot screenshot\_root\_directory \= None [str]("Click to show type information") \| [None]("Click to show type information") plugins \= None [str]("Click to show type information") \| [None]("Click to show type information") event\_firing\_webdriver \= None [str]("Click to show type information") \| [None]("Click to show type information") page\_load\_timeout \= 0:05:00 action\_chain\_delay \= 0:00:00.250000 language \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation SeleniumLibrary can be imported with several optional arguments. - `timeout`: Default value for timeouts used with `Wait ...` keywords. - `implicit_wait`: Default value for [implicit wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20wait) used when locating elements. - `run_on_failure`: Default action for the [run-on-failure functionality](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Run-on-failure%20functionality). - `screenshot_root_directory`: Path to folder where possible screenshots are created or EMBED or BASE64. See [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) keyword for further details about EMBED and BASE64. 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 [EventFiringWebDriver](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver) - `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. ## Keywords ## [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie "Link to this keyword") #### Arguments name [str]("Click to show type information") value [str]("Click to show type information") path \= None [str]("Click to show type information") \| [None]("Click to show type information") domain \= None [str]("Click to show type information") \| [None]("Click to show type information") secure \= None [bool]("Click to show type information") \| [None]("Click to show type information") expiry \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Adds a cookie to your current session. `name` and `value` are required, `path`, `domain`, `secure` and `expiry` are optional. Expiry supports the same formats as the [DateTime](http://robotframework.org/robotframework/latest/libraries/DateTime.html) library or an epoch timestamp. Example: | | | | | | |---|---|---|---|---| | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | | | | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | domain=example.com | | | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | expiry=2027-09-28 16:21:35 | \# Expiry as timestamp. | | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | expiry=1822137695 | \# Expiry as epoch seconds. | Prior to SeleniumLibrary 3.0 setting expiry did not work. ## [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy "Link to this keyword") #### Arguments strategy\_name [str]("Click to show type information") strategy\_keyword [str]("Click to show type information") persist \= False [bool]("Click to show type information") #### Documentation Adds a custom location strategy. See [Custom locators](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Custom%20locators) for information on how to create and use custom strategies. [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy) can be used to remove a registered strategy. Location strategies are automatically removed after leaving the current scope by default. Setting `persist` to a true value (see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments)) will cause the location strategy to stay registered throughout the life of the test. ## [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present "Link to this keyword") #### Arguments text \= [str]("Click to show type information") action \= ACCEPT [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that an alert is present and by default, accepts it. Fails if no alert is present. If `text` is a non-empty string, then it is used to verify alert's message. The alert is accepted by default, but that behavior can be controlled by using the `action` argument same way as with [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert). `timeout` specifies how long to wait for the alert to appear. If it is not given, the global default [timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) is used instead. `action` and `timeout` arguments are new in SeleniumLibrary 3.0. In earlier versions, the alert was always accepted and a timeout was hardcoded to one second. ## [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present "Link to this keyword") #### Arguments action \= ACCEPT [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that no alert is present. If the alert actually exists, the `action` argument determines how it should be handled. By default, the alert is accepted, but it can be also dismissed or left open the same way as with the [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) keyword. `timeout` specifies how long to wait for the alert to appear. By default, is not waited for the alert at all, but a custom time can be given if alert may be delayed. See the [time format](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) section for information about the syntax. New in SeleniumLibrary 3.0. ## [Assign Id To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] id [str]("Click to show type information") #### Documentation Assigns a temporary `id` to the element specified by `locator`. This is mainly useful if the locator is complicated and/or slow XPath expression and it is needed multiple times. Identifier expires when the page is reloaded. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | |---|---|---| | [Assign ID to Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element) | //ul\[@class='example' and ./li\[contains(., 'Stuff')\]\] | my id | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | my id | | ## [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] filename \= selenium-element-screenshot-{index}.png [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Captures a screenshot from the element identified by `locator` and embeds it into log file. See [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) for details about `filename` argument. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. An absolute path to the created element screenshot is returned. If the `filename` equals to BASE64 (case insensitive), then the base64 string is returned in addition to the screenshot embedded to the log. See `Capture Page Screenshot` for more information. Support for capturing the screenshot from an element has limited support among browser vendors. Please check the browser vendor driver documentation does the browser support capturing a screenshot from an element. New in SeleniumLibrary 3.3. Support for EMBED is new in SeleniumLibrary 4.2. Support for BASE64 is new in SeleniumLibrary 6.8. Examples: | | | | | |---|---|---|---| | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | | | | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | \${OUTPUTDIR}/id\_image\_id-1.png | | | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | EMBED | | | \${ess}= | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | BASE64 | ## [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot "Link to this keyword") #### Arguments filename \= selenium-screenshot-{index}.png [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Takes a screenshot of the current page and embeds it into a log file. `filename` argument specifies the name of the file to write the screenshot into. The directory where screenshots are saved can be set when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library or by using the [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) keyword. If the directory is not configured, screenshots are saved to the same directory where Robot Framework's log file is written. If `filename` equals to EMBED (case insensitive), then screenshot is embedded as Base64 image to the log.html. In this case file is not created in the filesystem. If `filename` equals to BASE64 (case insensitive), then the base64 string is returned and the screenshot is embedded to the log. This allows one to reuse the image elsewhere in the report. Example: | | | | |---|---|---| | \${ss}= | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | BASE64 | | Set Test Message | \*HTML\*Test Success\<p\>\<img src="data:image/png;base64,\${ss}" width="256px"\> | | Starting from SeleniumLibrary 1.8, if `filename` contains marker `{index}`, it will be automatically replaced with an unique running index, preventing files to be overwritten. Indices start from 1, and how they are represented can be customized using Python's [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax). An absolute path to the created screenshot file is returned or if `filename` equals to EMBED, word EMBED is returned. If `filename` equals to BASE64, the base64 string containing the screenshot is returned. Support for BASE64 is new in SeleniumLibrary 6.8 Examples: | | | |---|---| | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | | | File Should Exist | \${OUTPUTDIR}/selenium-screenshot-1.png | | \${path} = | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | | File Should Exist | \${OUTPUTDIR}/selenium-screenshot-2.png | | File Should Exist | \${path} | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | custom\_name.png | | File Should Exist | \${OUTPUTDIR}/custom\_name.png | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | custom\_with\_index\_{index}.png | | File Should Exist | \${OUTPUTDIR}/custom\_with\_index\_1.png | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | formatted\_index\_{index:03}.png | | File Should Exist | \${OUTPUTDIR}/formatted\_index\_001.png | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | EMBED | | File Should Not Exist | EMBED | ## [Checkbox Should Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Be%20Selected "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies checkbox `locator` is selected/checked. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Checkbox Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Not%20Be%20Selected "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies checkbox `locator` is not selected/checked. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] file\_path [str]("Click to show type information") #### Documentation Inputs the `file_path` into the file input field `locator`. This keyword is most often used to input files into upload forms. The keyword does not check `file_path` is the file or folder available on the machine where tests are executed. If the `file_path` points at a file and when using Selenium Grid, Selenium will [magically](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.command.html?highlight=upload#selenium.webdriver.remote.command.Command.UPLOAD_FILE), transfer the file from the machine where the tests are executed to the Selenium Grid node where the browser is running. Then Selenium will send the file path, from the nodes file system, to the browser. That `file_path` is not checked, is new in SeleniumLibrary 4.0. Example: | | | | |---|---|---| | [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) | my\_upload\_field | \${CURDIR}/trades.csv | ## [Clear Element Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Clear%20Element%20Text "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Clears the value of the text-input-element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] modifier \= False [bool]("Click to show type information") \| [str]("Click to show type information") #### Documentation Clicks the button identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, buttons are searched using `id`, `name`, and `value`. See the [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) keyword for details about the `modifier` argument. The `modifier` argument is new in SeleniumLibrary 3.3 ## [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] modifier \= False [bool]("Click to show type information") \| [str]("Click to show type information") action\_chain \= False [bool]("Click to show type information") #### Documentation Click the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `modifier` argument can be used to pass [Selenium Keys](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys) when clicking the element. The \+ can be used as a separator for different Selenium Keys. The CTRL is internally translated to the CONTROL key. The `modifier` is space and case insensitive, example "alt" and " aLt " are supported formats to [ALT key](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ALT) . If `modifier` does not match to Selenium Keys, keyword fails. If `action_chain` argument is true, see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details on how to set boolean argument, then keyword uses ActionChain based click instead of the \<web\_element\>.click() function. If both `action_chain` and `modifier` are defined, the click will be performed using `modifier` and `action_chain` will be ignored. Example: | | | | | |---|---|---|---| | Click Element | id:button | | \# Would click element without any modifiers. | | Click Element | id:button | CTRL | \# Would click element with CTLR key pressed down. | | Click Element | id:button | CTRL+ALT | \# Would click element with CTLR and ALT keys pressed down. | | Click Element | id:button | action\_chain=True | \# Clicks the button using an Selenium ActionChains | The `modifier` argument is new in SeleniumLibrary 3.2 The `action_chain` argument is new in SeleniumLibrary 4.1 ## [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] xoffset [int]("Click to show type information") yoffset [int]("Click to show type information") #### Documentation Click the element `locator` at `xoffset/yoffset`. The Cursor is moved and the center of the element and x/y coordinates are calculated from that point. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] modifier \= False [bool]("Click to show type information") \| [str]("Click to show type information") #### Documentation Clicks an image identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. See the [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) keyword for details about the `modifier` argument. The `modifier` argument is new in SeleniumLibrary 3.3 ## [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] modifier \= False [bool]("Click to show type information") \| [str]("Click to show type information") #### Documentation Clicks a link identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. See the [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) keyword for details about the `modifier` argument. The `modifier` argument is new in SeleniumLibrary 3.3 ## [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers "Link to this keyword") #### Documentation Closes all open browsers and resets the browser cache. After this keyword, new indexes returned from [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keyword are reset to 1. This keyword should be used in test or suite teardown to make sure all browsers are closed. ## [Close Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20Browser "Link to this keyword") #### Documentation Closes the current browser. ## [Close Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20Window "Link to this keyword") #### Documentation Closes currently opened and selected browser window/tab. ## [Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Will cover elements identified by `locator` with a blue div without breaking page layout. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.3.0 Example: \|[Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element) \| css:div\#container \| ## [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver "Link to this keyword") #### Arguments driver\_name [str]("Click to show type information") alias \= None [str]("Click to show type information") \| [None]("Click to show type information") kwargs \= None [dict]("Click to show type information") \| [None]("Click to show type information") \*\* init\_kwargs #### Return Type [str]("Click to show type information") #### Documentation Creates an instance of Selenium WebDriver. Like [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser), but allows passing arguments to the created WebDriver instance directly. This keyword should only be used if the functionality provided by [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) is not adequate. `driver_name` must be a WebDriver implementation name like Firefox, Chrome, Ie, Edge, Safari, or Remote. The initialized WebDriver can be configured either with a Python dictionary `kwargs` or by using keyword arguments `**init_kwargs`. These arguments are passed directly to WebDriver without any processing. See [Selenium API documentation](https://seleniumhq.github.io/selenium/docs/api/py/api.html) for details about the supported arguments. Examples: | | | | | |---|---|---|---| | \# Use proxy with Firefox | | | | | \${proxy}= | Evaluate | selenium.webdriver.Proxy() | modules=selenium, selenium.webdriver | | \${proxy.http\_proxy}= | Set Variable | localhost:8888 | | | [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) | Firefox | proxy=\${proxy} | | Returns the index of this browser instance which can be used later to switch back to it. Index starts from 1 and is reset back to it when [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) keyword is used. See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for an example. ## [Current Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Contain "Link to this keyword") #### Arguments text [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that the current frame contains `text`. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. Prior to SeleniumLibrary 3.0 this keyword was named Current Frame Contains. ## [Current Frame Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Not%20Contain "Link to this keyword") #### Arguments text [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that the current frame does not contain `text`. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. ## [Delete All Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Delete%20All%20Cookies "Link to this keyword") #### Documentation Deletes all cookies. ## [Delete Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Delete%20Cookie "Link to this keyword") #### Arguments name #### Documentation Deletes the cookie matching `name`. If the cookie is not found, nothing happens. ## [Double Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Double%20Click%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Double clicks the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] target WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Drags the element identified by `locator` into the `target` element. The `locator` argument is the locator of the dragged element and the `target` is the locator of the target. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | |---|---|---| | [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop) | css:div\#element | css:div.target | ## [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] xoffset [int]("Click to show type information") yoffset [int]("Click to show type information") #### Documentation Drags the element identified with `locator` by `xoffset/yoffset`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The element will be moved by `xoffset` and `yoffset`, each of which is a negative or positive number specifying the offset. Example: | | | | | | |---|---|---|---|---| | [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) | myElem | 50 | \-35 | \# Move myElem 50px right and 35px down | ## [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] attribute [str]("Click to show type information") expected [None]("Click to show type information") \| [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies element identified by `locator` contains expected attribute value. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) \| css:img \| href \| value New in SeleniumLibrary 3.2. ## [Element Should Be Disabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Disabled "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies that element identified by `locator` is disabled. This keyword considers also elements that are read-only to be disabled. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Element Should Be Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Enabled "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies that element identified by `locator` is enabled. This keyword considers also elements that are read-only to be disabled. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Element Should Be Focused](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Focused "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies that element identified by `locator` is focused. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.0. ## [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that the element identified by `locator` is visible. Herein, visible means that the element is logically visible, not optically visible in the current browser viewport. For example, an element that carries `display:none` is not logically visible, so using this keyword on that element would fail. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. ## [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [None]("Click to show type information") \| [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") ignore\_case \= False [bool]("Click to show type information") #### Documentation Verifies that element `locator` contains text `expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. New in SeleniumLibrary 3.1. `ignore_case` argument is new in SeleniumLibrary 3.1. Use [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) if you want to match the exact text, not a substring. ## [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that the element identified by `locator` is NOT visible. Passes if the element does not exists. See [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) for more information about visibility and supported arguments. ## [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [None]("Click to show type information") \| [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") ignore\_case \= False [bool]("Click to show type information") #### Documentation Verifies that element `locator` does not contain text `expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. `ignore_case` argument new in SeleniumLibrary 3.1. ## [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [None]("Click to show type information") \| [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") ignore\_case \= False [bool]("Click to show type information") #### Documentation Verifies that element `locator` contains exact the text `expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. `ignore_case` argument is new in SeleniumLibrary 3.1. Use [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) if a substring match is desired. ## [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] not\_expected [None]("Click to show type information") \| [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") ignore\_case \= False [bool]("Click to show type information") #### Documentation Verifies that element `locator` does not contain exact the text `not_expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. New in SeleniumLibrary 3.1.1 ## [Execute Async Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript "Link to this keyword") #### Arguments \* code [Any]("Click to show type information") #### Return Type [Any]("Click to show type information") #### Documentation Executes asynchronous JavaScript code with possible arguments. Similar to [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) except that scripts executed with this keyword must explicitly signal they are finished by invoking the provided callback. This callback is always injected into the executed function as the last argument. Scripts must complete within the script timeout or this keyword will fail. See the [Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) section for more information. Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript [arguments](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_async_script) as part of `code` argument. See [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) for more details. Examples: | | | | |---|---|---| | [Execute Async JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) | var callback = arguments\[arguments.length - 1\]; window.setTimeout(callback, 2000); | | | [Execute Async JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) | \${CURDIR}/async\_js\_to\_execute.js | | | \${result} = | [Execute Async JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) | | | ... | var callback = arguments\[arguments.length - 1\]; | | | ... | function answer(){callback("text");}; | | | ... | window.setTimeout(answer, 2000); | | | Should Be Equal | \${result} | text | ## [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript "Link to this keyword") #### Arguments \* code [Any]("Click to show type information") #### Return Type [Any]("Click to show type information") #### Documentation Executes the given JavaScript code with possible arguments. `code` may be divided into multiple cells in the test data and `code` may contain multiple lines of code and arguments. In that case, the JavaScript code parts are concatenated together without adding spaces and optional arguments are separated from `code`. If `code` is a path to an existing file, the JavaScript to execute will be read from that file. Forward slashes work as a path separator on all operating systems. The JavaScript executes in the context of the currently selected frame or window as the body of an anonymous function. Use `window` to refer to the window of your application and `document` to refer to the document object of the current frame or window, e.g. `document.getElementById('example')`. This keyword returns whatever the executed JavaScript code returns. Return values are converted to the appropriate Python types. Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript [arguments](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_script) as part of `code` argument. The JavaScript code and arguments must be separated with JAVASCRIPT and ARGUMENTS markers and must be used exactly with this format. If the Javascript code is first, then the JAVASCRIPT marker is optional. The order of JAVASCRIPT and ARGUMENTS markers can be swapped, but if ARGUMENTS is the first marker, then JAVASCRIPT marker is mandatory. It is only allowed to use JAVASCRIPT and ARGUMENTS markers only one time in the `code` argument. Examples: | | | | | | |---|---|---|---|---| | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | window.myFunc('arg1', 'arg2') | | | | | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | \${CURDIR}/js\_to\_execute.js | | | | | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | alert(arguments\[0\]); | ARGUMENTS | 123 | | | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | ARGUMENTS | 123 | JAVASCRIPT | alert(arguments\[0\]); | ## [Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Frame%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] text [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that frame identified by `locator` contains `text`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. ## [Get Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Action%20Chain%20Delay "Link to this keyword") #### Documentation Gets the currently stored value for chain\_delay\_value in timestr format. ## [Get All Links](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20All%20Links "Link to this keyword") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns a list containing ids of all links found in current page. If a link has no id, an empty string will be in the list instead. ## [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases "Link to this keyword") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns aliases of all active browser that has an alias as NormalizedDict. The dictionary contains the aliases as keys and the index as value. This can be accessed as dictionary `${aliases.key}` or as list `@{aliases}[0]`. Example: | | | | | |---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <https://example.com> | alias=BrowserA | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <https://example.com> | alias=BrowserB | | | &{aliases} | [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases) | | \# &{aliases} = { BrowserA=1\|BrowserB=2 } | | Log | \${aliases.BrowserA} | | \# logs `1` | | FOR | \${alias} | IN | @{aliases} | | | Log | \${alias} | \# logs `BrowserA` and `BrowserB` | | END | | | | See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for more information and examples. New in SeleniumLibrary 4.0 ## [Get Browser Ids](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Ids "Link to this keyword") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns index of all active browser as list. Example: | | | | | |---|---|---|---| | @{browser\_ids}= | Get Browser Ids | | | | FOR | \${id} | IN | @{browser\_ids} | | | @{window\_titles}= | Get Window Titles | browser=\${id} | | | Log | Browser \${id} has these windows: \${window\_titles} | | | END | | | | See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for more information and examples. New in SeleniumLibrary 4.0 ## [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie "Link to this keyword") #### Arguments name [str]("Click to show type information") #### Return Type CookieInformation #### Documentation Returns information of cookie with `name` as an object. If no cookie is found with `name`, keyword fails. The cookie object contains details about the cookie. Attributes available in the object are documented in the table below. | Attribute | Explanation | |---|---| | name | The name of a cookie. | | value | Value of the cookie. | | path | Indicates a URL path, for example `/`. | | domain | The domain, the cookie is visible to. | | secure | When true, the cookie is only used with HTTPS connections. | | httpOnly | When true, the cookie is not accessible via JavaScript. | | expiry | Python datetime object indicating when the cookie expires. | | extra | Possible attributes outside of the WebDriver specification | See the [WebDriver specification](https://w3c.github.io/webdriver/#cookies) for details about the cookie information. Notice that `expiry` is specified as a [datetime object](https://docs.python.org/3/library/datetime.html#datetime.datetime), not as seconds since Unix Epoch like WebDriver natively does. In some cases, example when running a browser in the cloud, it is possible that the cookie contains other attributes than is defined in the [WebDriver specification](https://w3c.github.io/webdriver/#cookies). These other attributes are available in an `extra` attribute in the cookie object and it contains a dictionary of the other attributes. The `extra` attribute is new in SeleniumLibrary 4.0. Example: | | | | |---|---|---| | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | | \${cookie} = | [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie) | foo | | Should Be Equal | \${cookie.name} | foo | | Should Be Equal | \${cookie.value} | bar | | Should Be True | \${cookie.expiry.year} \> 2017 | | New in SeleniumLibrary 3.0. ## [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies "Link to this keyword") #### Arguments as\_dict \= False [bool]("Click to show type information") #### Return Type [str]("Click to show type information") \| [dict]("Click to show type information") #### Documentation Returns all cookies of the current page. If `as_dict` argument evaluates as false, see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details, then cookie information is returned as a single string in format `name1=value1; name2=value2; name3=value3`. When `as_dict` argument evaluates as true, cookie information is returned as Robot Framework dictionary format. The string format can be used, for example, for logging purposes or in headers when sending HTTP requests. The dictionary format is helpful when the result can be passed to requests library's Create Session keyword's optional cookies parameter. The \` as\_dict\` argument is new in SeleniumLibrary 3.3 ## [Get Dom Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] attribute [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Returns the value of `attribute` from the element `locator`. [Get DOM Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) keyword only returns attributes declared within the element's HTML markup. If the requested attribute is not there, the keyword returns \${None}. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | | |---|---|---|---| | \${id}= | [Get DOM Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) | css:h1 | id | ## [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] attribute [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Returns the value of `attribute` from the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | | |---|---|---|---| | \${id}= | [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute) | css:h1 | id | Passing attribute name as part of the `locator` was removed in SeleniumLibrary 3.2. The explicit `attribute` argument should be used instead. ## [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [int]("Click to show type information") #### Documentation Returns the number of elements matching `locator`. If you wish to assert the number of matching elements, use [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) with `limit` argument. Keyword will always return an integer. Example: | | | | |---|---|---| | \${count} = | [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) | name:div\_name | | Should Be True | \${count} \> 2 | | New in SeleniumLibrary 3.0. ## [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [Tuple]("Click to show type information") \[[int]("Click to show type information"), [int]("Click to show type information")\] #### Documentation Returns width and height of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Both width and height are returned as integers. Example: | | | | | |---|---|---|---| | \${width} | \${height} = | [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) | css:div\#container | ## [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [int]("Click to show type information") #### Documentation Returns the horizontal position of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The position is returned in pixels off the left side of the page, as an integer. See also [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position). ## [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] values \= False [bool]("Click to show type information") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns all labels or values of selection list `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Returns visible labels by default, but values can be returned by setting the `values` argument to a true value (see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments)). Example: | | | | | |---|---|---|---| | \${labels} = | [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) | mylist | | | \${values} = | [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) | css:\#example select | values=True | Support to return values is new in SeleniumLibrary 3.0. ## [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Returns the current browser window URL. ## [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations "Link to this keyword") #### Arguments browser \= CURRENT [str]("Click to show type information") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns and logs URLs of all windows of the selected browser. **Browser Scope:** The `browser` argument specifies the browser that shall return its windows information. - `browser` can be `index_or_alias` like in [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser). - If `browser` is `CURRENT` (default, case-insensitive) the currently active browser is selected. - If `browser` is `ALL` (case-insensitive) the window information of all windows of all opened browsers are returned. ## [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] property [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Returns the value of `property` from the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | | |---|---|---|---| | \${text\_length}= | [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property) | css:h1 | text\_length | ## [Get Selected List Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Label "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [str]("Click to show type information") #### Documentation Returns the label of selected option from selection list `locator`. If there are multiple selected options, the label of the first option is returned. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get Selected List Labels](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Labels "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns labels of selected options from selection list `locator`. Starting from SeleniumLibrary 3.0, returns an empty list if there are no selections. In earlier versions, this caused an error. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get Selected List Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [str]("Click to show type information") #### Documentation Returns the value of selected option from selection list `locator`. If there are multiple selected options, the value of the first option is returned. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get Selected List Values](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Values "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns values of selected options from selection list `locator`. Starting from SeleniumLibrary 3.0, returns an empty list if there are no selections. In earlier versions, this caused an error. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Implicit%20Wait "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Gets the implicit wait value used by Selenium. The value is returned as a human-readable string like `1 second`. See the [Implicit wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20wait) section above for more information. ## [Get Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Page%20Load%20Timeout "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Gets the time to wait for a page load to complete before raising a timeout exception. The value is returned as a human-readable string like `1 second`. See the [Page load](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20load) section above for more information. New in SeleniumLibrary 6.1 ## [Get Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Speed "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Gets the delay that is waited after each Selenium command. The value is returned as a human-readable string like `1 second`. See the [Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Selenium%20speed) section above for more information. ## [Get Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Timeout "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Gets the timeout that is used by various keywords. The value is returned as a human-readable string like `1 second`. See the [Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) section above for more information. ## [Get Session Id](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Session%20Id "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Returns the currently active browser session id. New in SeleniumLibrary 3.2 ## [Get Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Returns the entire HTML source of the current page or frame. ## [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] row [int]("Click to show type information") column [int]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Returns contents of a table cell. The table is located using the `locator` argument and its cell found using `row` and `column`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Both row and column indexes start from 1, and header and footer rows are included in the count. It is possible to refer to rows and columns from the end by using negative indexes so that -1 is the last row/column, -2 is the second last, and so on. All `<th>` and `<td>` elements anywhere in the table are considered to be cells. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. ## [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [str]("Click to show type information") #### Documentation Returns the text value of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Title "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Returns the title of the current page. ## [Get Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [str]("Click to show type information") #### Documentation Returns the value attribute of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [int]("Click to show type information") #### Documentation Returns the vertical position of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The position is returned in pixels off the top of the page, as an integer. See also [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position). ## [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type WebElement #### Documentation Returns the first WebElement matching the given `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Get WebElements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElements "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [List]("Click to show type information") \[ WebElement \] #### Documentation Returns a list of WebElement objects matching the `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Starting from SeleniumLibrary 3.0, the keyword returns an empty list if there are no matching elements. In previous releases, the keyword failed in this case. ## [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles "Link to this keyword") #### Arguments browser \= CURRENT [str]("Click to show type information") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns all child window handles of the selected browser as a list. Can be used as a list of windows to exclude with Select Window. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). Prior to SeleniumLibrary 3.0, this keyword was named List Windows. ## [Get Window Identifiers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Identifiers "Link to this keyword") #### Arguments browser \= CURRENT [str]("Click to show type information") #### Return Type [List]("Click to show type information") #### Documentation Returns and logs id attributes of all windows of the selected browser. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). ## [Get Window Names](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Names "Link to this keyword") #### Arguments browser \= CURRENT [str]("Click to show type information") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns and logs names of all windows of the selected browser. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). ## [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position "Link to this keyword") #### Return Type [Tuple]("Click to show type information") \[[int]("Click to show type information"), [int]("Click to show type information")\] #### Documentation Returns current window position. The position is relative to the top left corner of the screen. Returned values are integers. See also [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position). Example: | | | | |---|---|---| | \${x} | \${y}= | [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position) | ## [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size "Link to this keyword") #### Arguments inner \= False [bool]("Click to show type information") #### Return Type [Tuple]("Click to show type information") \[[float]("Click to show type information"), [float]("Click to show type information")\] #### Documentation Returns current window width and height as integers. See also [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size). If `inner` parameter is set to True, keyword returns HTML DOM window.innerWidth and window.innerHeight properties. See [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details on how to set boolean arguments. The `inner` is new in SeleniumLibrary 4.0. Example: | | | | | |---|---|---|---| | \${width} | \${height}= | [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) | | | \${width} | \${height}= | [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) | True | ## [Get Window Titles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Titles "Link to this keyword") #### Arguments browser \= CURRENT [str]("Click to show type information") #### Return Type [List]("Click to show type information") \[[str]("Click to show type information")\] #### Documentation Returns and logs titles of all windows of the selected browser. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). ## [Go Back](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20Back "Link to this keyword") #### Documentation Simulates the user clicking the back button on their browser. ## [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To "Link to this keyword") #### Arguments url #### Documentation Navigates the current browser window to the provided `url`. ## [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert "Link to this keyword") #### Arguments action \= ACCEPT [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") #### Documentation Handles the current alert and returns its message. By default, the alert is accepted, but this can be controlled with the `action` argument that supports the following case-insensitive values: - `ACCEPT`: Accept the alert i.e. press `Ok`. Default. - `DISMISS`: Dismiss the alert i.e. press `Cancel`. - `LEAVE`: Leave the alert open. The `timeout` argument specifies how long to wait for the alert to appear. If it is not given, the global default [timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) is used instead. Examples: | | | | | |---|---|---|---| | Handle Alert | | | \# Accept alert. | | Handle Alert | action=DISMISS | | \# Dismiss alert. | | Handle Alert | timeout=10 s | | \# Use custom timeout and accept alert. | | Handle Alert | DISMISS | 1 min | \# Use custom timeout and dismiss alert. | | \${message} = | Handle Alert | | \# Accept alert and get its message. | | \${message} = | Handle Alert | LEAVE | \# Leave alert open and get its message. | New in SeleniumLibrary 3.0. ## [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] password [str]("Click to show type information") clear \= True [bool]("Click to show type information") #### Documentation Types the given password into the text field identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) for `clear` argument details. Difference compared to [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) is that this keyword does not log the given password on the INFO level. Notice that if you use the keyword like | | | | |---|---|---| | Input Password | password\_field | password | the password is shown as a normal keyword argument. A way to avoid that is using variables like | | | | |---|---|---| | Input Password | password\_field | \${PASSWORD} | Please notice that Robot Framework logs all arguments using the TRACE level and tests must not be executed using level below DEBUG if the password should not be logged in any format. The clear argument is new in SeleniumLibrary 4.0. Hiding password logging from Selenium logs is new in SeleniumLibrary 4.2. ## [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] text [str]("Click to show type information") clear \= True [bool]("Click to show type information") #### Documentation Types the given `text` into the text field identified by `locator`. When `clear` is true, the input element is cleared before the text is typed into the element. When false, the previous text is not cleared from the element. Use [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) if you do not want the given `text` to be logged. If [Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) is used and the `text` argument points to a file in the file system, then this keyword prevents the Selenium to transfer the file to the Selenium Grid hub. Instead, this keyword will send the `text` string as is to the element. If a file should be transferred to the hub and upload should be performed, please use [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) keyword. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See the [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) section how Boolean values are handled. Disabling the file upload the Selenium Grid node and the clear argument are new in SeleniumLibrary 4.0 ## [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert "Link to this keyword") #### Arguments text [str]("Click to show type information") action \= ACCEPT [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") #### Documentation Types the given `text` into an input field in an alert. The alert is accepted by default, but that behavior can be controlled by using the `action` argument same way as with [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert). `timeout` specifies how long to wait for the alert to appear. If it is not given, the global default [timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) is used instead. New in SeleniumLibrary 3.0. ## [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* expected [str]("Click to show type information") #### Documentation Verifies selection list `locator` has `expected` options selected. It is possible to give expected options both as visible labels and as values. Starting from SeleniumLibrary 3.0, mixing labels and values is not possible. Order of the selected options is not validated. If no expected options are given, validates that the list has no selections. A more explicit alternative is using [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections). See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Examples: | | | | | |---|---|---|---| | [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) | gender | Female | | | [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) | interests | Test Automation | Python | ## [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies selection list `locator` has no options selected. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be "Link to this keyword") #### Arguments url [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that the current URL is exactly `url`. The `url` argument contains the exact url that should exist in browser. The `message` argument can be used to override the default error message. `message` argument is new in SeleniumLibrary 3.2.0. ## [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain "Link to this keyword") #### Arguments expected [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that the current URL contains `expected`. The `expected` argument contains the expected value in url. The `message` argument can be used to override the default error message. `message` argument is new in SeleniumLibrary 3.2.0. ## [Log Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Location "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Logs and returns the current browser window URL. ## [Log Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Source "Link to this keyword") #### Arguments loglevel \= INFO [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Logs and returns the HTML source of the current page or frame. The `loglevel` argument defines the used log level. Valid log levels are `WARN`, `INFO` (default), `DEBUG`, `TRACE` and `NONE` (no logging). ## [Log Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Title "Link to this keyword") #### Return Type [str]("Click to show type information") #### Documentation Logs and returns the title of the current page. ## [Maximize Browser Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Maximize%20Browser%20Window "Link to this keyword") #### Documentation Maximizes current browser window. ## [Minimize Browser Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Minimize%20Browser%20Window "Link to this keyword") #### Documentation Minimizes current browser window. ## [Mouse Down](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates pressing the left mouse button on the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The element is pressed without releasing the mouse button. See also the more specific keywords [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image) and [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link). ## [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates a mouse down event on an image identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. ## [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates a mouse down event on a link identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. ## [Mouse Out](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Out "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates moving the mouse away from the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Mouse Over](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Over "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates hovering the mouse over the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Mouse Up](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Up "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates releasing the left mouse button on the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser "Link to this keyword") #### Arguments url \= None [str]("Click to show type information") \| [None]("Click to show type information") browser \= firefox [str]("Click to show type information") alias \= None [str]("Click to show type information") \| [None]("Click to show type information") remote\_url \= False [bool]("Click to show type information") \| [str]("Click to show type information") desired\_capabilities \= None [dict]("Click to show type information") \| [None]("Click to show type information") \| [str]("Click to show type information") ff\_profile\_dir \= None FirefoxProfile \| [str]("Click to show type information") \| [None]("Click to show type information") options \= None [Any]("Click to show type information") service\_log\_path \= None [str]("Click to show type information") \| [None]("Click to show type information") executable\_path \= None [str]("Click to show type information") \| [None]("Click to show type information") service \= None [Any]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Opens a new browser instance to the optional `url`. The `browser` argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names. | Browser | Name(s) | |---|---| | Firefox | firefox, ff | | Google Chrome | googlechrome, chrome, gc | | Headless Firefox | headlessfirefox | | Headless Chrome | headlesschrome | | Internet Explorer | internetexplorer, ie | | Edge | edge | | Safari | safari | To be able to actually use one of these browsers, you need to have a matching Selenium browser driver available. See the [project documentation](https://github.com/robotframework/SeleniumLibrary#browser-drivers) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Chrome | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Firefox | alias=Firefox | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Edge | remote\_url=http://127.0.0.1:4444/wd/hub | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | about:blank | | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keywords, the first keyword will open a new browser, but the second one will switch to the already opened browser and will not open a new browser. The `alias` definition overrules `browser` definition. When same `alias` is used but a different `browser` is defined, then switch to a browser with same alias is done and new browser is not opened. An alternative approach for switching is using an index returned by this keyword. These indices start from 1, are incremented when new browsers are opened, and reset back to 1 when [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) is called. See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for more information and examples. Alias examples: | | | | | | | |---|---|---|---|---|---| | \${1\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Chrome | alias=Chrome | \# Opens new browser because alias is new. | | \${2\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Firefox | | \# Opens new browser because alias is not defined. | | \${3\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Chrome | alias=Chrome | \# Switches to the browser with Chrome alias. | | \${4\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <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 [Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2). 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. The `ff_profile_dir` can also be an instance of the [selenium.webdriver.FirefoxProfile](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html) . As a third option, it is possible to use FirefoxProfile methods and attributes to define the profile using methods and attributes in the same way as with `options` argument. Example: It is possible to use FirefoxProfile set\_preference to define different profile settings. See `options` argument documentation in below how to handle backslash escaping. Example for FirefoxProfile | | | | | | |---|---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Firefox | ff\_profile\_dir=/path/to/profile | \# Using profile from disk. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Firefox | ff\_profile\_dir=\${FirefoxProfile\_instance} | \# Using instance of FirefoxProfile. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <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 [methods and attributes](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options) and for Firefox these [methods and attributes](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.options.html?highlight=firefox#selenium.webdriver.firefox.options.Options) 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 uses a Python like syntax to define Selenium options methods or attributes. Example when using [Chrome options](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options) method: | | | | | | |---|---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://example.com> | Chrome | options=add\_argument("--disable-popup-blocking"); add\_argument("--ignore-certificate-errors") | \# Sting format. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | None | Chrome | options=binary\_location="/path/to/binary";add\_argument("remote-debugging-port=port") | \# Start Chomium-based application. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | 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 [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax). 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 [\$PATH](https://en.wikipedia.org/wiki/PATH_\(variable\)). 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) to customize browser initialization even more. The `service` argument is new in SeleniumLibrary 6.4. ## [Open Context Menu](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Context%20Menu "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Opens the context menu on the element identified by `locator`. ## [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain "Link to this keyword") #### Arguments text [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that current page contains `text`. If this keyword fails, it automatically logs the page source using the log level specified with the optional `loglevel` 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) 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. ## [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies button `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, buttons are searched using `id`, `name`, and `value`. ## [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies checkbox `locator` is found from the current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") limit \= None [int]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that element `locator` is found on the current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `limit` argument can used to define how many elements the page should contain. When `limit` is `None` (default) page can contain one or more elements. When limit is a number, page must contain same number of elements. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. Examples assumes that locator matches to two elements. | | | | | |---|---|---|---| | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | limit=1 | \# Keyword fails. | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | limit=2 | \# Keyword passes. | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | limit=none | \# None is considered one or more. | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | | \# Same as above. | The `limit` argument is new in SeleniumLibrary 3.0. ## [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies image identified by `locator` is found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. ## [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies link identified by `locator` is found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. ## [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies selection list `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies radio button `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, radio buttons are searched using `id`, `name` and `value`. ## [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies text field `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Page Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain "Link to this keyword") #### Arguments text [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies the current page does not contain `text`. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. ## [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies button `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, buttons are searched using `id`, `name`, and `value`. ## [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies checkbox `locator` is not found from the current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that element `locator` is not found on the current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about `message` and `loglevel` arguments. ## [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies image identified by `locator` is not found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. ## [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies link identified by `locator` is not found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. ## [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies selection list `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies radio button `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, radio buttons are searched using `id`, `name` and `value`. ## [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] message \= None [str]("Click to show type information") \| [None]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies text field `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] key [str]("Click to show type information") #### Documentation Simulates user pressing key on element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `key` is either a single character, a string, or a numerical ASCII code of the key lead by '\\'. Examples: | | | | | |---|---|---|---| | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) | text\_field | q | | | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) | text\_field | abcde | | | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) | login\_button | \\13 | \# ASCII code for enter key | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) and [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) differ in the methods to simulate key presses. [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) uses the WebDriver SEND\_KEYS\_TO\_ELEMENT command using the selenium send\_keys method. Although one is not recommended over the other if [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) does not work we recommend trying [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys). ## [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys "Link to this keyword") #### Arguments locator \= None WebElement \| [None]("Click to show type information") \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* keys [str]("Click to show type information") #### Documentation Simulates the user pressing key(s) to an element or on the active browser. If `locator` evaluates as false, see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details, then the `keys` are sent to the currently active browser. Otherwise element is searched and `keys` are send to the element identified by the `locator`. In later case, keyword fails if element is not found. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `keys` arguments can contain one or many strings, but it can not be empty. `keys` can also be a combination of [Selenium Keys](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html) and strings or a single Selenium Key. If Selenium Key is combined with strings, Selenium key and strings must be separated by the \+ character, like in CONTROL+c. Selenium Keys are space and case sensitive and Selenium Keys are not parsed inside of the string. Example AALTO, would send string AALTO and ALT not parsed inside of the string. But A+ALT+O would found Selenium ALT key from the `keys` argument. It also possible to press many Selenium Keys down at the same time, example 'ALT+ARROW\_DOWN\`. If Selenium Keys are detected in the `keys` argument, keyword will press the Selenium Key down, send the strings and then release the Selenium Key. If keyword needs to send a Selenium Key as a string, then each character must be separated with \+ character, example E+N+D. CTRL is alias for [Selenium CONTROL](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.CONTROL) and ESC is alias for [Selenium ESCAPE](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ESCAPE) New in SeleniumLibrary 3.3 Examples: | | | | | | |---|---|---|---|---| | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | AAAAA | | \# Sends string "AAAAA" to element. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | None | BBBBB | | \# Sends string "BBBBB" to currently active browser. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | E+N+D | | \# Sends string "END" to element. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | XXX | YY | \# Sends strings "XXX" and "YY" to element. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | XXX+YY | | \# Same as above. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | ALT+ARROW\_DOWN | | \# Pressing "ALT" key down, then pressing ARROW\_DOWN and then releasing both keys. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | ALT | ARROW\_DOWN | \# Pressing "ALT" key and then pressing ARROW\_DOWN. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | CTRL+c | | \# Pressing CTRL key down, sends string "c" and then releases CTRL key. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | button | RETURN | | \# Pressing "ENTER" key to element. | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) and [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) differ in the methods to simulate key presses. [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) uses the Selenium/WebDriver Actions. [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) also has a more extensive syntax for describing keys, key combinations, and key actions. Although one is not recommended over the other if [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) does not work we recommend trying [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key). ## [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf "Link to this keyword") #### Arguments filename \= selenium-page-{index}.pdf [str]("Click to show type information") background \= None [bool]("Click to show type information") \| [None]("Click to show type information") margin\_bottom \= None [float]("Click to show type information") \| [None]("Click to show type information") margin\_left \= None [float]("Click to show type information") \| [None]("Click to show type information") margin\_right \= None [float]("Click to show type information") \| [None]("Click to show type information") margin\_top \= None [float]("Click to show type information") \| [None]("Click to show type information") orientation \= None [str]("Click to show type information") \| [None]("Click to show type information") page\_height \= None [float]("Click to show type information") \| [None]("Click to show type information") page\_ranges \= None [list]("Click to show type information") \| [None]("Click to show type information") page\_width \= None [float]("Click to show type information") \| [None]("Click to show type information") scale \= None [float]("Click to show type information") \| [None]("Click to show type information") shrink\_to\_fit \= None [bool]("Click to show type information") \| [None]("Click to show type information") #### Documentation 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. ## [Radio Button Should Be Set To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Be%20Set%20To "Link to this keyword") #### Arguments group\_name [str]("Click to show type information") value [str]("Click to show type information") #### Documentation Verifies radio button group `group_name` is set to `value`. `group_name` is the `name` of the radio button group. ## [Radio Button Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Not%20Be%20Selected "Link to this keyword") #### Arguments group\_name [str]("Click to show type information") #### Documentation Verifies radio button group `group_name` has no selection. `group_name` is the `name` of the radio button group. ## [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure "Link to this keyword") #### Arguments keyword [str]("Click to show type information") \| [None]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the keyword to execute, when a SeleniumLibrary keyword fails. `keyword` is the name of a keyword that will be executed if a SeleniumLibrary keyword fails. It is possible to use any available keyword, including user keywords or keywords from other libraries, but the keyword must not take any arguments. The initial keyword to use is set when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library, and the keyword that is used by default is [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot). Taking a screenshot when something failed is a very useful feature, but notice that it can slow down the execution. It is possible to use string `NOTHING` or `NONE`, case-insensitively, as well as Python `None` to disable this feature altogether. This keyword returns the name of the previously registered failure keyword or Python `None` if this functionality was previously disabled. The return value can be always used to restore the original value later. Example: | | | | |---|---|---| | [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) | Log Source | | | \${previous kw}= | [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) | NONE | | [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) | \${previous kw} | | Changes in SeleniumLibrary 3.0: - Possible to use string `NONE` or Python `None` to disable the functionality. - Return Python `None` when the functionality was disabled earlier. In previous versions special value `No Keyword` was returned and it could not be used to restore the original state. ## [Reload Page](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Reload%20Page "Link to this keyword") #### Documentation Simulates user reloading page. ## [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy "Link to this keyword") #### Arguments strategy\_name [str]("Click to show type information") #### Documentation Removes a previously added custom location strategy. See [Custom locators](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Custom%20locators) for information on how to create and use custom strategies. ## [Scroll Element Into View](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Scroll%20Element%20Into%20View "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Scrolls the element identified by `locator` into view. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.2.0 ## [Select All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20All%20From%20List "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Selects all options from multi-selection list `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Select Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Checkbox "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Selects the checkbox identified by `locator`. Does nothing if checkbox is already selected. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Sets frame identified by `locator` as the current frame. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Works both with frames and iframes. Use [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame) to cancel the frame selection and return to the main frame. Example: | | | | |---|---|---| | [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) | top-frame | \# Select frame with id or name 'top-frame' | | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | example | \# Click link 'example' in the selected frame | | [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame) | | \# Back to main frame. | | [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) | //iframe\[@name='xxx'\] | \# Select frame using xpath | ## [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* indexes [str]("Click to show type information") #### Documentation Selects options from selection list `locator` by `indexes`. Indexes of list options start from 0. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Select From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* labels [str]("Click to show type information") #### Documentation Selects options from selection list `locator` by `labels`. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Select From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* values [str]("Click to show type information") #### Documentation Selects options from selection list `locator` by `values`. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button "Link to this keyword") #### Arguments group\_name [str]("Click to show type information") value [str]("Click to show type information") #### Documentation Sets the radio button group `group_name` to `value`. The radio button to be selected is located by two arguments: - `group_name` is the name of the radio button group. - `value` is the `id` or `value` attribute of the actual radio button. Examples: | | | | |---|---|---| | [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button) | size | XL | | [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button) | contact | email | ## [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay "Link to this keyword") #### Arguments value [timedelta]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the duration of delay in ActionChains() used by SeleniumLibrary. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. Value is always stored as milliseconds internally. The previous value is returned and can be used to restore the original value later if needed. ## [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait "Link to this keyword") #### Arguments value [timedelta]("Click to show type information") #### Documentation Sets the implicit wait value used by Selenium. Same as [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) but only affects the current browser. ## [Set Focus To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Focus%20To%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Sets the focus to the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Prior to SeleniumLibrary 3.0 this keyword was named Focus. ## [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory "Link to this keyword") #### Arguments path [None]("Click to show type information") \| [str]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the directory for captured screenshots. `path` argument specifies the absolute path to a directory where the screenshots should be written to. If the directory does not exist, it will be created. The directory can also be set when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library. If it is not configured anywhere, screenshots are saved to the same directory where Robot Framework's log file is written. If `path` equals to EMBED (case insensitive) and [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) or [capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) keywords filename argument is not changed from the default value, then the page or element screenshot is embedded as Base64 image to the log.html. The previous value is returned and can be used to restore the original value later if needed. Returning the previous value is new in SeleniumLibrary 3.0. The persist argument was removed in SeleniumLibrary 3.2 and EMBED is new in SeleniumLibrary 4.2. ## [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait "Link to this keyword") #### Arguments value [timedelta]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the implicit wait value used by Selenium. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. This keyword sets the implicit wait for all opened browsers. Use [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait) to set it only to the current browser. See the [Implicit wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20wait) section above for more information. Example: | | | | |---|---|---| | \${orig wait} = | [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) | 10 seconds | | Perform AJAX call that is slow | | | | [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) | \${orig wait} | | ## [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout "Link to this keyword") #### Arguments value [timedelta]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the page load timeout value used by Selenium. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. In contrast to [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) and [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait), this keywords sets the time for the Webdriver to wait until the page is loaded before raising a timeout exception. See the [Page load](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20load) section above for more information. Example: | | | | |---|---|---| | \${orig page load timeout} = | [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) | 30 seconds | | Open page that loads slowly | | | | [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) | \${orig page load timeout} | | New in SeleniumLibrary 6.1 ## [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed "Link to this keyword") #### Arguments value [timedelta]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the delay that is waited after each Selenium command. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. See the [Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Selenium%20speed) section above for more information. Example: | | | |---|---| | [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) | 0\.5 seconds | ## [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout "Link to this keyword") #### Arguments value [timedelta]("Click to show type information") #### Return Type [str]("Click to show type information") #### Documentation Sets the timeout that is used by various keywords. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. See the [Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) section above for more information. Example: | | | | |---|---|---| | \${orig timeout} = | [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) | 15 seconds | | Open page that loads slowly | | | | [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) | \${orig timeout} | | ## [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position "Link to this keyword") #### Arguments x [int]("Click to show type information") y [int]("Click to show type information") #### Documentation Sets window position using `x` and `y` coordinates. The position is relative to the top left corner of the screen, but some browsers exclude possible task bar set by the operating system from the calculation. The actual position may thus be different with different browsers. Values can be given using strings containing numbers or by using actual numbers. See also [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position). Example: | | | | |---|---|---| | [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position) | 100 | 200 | ## [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size "Link to this keyword") #### Arguments width [int]("Click to show type information") height [int]("Click to show type information") inner \= False [bool]("Click to show type information") #### Documentation Sets current windows size to given `width` and `height`. Values can be given using strings containing numbers or by using actual numbers. See also [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size). Browsers have a limit on their minimum size. Trying to set them smaller will cause the actual size to be bigger than the requested size. If `inner` parameter is set to True, keyword sets the necessary window width and height to have the desired HTML DOM *window.innerWidth* and *window.innerHeight*. See [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details on how to set boolean arguments. The `inner` argument is new since SeleniumLibrary 4.0. This `inner` argument does not support Frames. If a frame is selected, switch to default before running this. Example: | | | | | |---|---|---|---| | [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) | 800 | 600 | | | [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) | 800 | 600 | True | ## [Simulate Event](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Simulate%20Event "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] event [str]("Click to show type information") #### Documentation Simulates `event` on the element identified by `locator`. This keyword is useful if element has `OnEvent` handler that needs to be explicitly invoked. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Prior to SeleniumLibrary 3.0 this keyword was named Simulate. ## [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form "Link to this keyword") #### Arguments locator \= None WebElement \| [None]("Click to show type information") \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Submits a form identified by `locator`. If `locator` is not given, first form on the page is submitted. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser "Link to this keyword") #### Arguments index\_or\_alias [str]("Click to show type information") #### Documentation Switches between active browsers using `index_or_alias`. Indices are returned by the [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keyword and aliases can be given to it explicitly. Indices start from 1. Example: | | | | | |---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://google.com> | ff | | | [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) | <http://google.com> | | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://yahoo.com> | ie | alias=second | | [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) | <http://yahoo.com> | | | | [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) | 1 | \# index | | | [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) | I'm feeling lucky | | | | [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) | second | \# alias | | | [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) | More Yahoo\! | | | | [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) | | | | Above example expects that there was no other open browsers when opening the first one because it used index `1` when switching to it later. If you are not sure about that, you can store the index into a variable as below. | | | | |---|---|---| | \${index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | <http://google.com> | | \# Do something ... | | | | [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) | \${index} | | ## [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window "Link to this keyword") #### Arguments locator \= MAIN [list]("Click to show type information") \| [str]("Click to show type information") timeout \= None [str]("Click to show type information") \| [None]("Click to show type information") browser \= CURRENT [str]("Click to show type information") #### Documentation Switches to browser window matching `locator`. If the window is found, all subsequent commands use the selected window, until this keyword is used again. If the window is not found, this keyword fails. The previous windows handle is returned and can be used to switch back to it later. Notice that alerts should be handled with [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) or other alert related keywords. The `locator` can be specified using different strategies somewhat similarly as when [locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) on pages. - By default, the `locator` is matched against window handle, name, title, and URL. Matching is done in that order and the first matching window is selected. - The `locator` can specify an explicit strategy by using the format `strategy:value` (recommended) or `strategy=value`. Supported strategies are `name`, `title`, and `url`. These matches windows using their name, title, or URL, respectively. Additionally, `default` can be used to explicitly use the default strategy explained above. - If the `locator` is `NEW` (case-insensitive), the latest opened window is selected. It is an error if this is the same as the current window. - If the `locator` is `MAIN` (default, case-insensitive), the main window is selected. - If the `locator` is `CURRENT` (case-insensitive), nothing is done. This effectively just returns the current window handle. - If the `locator` is not a string, it is expected to be a list of window handles *to exclude*. Such a list of excluded windows can be got from [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) before doing an action that opens a new window. The `timeout` is used to specify how long keyword will poll to select the new window. The `timeout` is new in SeleniumLibrary 3.2. Example: | | | | | |---|---|---|---| | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | popup1 | | \# Open new window | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | example | | \# Select window using default strategy | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 1 | | | | [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) | popup2 | | \# Open another window | | \${handle} = | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | NEW | \# Select latest opened window | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 2 | | | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | \${handle} | | \# Select window using handle | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 1 | | | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | MAIN | | \# Select the main window | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Main | | | | \${excludes} = | [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) | | \# Get list of current windows | | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | popup3 | | \# Open one more window | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | \${excludes} | | \# Select window using excludes | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 3 | | | The `browser` argument allows with `index_or_alias` to implicitly switch to a specific browser when switching to a window. See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) - If the `browser` is `CURRENT` (case-insensitive), no other browser is selected. **NOTE:** - The `strategy:value` syntax is only supported by SeleniumLibrary 3.0 and newer. - Prior to SeleniumLibrary 3.0 matching windows by name, title and URL was case-insensitive. - Earlier versions supported aliases `None`, `null` and the empty string for selecting the main window, and alias `self` for selecting the current window. Support for these aliases was removed in SeleniumLibrary 3.2. ## [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] row [int]("Click to show type information") column [int]("Click to show type information") expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table cell contains text `expected`. See [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) that this keyword uses internally for an explanation about accepted arguments. ## [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] column [int]("Click to show type information") expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table column contains text `expected`. The table is located using the `locator` argument and its column found using `column`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Column indexes start from 1. It is possible to refer to columns from the end by using negative indexes so that -1 is the last column, -2 is the second last, and so on. If a table contains cells that span multiple columns, those merged cells count as a single column. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. ## [Table Footer Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Footer%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table footer contains text `expected`. Any `<td>` element inside `<tfoot>` element is considered to be part of the footer. The table is located using the `locator` argument. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. ## [Table Header Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Header%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table header contains text `expected`. Any `<th>` element anywhere in the table is considered to be part of the header. The table is located using the `locator` argument. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. ## [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] row [int]("Click to show type information") expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that table row contains text `expected`. The table is located using the `locator` argument and its column found using `column`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Row indexes start from 1. It is possible to refer to rows from the end by using negative indexes so that -1 is the last row, -2 is the second last, and so on. If a table contains cells that span multiple rows, a match only occurs for the uppermost row of those merged cells. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. ## [Table Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table contains text `expected`. The table is located using the `locator` argument. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. ## [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies text area `locator` contains text `expected`. `message` can be used to override default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies text area `locator` has exactly text `expected`. `message` can be used to override default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies text field `locator` contains text `expected`. `message` can be used to override the default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies text field `locator` has exactly text `expected`. `message` can be used to override default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be "Link to this keyword") #### Arguments title [str]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Verifies that the current page title equals `title`. The `message` argument can be used to override the default error message. `message` argument is new in SeleniumLibrary 3.1. ## [Unselect All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20All%20From%20List "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Unselects all options from multi-selection list `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.0. ## [Unselect Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Checkbox "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Removes the selection of checkbox identified by `locator`. Does nothing if the checkbox is not selected. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame "Link to this keyword") #### Documentation Sets the main frame as the current frame. In practice cancels the previous [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) call. ## [Unselect From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Index "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* indexes [str]("Click to show type information") #### Documentation Unselects options from selection list `locator` by `indexes`. Indexes of list options start from 0. This keyword works only with multi-selection lists. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Unselect From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Label "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* labels [str]("Click to show type information") #### Documentation Unselects options from selection list `locator` by `labels`. This keyword works only with multi-selection lists. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Unselect From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* values [str]("Click to show type information") #### Documentation Unselects options from selection list `locator` by `values`. This keyword works only with multi-selection lists. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. ## [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition "Link to this keyword") #### Arguments condition [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until `condition` is true or `timeout` expires. The condition can be arbitrary JavaScript expression but it must return a value to be evaluated. See [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) for information about accessing content on pages. Fails if the timeout expires before the condition becomes true. See the Timeouts section for more information about using timeouts and their default value. `error` can be used to override the default error message. Examples: | | | |---|---| | [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) | return document.title == "New Title" | | [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) | return jQuery.active == 0 | | [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) | style = document.querySelector('h1').style; return style.background == "red" && style.color == "white" | ## [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition "Link to this keyword") #### Arguments condition \<module 'string' from '/Users/emanlove/.pyenv/versions/3.12.6/lib/python3.12/string.py'\> \* args 🏷 timeout \= 10 [float]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until `condition` is true or `timeout` expires. The condition must be one of selenium's expected condition which can be found within the selenium [Python API](https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions) 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 be passed along after the expected condition. Fails if the timeout expires before the condition becomes true. The default value is 10 seconds. Examples: | | | | |---|---|---| | [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) | alert\_is\_present | | | [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) | Title Is | New Title | If the expected condition expects a locator then one can pass as arguments a tuple containing the selenium locator strategies and the locator. Example of expected condition expecting locator: ``` ${byElem}= | Evaluate ("id","added_btn") Wait For Expected Condition | Presence Of Element Located | ${byElem} ``` ## [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] text [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` contains `text`. Fails if `timeout` expires before the text appears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. ## [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] text [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` does not contain `text`. Fails if `timeout` expires before the text disappears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. ## [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` is enabled. Element is considered enabled if it is not disabled nor read-only. Fails if `timeout` expires before the element is enabled. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. Considering read-only elements to be disabled is a new feature in SeleniumLibrary 3.0. ## [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` is not visible. Fails if `timeout` expires before the element is not visible. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. ## [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` is visible. Fails if `timeout` expires before the element is visible. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. ## [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains "Link to this keyword") #### Arguments expected [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the current URL contains `expected`. The `expected` argument contains the expected value in url. Fails if `timeout` expires before the location contains. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.0 ## [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain "Link to this keyword") #### Arguments location [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the current URL does not contains `location`. The `location` argument contains value not expected in url. Fails if `timeout` expires before the location not contains. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.3 ## [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is "Link to this keyword") #### Arguments expected [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the current URL is `expected`. The `expected` argument is the expected value in url. Fails if `timeout` expires before the location is. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.0 ## [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not "Link to this keyword") #### Arguments location [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") message \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the current URL is not `location`. The `location` argument is the unexpected value in url. Fails if `timeout` expires before the location is not. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.3 ## [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains "Link to this keyword") #### Arguments text [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until `text` appears on the current page. Fails if `timeout` expires before the text appears. See the Timeouts section for more information about using timeouts and their default value. `error` can be used to override the default error message. ## [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") limit \= None [int]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` appears on the current page. Fails if `timeout` expires before the element appears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. The `limit` argument can used to define how many elements the page should contain. When `limit` is [None](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#type-None) (default) page can contain one or more elements. When limit is a number, page must contain same number of elements. `limit` is new in SeleniumLibrary 4.4 ## [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain "Link to this keyword") #### Arguments text [str]("Click to show type information") timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until `text` disappears from the current page. Fails if `timeout` expires before the text disappears. See the Timeouts section for more information about using timeouts and their default value. `error` can be used to override the default error message. ## [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] timeout \= None [timedelta]("Click to show type information") \| [None]("Click to show type information") error \= None [str]("Click to show type information") \| [None]("Click to show type information") limit \= None [int]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until the element `locator` disappears from the current page. Fails if `timeout` expires before the element disappears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. The `limit` argument can used to define how many elements the page should not contain. When `limit` is [None](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#type-None) (default) page can\`t contain any elements. When limit is a number, page must not contain same number of elements. `limit` is new in SeleniumLibrary 4.4 ## Data types ## Any (Standard) #### Documentation Any value is accepted. No conversion is done. #### Converted Types - Any #### Usages - [Execute Async Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) - [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) ## boolean (Standard) #### Documentation Strings `TRUE`, `YES`, `ON` and `1` are converted to Boolean `True`, the empty string as well as strings `FALSE`, `NO`, `OFF` and `0` are converted to Boolean `False`, and the string `NONE` is converted to the Python `None` object. Other strings and other accepted values are passed as-is, allowing keywords to handle them specially if needed. All string comparisons are case-insensitive. Examples: `TRUE` (converted to `True`), `off` (converted to `False`), `example` (used as-is) #### Converted Types - string - integer - float - None #### Usages - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) - [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) - [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) - [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image) - [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies) - [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) - [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) - [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) - [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) ## dictionary (Standard) #### Documentation Strings must be Python [dictionary](https://docs.python.org/library/stdtypes.html#dict) literals. They are converted to actual dictionaries using the [ast.literal\_eval](https://docs.python.org/library/ast.html#ast.literal_eval) function. They can contain any values `ast.literal_eval` supports, including dictionaries and other containers. If the type has nested types like `dict[str, int]`, items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: `{'a': 1, 'b': 2}`, `{'key': 1, 'nested': {'key': 2}}` #### Converted Types - string - Mapping #### Usages - [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) - [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) ## float (Standard) #### Documentation Conversion is done using Python's [float](https://docs.python.org/library/functions.html#float) built-in function. Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes. Examples: `3.14`, `2.9979e8`, `10 000.000 01` #### Converted Types - string - Real #### Usages - [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) ## integer (Standard) #### Documentation Conversion is done using Python's [int](https://docs.python.org/library/functions.html#int) built-in function. Floating point numbers are accepted only if they can be represented as integers exactly. For example, `1.0` is accepted and `1.1` is not. Starting from RF 4.1, it is possible to use hexadecimal, octal and binary numbers by prefixing values with `0x`, `0o` and `0b`, respectively. Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes. Examples: `42`, `-1`, `0b1010`, `10 000 000`, `0xBAD_C0FFEE` #### Converted Types - string - float #### Usages - [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates) - [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) - [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position) - [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) - [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position) - [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position) - [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) - [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain) - [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain) - [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) ## list (Standard) #### Documentation Strings must be Python [list](https://docs.python.org/library/stdtypes.html#list) literals. They are converted to actual lists using the [ast.literal\_eval](https://docs.python.org/library/ast.html#ast.literal_eval) function. They can contain any values `ast.literal_eval` supports, including lists and other containers. If the type has nested types like `list[int]`, items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: `['one', 'two']`, `[('one', 1), ('two', 2)]` #### Converted Types - string - Sequence #### Usages - [Assign Id To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element) - [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) - [Checkbox Should Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Be%20Selected) - [Checkbox Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Not%20Be%20Selected) - [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) - [Clear Element Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Clear%20Element%20Text) - [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) - [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) - [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates) - [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image) - [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) - [Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element) - [Double Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Double%20Click%20Element) - [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop) - [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) - [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) - [Element Should Be Disabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Disabled) - [Element Should Be Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Enabled) - [Element Should Be Focused](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Focused) - [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Frame%20Should%20Contain) - [Get All Links](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20All%20Links) - [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases) - [Get Browser Ids](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Ids) - [Get Dom Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) - [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute) - [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position) - [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) - [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) - [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property) - [Get Selected List Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Label) - [Get Selected List Labels](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Labels) - [Get Selected List Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Value) - [Get Selected List Values](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Values) - [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) - [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text) - [Get Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Value) - [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position) - [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) - [Get WebElements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElements) - [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) - [Get Window Identifiers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Identifiers) - [Get Window Names](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Names) - [Get Window Titles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Titles) - [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) - [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) - [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) - [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections) - [Mouse Down](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down) - [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image) - [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link) - [Mouse Out](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Out) - [Mouse Over](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Over) - [Mouse Up](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Up) - [Open Context Menu](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Context%20Menu) - [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button) - [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image) - [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link) - [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List) - [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button) - [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield) - [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button) - [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox) - [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element) - [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image) - [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link) - [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List) - [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button) - [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield) - [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) - [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Scroll Element Into View](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Scroll%20Element%20Into%20View) - [Select All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20All%20From%20List) - [Select Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Checkbox) - [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) - [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index) - [Select From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label) - [Select From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value) - [Set Focus To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Focus%20To%20Element) - [Simulate Event](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Simulate%20Event) - [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form) - [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) - [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain) - [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain) - [Table Footer Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Footer%20Should%20Contain) - [Table Header Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Header%20Should%20Contain) - [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain) - [Table Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Should%20Contain) - [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain) - [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be) - [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain) - [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be) - [Unselect All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20All%20From%20List) - [Unselect Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Checkbox) - [Unselect From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Index) - [Unselect From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Label) - [Unselect From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Value) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) ## None (Standard) #### Documentation String `NONE` (case-insensitive) is converted to Python `None` object. Other values cause an error. #### Converted Types - string #### Usages - [\_\_init\_\_](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#__init__) - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) - [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) - [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) - [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button) - [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image) - [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link) - [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List) - [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button) - [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield) - [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button) - [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox) - [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element) - [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image) - [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link) - [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List) - [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button) - [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield) - [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) - [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) - [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form) - [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) - [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain) - [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be) - [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain) - [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be) - [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) ## string (Standard) #### Documentation All arguments are converted to Unicode strings. #### Converted Types - Any #### Usages - [\_\_init\_\_](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#__init__) - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Assign Id To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element) - [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) - [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) - [Checkbox Should Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Be%20Selected) - [Checkbox Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Not%20Be%20Selected) - [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) - [Clear Element Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Clear%20Element%20Text) - [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) - [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) - [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates) - [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image) - [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) - [Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element) - [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) - [Current Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Contain) - [Current Frame Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Not%20Contain) - [Double Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Double%20Click%20Element) - [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop) - [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) - [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) - [Element Should Be Disabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Disabled) - [Element Should Be Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Enabled) - [Element Should Be Focused](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Focused) - [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Frame%20Should%20Contain) - [Get All Links](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20All%20Links) - [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases) - [Get Browser Ids](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Ids) - [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie) - [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies) - [Get Dom Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) - [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute) - [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position) - [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) - [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) - [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) - [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property) - [Get Selected List Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Label) - [Get Selected List Labels](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Labels) - [Get Selected List Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Value) - [Get Selected List Values](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Values) - [Get Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Implicit%20Wait) - [Get Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Page%20Load%20Timeout) - [Get Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Speed) - [Get Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Timeout) - [Get Session Id](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Session%20Id) - [Get Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source) - [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) - [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text) - [Get Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Title) - [Get Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Value) - [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position) - [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) - [Get WebElements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElements) - [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) - [Get Window Identifiers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Identifiers) - [Get Window Names](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Names) - [Get Window Titles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Titles) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) - [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) - [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections) - [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) - [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain) - [Log Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Location) - [Log Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Source) - [Log Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Title) - [Mouse Down](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down) - [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image) - [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link) - [Mouse Out](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Out) - [Mouse Over](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Over) - [Mouse Up](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Up) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Open Context Menu](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Context%20Menu) - [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) - [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button) - [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image) - [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link) - [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List) - [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button) - [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield) - [Page Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain) - [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button) - [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox) - [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element) - [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image) - [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link) - [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List) - [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button) - [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield) - [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) - [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Radio Button Should Be Set To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Be%20Set%20To) - [Radio Button Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Not%20Be%20Selected) - [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) - [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy) - [Scroll Element Into View](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Scroll%20Element%20Into%20View) - [Select All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20All%20From%20List) - [Select Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Checkbox) - [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) - [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index) - [Select From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label) - [Select From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value) - [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button) - [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay) - [Set Focus To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Focus%20To%20Element) - [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) - [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) - [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) - [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) - [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) - [Simulate Event](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Simulate%20Event) - [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form) - [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) - [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) - [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain) - [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain) - [Table Footer Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Footer%20Should%20Contain) - [Table Header Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Header%20Should%20Contain) - [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain) - [Table Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Should%20Contain) - [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain) - [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be) - [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain) - [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be) - [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) - [Unselect All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20All%20From%20List) - [Unselect Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Checkbox) - [Unselect From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Index) - [Unselect From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Label) - [Unselect From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Value) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) ## timedelta (Standard) #### Documentation Strings are expected to represent a time interval in one of the time formats Robot Framework supports: - a number representing seconds like `42` or `10.5` - a time string like `1 hour 2 seconds` or `1h 2s` - a "timer" string like `01:02` (1 minute 2 seconds) or `01:00:03` (1 hour 3 seconds) Integers and floats are considered to be seconds. See the [Robot Framework User Guide](https://robotframework.org/robotframework/) for more details about the supported time formats. #### Converted Types - string - integer - float #### Usages - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay) - [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait) - [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) - [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) - [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) - [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) ## tuple (Standard) #### Documentation Strings must be Python [tuple](https://docs.python.org/library/stdtypes.html#tuple) literals. They are converted to actual tuples using the [ast.literal\_eval](https://docs.python.org/library/ast.html#ast.literal_eval) function. They can contain any values `ast.literal_eval` supports, including tuples and other containers. If the type has nested types like `tuple[str, int, int]`, items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: `('one', 'two')`, `(('one', 1), ('two', 2))` #### Converted Types - string - Sequence #### Usages - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position) - [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) Generated by [Libdoc](http://robotframework.org/robotframework/#built-in-tools) on 2026-01-19T21:34:37+00:00. [SeleniumLibrary image/svg+xml](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#library-documentation-top)
Readable Markdown
| | | |---|---| | Library version: | 6\.8.0 | | Library scope: | GLOBAL | ## Introduction 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 [project pages](https://github.com/robotframework/SeleniumLibrary). For more information about Robot Framework, see [http://robotframework.org](http://robotframework.org/). SeleniumLibrary uses the Selenium WebDriver modules internally to control a web browser. See [http://seleniumhq.org](http://seleniumhq.org/) for more information about Selenium in general and SeleniumLibrary README.rst [Browser drivers chapter](https://github.com/robotframework/SeleniumLibrary#browser-drivers) for more details about WebDriver binary installation. - [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) - [Browser and Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Browser%20and%20Window) - [Browser and Driver options and service class](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Browser%20and%20Driver%20options%20and%20service%20class) - [Timeouts, waits, and delays](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeouts%2C%20waits%2C%20and%20delays) - [Run-on-failure functionality](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Run-on-failure%20functionality) - [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) - [EventFiringWebDriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#EventFiringWebDriver) - [Thread support](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Thread%20support) - [Plugins](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Plugins) - [Language](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Language) - [Importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) - [Keywords](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Keywords) ## 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Using%20WebElements) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) supports the `href` attribute and the link text and addition to the normal `id` and `name`. Examples: | | | | |---|---|---| | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | example | \# Match based on `id` or `name`. | | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | example | \# Match also based on link text and `href`. | | [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) | example | \# Match based on `id`, `name` or `value`. | If a locator accidentally starts with a prefix recognized as [explicit locator strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Explicit%20locator%20strategy) or [implicit XPath strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20XPath%20strategy), it is possible to use the explicit `default` prefix to enable the default strategy. Examples: | | | | |---|---|---| | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | name:foo | \# Find element with name `foo`. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | default:name:foo | \# Use default strategy with value `name:foo`. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | //foo | \# Find element using XPath `//foo`. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | 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 [named argument syntax](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Custom%20locators). | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Default%20locator%20strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Default%20locator%20strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | id:foo | \# Element with id 'foo'. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | css:div\#foo h1 | \# h1 element under div with id 'foo'. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | xpath: //div\[@id="foo"\]//h1 | \# Same as the above using XPath, not CSS. | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | 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 \<div data-automation="automation-id-2"\>, 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | //div\[@id="foo"\]//h1 | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | (//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 obey 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | \${locator\_list} | | | | \${element} = | Get WebElement | xpath: //\*\[text(), " \>\> "\] | | | \${locator\_list} = | Create List | css:div\#div\_id | \${element } | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | \${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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) keyword. | | | | |---|---|---| | \${elem} = | [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) | id:example | | [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | \${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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) keyword: | | | | |---|---|---| | [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) | custom | Custom Locator Strategy | The first argument of [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) | custom:example | See the [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) or [Create WebDriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) keyword is called, it will create a new Selenium WebDriver instance by using the [Selenium WebDriver](https://www.seleniumhq.org/docs/03_webdriver.jsp) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) or [Create WebDriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) 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/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [https://robotframework.org](https://robotframework.org/) | \${BROWSER} | alias=BrowserA | \# BrowserA with first window is opened. | | [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | window.open() | | | \# In BrowserA second window is opened. | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | locator=NEW | | | \# Switched to second window in BrowserA | | [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To) | [https://robocon.io](https://robocon.io/) | | | \# Second window navigates to robocon site. | | [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | window.open() | | | \# In BrowserA third window is opened. | | \${handle} | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | locator=NEW | | \# Switched to third window in BrowserA | | [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To) | <https://github.com/robotframework/> | | | \# Third windows goes to robot framework github site. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [https://github.com](https://github.com/) | \${BROWSER} | alias=BrowserB | \# BrowserB with first windows is opened. | | \${location} | [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) | | | \# \${location} is: [https://www.github.com](https://www.github.com/) | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | \${handle} | browser=BrowserA | | \# BrowserA second windows is selected. | | \${location} | [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) | | | \# \${location} = <https://robocon.io/> | | @{locations 1} | [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) | | | \# By default, lists locations under the currectly active browser (BrowserA). | | @{locations 2} | [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keyword. ### Configuring the browser using the Selenium Options As noted within the keyword documentation for [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser), 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 [ast.literal\_eval](https://docs.python.org/3/library/ast.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#type-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 [raw strings](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) 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 [Chromium Embedded Framework](https://bitbucket.org/chromiumembedded/cef/wiki/UsingChromeDriver) . 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 [the Selenium documentation](https://www.selenium.dev/documentation/webdriver/drivers/service/) . 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript). 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) keyword or with the `timeout` argument when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) keyword or with the `implicit_wait` argument when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library. See [Selenium documentation](https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp) for more information about this functionality. See [time format](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library with the `page_load_timeout` argument or by using the [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) keyword. See [time format](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) 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 [Robot Framework User Guide](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format). ## 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) keyword, but this can be changed either by using the [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) keyword or with the `run_on_failure` argument when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments)) such as `NONE`. ## Boolean arguments Starting from 5.0 SeleniumLibrary relies on Robot Framework to perform the boolean conversion based on keyword arguments [type hint](https://docs.python.org/3/library/typing.html). More details in Robot Framework [user guide](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-conversions) Please note SeleniumLibrary 3 and 4 did have own custom methods to covert arguments to boolean values. ## EventFiringWebDriver The SeleniumLibrary offers support for [EventFiringWebDriver](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver). See the Selenium and SeleniumLibrary [EventFiringWebDriver support](https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#EventFiringWebDriver) 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 [Selenium tool is not thread-safe](https://github.com/SeleniumHQ/selenium/wiki/Frequently-Asked-Questions#q-is-webdriver-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 [plugin API](https://github.com/robotframework/SeleniumLibrary/blob/master/docs/extending/extending.rst#Plugins) 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 [module search path](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path) for Python packages starting with robotframework-seleniumlibrary-translation by using the [Python pluging API](https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/). 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 [json](https://www.json.org/json-en.html) 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 [robotframework-seleniumlibrary-translation-fi](https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi) repository. ## Importing #### Arguments timeout \= 0:00:05 implicit\_wait \= 0:00:00 run\_on\_failure \= Capture Page Screenshot screenshot\_root\_directory \= None [str]("Click to show type information") \| [None]("Click to show type information") plugins \= None [str]("Click to show type information") \| [None]("Click to show type information") event\_firing\_webdriver \= None [str]("Click to show type information") \| [None]("Click to show type information") page\_load\_timeout \= 0:05:00 action\_chain\_delay \= 0:00:00.250000 language \= None [str]("Click to show type information") \| [None]("Click to show type information") #### Documentation SeleniumLibrary can be imported with several optional arguments. - `timeout`: Default value for timeouts used with `Wait ...` keywords. - `implicit_wait`: Default value for [implicit wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20wait) used when locating elements. - `run_on_failure`: Default action for the [run-on-failure functionality](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Run-on-failure%20functionality). - `screenshot_root_directory`: Path to folder where possible screenshots are created or EMBED or BASE64. See [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) keyword for further details about EMBED and BASE64. 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 [EventFiringWebDriver](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.event_firing_webdriver.html#module-selenium.webdriver.support.event_firing_webdriver) - `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. ## Keywords [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie "Link to this keyword") #### Documentation Adds a cookie to your current session. `name` and `value` are required, `path`, `domain`, `secure` and `expiry` are optional. Expiry supports the same formats as the [DateTime](http://robotframework.org/robotframework/latest/libraries/DateTime.html) library or an epoch timestamp. Example: | | | | | | |---|---|---|---|---| | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | | | | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | domain=example.com | | | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | expiry=2027-09-28 16:21:35 | \# Expiry as timestamp. | | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | expiry=1822137695 | \# Expiry as epoch seconds. | Prior to SeleniumLibrary 3.0 setting expiry did not work. [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy "Link to this keyword") #### Arguments strategy\_name [str]("Click to show type information") strategy\_keyword [str]("Click to show type information") persist \= False [bool]("Click to show type information") #### Documentation Adds a custom location strategy. See [Custom locators](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Custom%20locators) for information on how to create and use custom strategies. [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy) can be used to remove a registered strategy. Location strategies are automatically removed after leaving the current scope by default. Setting `persist` to a true value (see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments)) will cause the location strategy to stay registered throughout the life of the test. [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present "Link to this keyword") #### Documentation Verifies that an alert is present and by default, accepts it. Fails if no alert is present. If `text` is a non-empty string, then it is used to verify alert's message. The alert is accepted by default, but that behavior can be controlled by using the `action` argument same way as with [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert). `timeout` specifies how long to wait for the alert to appear. If it is not given, the global default [timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) is used instead. `action` and `timeout` arguments are new in SeleniumLibrary 3.0. In earlier versions, the alert was always accepted and a timeout was hardcoded to one second. [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present "Link to this keyword") #### Documentation Verifies that no alert is present. If the alert actually exists, the `action` argument determines how it should be handled. By default, the alert is accepted, but it can be also dismissed or left open the same way as with the [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) keyword. `timeout` specifies how long to wait for the alert to appear. By default, is not waited for the alert at all, but a custom time can be given if alert may be delayed. See the [time format](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Time%20format) section for information about the syntax. New in SeleniumLibrary 3.0. [Assign Id To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element "Link to this keyword") #### Documentation Assigns a temporary `id` to the element specified by `locator`. This is mainly useful if the locator is complicated and/or slow XPath expression and it is needed multiple times. Identifier expires when the page is reloaded. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | |---|---|---| | [Assign ID to Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element) | //ul\[@class='example' and ./li\[contains(., 'Stuff')\]\] | my id | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | my id | | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] filename \= selenium-element-screenshot-{index}.png [str]("Click to show type information") #### Documentation Captures a screenshot from the element identified by `locator` and embeds it into log file. See [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) for details about `filename` argument. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. An absolute path to the created element screenshot is returned. If the `filename` equals to BASE64 (case insensitive), then the base64 string is returned in addition to the screenshot embedded to the log. See `Capture Page Screenshot` for more information. Support for capturing the screenshot from an element has limited support among browser vendors. Please check the browser vendor driver documentation does the browser support capturing a screenshot from an element. New in SeleniumLibrary 3.3. Support for EMBED is new in SeleniumLibrary 4.2. Support for BASE64 is new in SeleniumLibrary 6.8. Examples: | | | | | |---|---|---|---| | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | | | | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | \${OUTPUTDIR}/id\_image\_id-1.png | | | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | EMBED | | | \${ess}= | [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) | id:image\_id | BASE64 | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot "Link to this keyword") #### Arguments filename \= selenium-screenshot-{index}.png [str]("Click to show type information") #### Documentation Takes a screenshot of the current page and embeds it into a log file. `filename` argument specifies the name of the file to write the screenshot into. The directory where screenshots are saved can be set when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library or by using the [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) keyword. If the directory is not configured, screenshots are saved to the same directory where Robot Framework's log file is written. If `filename` equals to EMBED (case insensitive), then screenshot is embedded as Base64 image to the log.html. In this case file is not created in the filesystem. If `filename` equals to BASE64 (case insensitive), then the base64 string is returned and the screenshot is embedded to the log. This allows one to reuse the image elsewhere in the report. Example: | | | | |---|---|---| | \${ss}= | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | BASE64 | | Set Test Message | \*HTML\*Test Success\<p\>\<img src="data:image/png;base64,\${ss}" width="256px"\> | | Starting from SeleniumLibrary 1.8, if `filename` contains marker `{index}`, it will be automatically replaced with an unique running index, preventing files to be overwritten. Indices start from 1, and how they are represented can be customized using Python's [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax). An absolute path to the created screenshot file is returned or if `filename` equals to EMBED, word EMBED is returned. If `filename` equals to BASE64, the base64 string containing the screenshot is returned. Support for BASE64 is new in SeleniumLibrary 6.8 Examples: | | | |---|---| | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | | | File Should Exist | \${OUTPUTDIR}/selenium-screenshot-1.png | | \${path} = | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | | File Should Exist | \${OUTPUTDIR}/selenium-screenshot-2.png | | File Should Exist | \${path} | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | custom\_name.png | | File Should Exist | \${OUTPUTDIR}/custom\_name.png | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | custom\_with\_index\_{index}.png | | File Should Exist | \${OUTPUTDIR}/custom\_with\_index\_1.png | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | formatted\_index\_{index:03}.png | | File Should Exist | \${OUTPUTDIR}/formatted\_index\_001.png | | [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) | EMBED | | File Should Not Exist | EMBED | [Checkbox Should Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Be%20Selected "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies checkbox `locator` is selected/checked. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Checkbox Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Not%20Be%20Selected "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies checkbox `locator` is not selected/checked. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] file\_path [str]("Click to show type information") #### Documentation Inputs the `file_path` into the file input field `locator`. This keyword is most often used to input files into upload forms. The keyword does not check `file_path` is the file or folder available on the machine where tests are executed. If the `file_path` points at a file and when using Selenium Grid, Selenium will [magically](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.command.html?highlight=upload#selenium.webdriver.remote.command.Command.UPLOAD_FILE), transfer the file from the machine where the tests are executed to the Selenium Grid node where the browser is running. Then Selenium will send the file path, from the nodes file system, to the browser. That `file_path` is not checked, is new in SeleniumLibrary 4.0. Example: | | | | |---|---|---| | [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) | my\_upload\_field | \${CURDIR}/trades.csv | [Clear Element Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Clear%20Element%20Text "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Clears the value of the text-input-element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button "Link to this keyword") #### Documentation Clicks the button identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, buttons are searched using `id`, `name`, and `value`. See the [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) keyword for details about the `modifier` argument. The `modifier` argument is new in SeleniumLibrary 3.3 [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] modifier \= False [bool]("Click to show type information") \| [str]("Click to show type information") action\_chain \= False [bool]("Click to show type information") #### Documentation Click the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `modifier` argument can be used to pass [Selenium Keys](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys) when clicking the element. The \+ can be used as a separator for different Selenium Keys. The CTRL is internally translated to the CONTROL key. The `modifier` is space and case insensitive, example "alt" and " aLt " are supported formats to [ALT key](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ALT) . If `modifier` does not match to Selenium Keys, keyword fails. If `action_chain` argument is true, see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details on how to set boolean argument, then keyword uses ActionChain based click instead of the \<web\_element\>.click() function. If both `action_chain` and `modifier` are defined, the click will be performed using `modifier` and `action_chain` will be ignored. Example: | | | | | |---|---|---|---| | Click Element | id:button | | \# Would click element without any modifiers. | | Click Element | id:button | CTRL | \# Would click element with CTLR key pressed down. | | Click Element | id:button | CTRL+ALT | \# Would click element with CTLR and ALT keys pressed down. | | Click Element | id:button | action\_chain=True | \# Clicks the button using an Selenium ActionChains | The `modifier` argument is new in SeleniumLibrary 3.2 The `action_chain` argument is new in SeleniumLibrary 4.1 [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates "Link to this keyword") #### Documentation Click the element `locator` at `xoffset/yoffset`. The Cursor is moved and the center of the element and x/y coordinates are calculated from that point. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image "Link to this keyword") #### Documentation Clicks an image identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. See the [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) keyword for details about the `modifier` argument. The `modifier` argument is new in SeleniumLibrary 3.3 [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link "Link to this keyword") #### Documentation Clicks a link identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. See the [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) keyword for details about the `modifier` argument. The `modifier` argument is new in SeleniumLibrary 3.3 [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers "Link to this keyword") #### Documentation Closes all open browsers and resets the browser cache. After this keyword, new indexes returned from [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keyword are reset to 1. This keyword should be used in test or suite teardown to make sure all browsers are closed. [Close Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20Browser "Link to this keyword") #### Documentation Closes the current browser. [Close Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20Window "Link to this keyword") #### Documentation Closes currently opened and selected browser window/tab. [Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Will cover elements identified by `locator` with a blue div without breaking page layout. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.3.0 Example: \|[Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element) \| css:div\#container \| [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver "Link to this keyword") #### Documentation Creates an instance of Selenium WebDriver. Like [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser), but allows passing arguments to the created WebDriver instance directly. This keyword should only be used if the functionality provided by [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) is not adequate. `driver_name` must be a WebDriver implementation name like Firefox, Chrome, Ie, Edge, Safari, or Remote. The initialized WebDriver can be configured either with a Python dictionary `kwargs` or by using keyword arguments `**init_kwargs`. These arguments are passed directly to WebDriver without any processing. See [Selenium API documentation](https://seleniumhq.github.io/selenium/docs/api/py/api.html) for details about the supported arguments. Examples: | | | | | |---|---|---|---| | \# Use proxy with Firefox | | | | | \${proxy}= | Evaluate | selenium.webdriver.Proxy() | modules=selenium, selenium.webdriver | | \${proxy.http\_proxy}= | Set Variable | localhost:8888 | | | [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) | Firefox | proxy=\${proxy} | | Returns the index of this browser instance which can be used later to switch back to it. Index starts from 1 and is reset back to it when [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) keyword is used. See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for an example. [Current Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Contain "Link to this keyword") #### Documentation Verifies that the current frame contains `text`. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. Prior to SeleniumLibrary 3.0 this keyword was named Current Frame Contains. [Current Frame Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Not%20Contain "Link to this keyword") #### Documentation Verifies that the current frame does not contain `text`. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. [Delete All Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Delete%20All%20Cookies "Link to this keyword") #### Documentation Deletes all cookies. [Delete Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Delete%20Cookie "Link to this keyword") #### Arguments name #### Documentation Deletes the cookie matching `name`. If the cookie is not found, nothing happens. [Double Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Double%20Click%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Double clicks the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] target WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Drags the element identified by `locator` into the `target` element. The `locator` argument is the locator of the dragged element and the `target` is the locator of the target. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | |---|---|---| | [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop) | css:div\#element | css:div.target | [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset "Link to this keyword") #### Documentation Drags the element identified with `locator` by `xoffset/yoffset`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The element will be moved by `xoffset` and `yoffset`, each of which is a negative or positive number specifying the offset. Example: | | | | | | |---|---|---|---|---| | [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) | myElem | 50 | \-35 | \# Move myElem 50px right and 35px down | [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be "Link to this keyword") #### Documentation Verifies element identified by `locator` contains expected attribute value. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) \| css:img \| href \| value New in SeleniumLibrary 3.2. [Element Should Be Disabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Disabled "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies that element identified by `locator` is disabled. This keyword considers also elements that are read-only to be disabled. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Element Should Be Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Enabled "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies that element identified by `locator` is enabled. This keyword considers also elements that are read-only to be disabled. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Element Should Be Focused](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Focused "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies that element identified by `locator` is focused. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.0. [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible "Link to this keyword") #### Documentation Verifies that the element identified by `locator` is visible. Herein, visible means that the element is logically visible, not optically visible in the current browser viewport. For example, an element that carries `display:none` is not logically visible, so using this keyword on that element would fail. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain "Link to this keyword") #### Documentation Verifies that element `locator` contains text `expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. New in SeleniumLibrary 3.1. `ignore_case` argument is new in SeleniumLibrary 3.1. Use [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) if you want to match the exact text, not a substring. [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible "Link to this keyword") #### Documentation Verifies that the element identified by `locator` is NOT visible. Passes if the element does not exists. See [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) for more information about visibility and supported arguments. [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain "Link to this keyword") #### Documentation Verifies that element `locator` does not contain text `expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. `ignore_case` argument new in SeleniumLibrary 3.1. [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be "Link to this keyword") #### Documentation Verifies that element `locator` contains exact the text `expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. `ignore_case` argument is new in SeleniumLibrary 3.1. Use [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) if a substring match is desired. [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be "Link to this keyword") #### Documentation Verifies that element `locator` does not contain exact the text `not_expected`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `ignore_case` argument can be set to True to compare case insensitive, default is False. New in SeleniumLibrary 3.1.1 [Execute Async Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript "Link to this keyword") #### Documentation Executes asynchronous JavaScript code with possible arguments. Similar to [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) except that scripts executed with this keyword must explicitly signal they are finished by invoking the provided callback. This callback is always injected into the executed function as the last argument. Scripts must complete within the script timeout or this keyword will fail. See the [Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) section for more information. Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript [arguments](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_async_script) as part of `code` argument. See [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) for more details. Examples: | | | | |---|---|---| | [Execute Async JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) | var callback = arguments\[arguments.length - 1\]; window.setTimeout(callback, 2000); | | | [Execute Async JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) | \${CURDIR}/async\_js\_to\_execute.js | | | \${result} = | [Execute Async JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Async%20Javascript) | | | ... | var callback = arguments\[arguments.length - 1\]; | | | ... | function answer(){callback("text");}; | | | ... | window.setTimeout(answer, 2000); | | | Should Be Equal | \${result} | text | [Execute Javascript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript "Link to this keyword") #### Documentation Executes the given JavaScript code with possible arguments. `code` may be divided into multiple cells in the test data and `code` may contain multiple lines of code and arguments. In that case, the JavaScript code parts are concatenated together without adding spaces and optional arguments are separated from `code`. If `code` is a path to an existing file, the JavaScript to execute will be read from that file. Forward slashes work as a path separator on all operating systems. The JavaScript executes in the context of the currently selected frame or window as the body of an anonymous function. Use `window` to refer to the window of your application and `document` to refer to the document object of the current frame or window, e.g. `document.getElementById('example')`. This keyword returns whatever the executed JavaScript code returns. Return values are converted to the appropriate Python types. Starting from SeleniumLibrary 3.2 it is possible to provide JavaScript [arguments](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.execute_script) as part of `code` argument. The JavaScript code and arguments must be separated with JAVASCRIPT and ARGUMENTS markers and must be used exactly with this format. If the Javascript code is first, then the JAVASCRIPT marker is optional. The order of JAVASCRIPT and ARGUMENTS markers can be swapped, but if ARGUMENTS is the first marker, then JAVASCRIPT marker is mandatory. It is only allowed to use JAVASCRIPT and ARGUMENTS markers only one time in the `code` argument. Examples: | | | | | | |---|---|---|---|---| | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | window.myFunc('arg1', 'arg2') | | | | | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | \${CURDIR}/js\_to\_execute.js | | | | | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | alert(arguments\[0\]); | ARGUMENTS | 123 | | | [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) | ARGUMENTS | 123 | JAVASCRIPT | alert(arguments\[0\]); | [Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Frame%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] text [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies that frame identified by `locator` contains `text`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. [Get Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Action%20Chain%20Delay "Link to this keyword") #### Documentation Gets the currently stored value for chain\_delay\_value in timestr format. [Get All Links](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20All%20Links "Link to this keyword") #### Documentation Returns a list containing ids of all links found in current page. If a link has no id, an empty string will be in the list instead. [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases "Link to this keyword") #### Documentation Returns aliases of all active browser that has an alias as NormalizedDict. The dictionary contains the aliases as keys and the index as value. This can be accessed as dictionary `${aliases.key}` or as list `@{aliases}[0]`. Example: | | | | | |---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [https://example.com](https://example.com/) | alias=BrowserA | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [https://example.com](https://example.com/) | alias=BrowserB | | | &{aliases} | [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases) | | \# &{aliases} = { BrowserA=1\|BrowserB=2 } | | Log | \${aliases.BrowserA} | | \# logs `1` | | FOR | \${alias} | IN | @{aliases} | | | Log | \${alias} | \# logs `BrowserA` and `BrowserB` | | END | | | | See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for more information and examples. New in SeleniumLibrary 4.0 [Get Browser Ids](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Ids "Link to this keyword") #### Documentation Returns index of all active browser as list. Example: | | | | | |---|---|---|---| | @{browser\_ids}= | Get Browser Ids | | | | FOR | \${id} | IN | @{browser\_ids} | | | @{window\_titles}= | Get Window Titles | browser=\${id} | | | Log | Browser \${id} has these windows: \${window\_titles} | | | END | | | | See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for more information and examples. New in SeleniumLibrary 4.0 [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie "Link to this keyword") #### Return Type CookieInformation #### Documentation Returns information of cookie with `name` as an object. If no cookie is found with `name`, keyword fails. The cookie object contains details about the cookie. Attributes available in the object are documented in the table below. | Attribute | Explanation | |---|---| | name | The name of a cookie. | | value | Value of the cookie. | | path | Indicates a URL path, for example `/`. | | domain | The domain, the cookie is visible to. | | secure | When true, the cookie is only used with HTTPS connections. | | httpOnly | When true, the cookie is not accessible via JavaScript. | | expiry | Python datetime object indicating when the cookie expires. | | extra | Possible attributes outside of the WebDriver specification | See the [WebDriver specification](https://w3c.github.io/webdriver/#cookies) for details about the cookie information. Notice that `expiry` is specified as a [datetime object](https://docs.python.org/3/library/datetime.html#datetime.datetime), not as seconds since Unix Epoch like WebDriver natively does. In some cases, example when running a browser in the cloud, it is possible that the cookie contains other attributes than is defined in the [WebDriver specification](https://w3c.github.io/webdriver/#cookies). These other attributes are available in an `extra` attribute in the cookie object and it contains a dictionary of the other attributes. The `extra` attribute is new in SeleniumLibrary 4.0. Example: | | | | |---|---|---| | [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) | foo | bar | | \${cookie} = | [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie) | foo | | Should Be Equal | \${cookie.name} | foo | | Should Be Equal | \${cookie.value} | bar | | Should Be True | \${cookie.expiry.year} \> 2017 | | New in SeleniumLibrary 3.0. [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies "Link to this keyword") #### Documentation Returns all cookies of the current page. If `as_dict` argument evaluates as false, see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details, then cookie information is returned as a single string in format `name1=value1; name2=value2; name3=value3`. When `as_dict` argument evaluates as true, cookie information is returned as Robot Framework dictionary format. The string format can be used, for example, for logging purposes or in headers when sending HTTP requests. The dictionary format is helpful when the result can be passed to requests library's Create Session keyword's optional cookies parameter. The \` as\_dict\` argument is new in SeleniumLibrary 3.3 [Get Dom Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] attribute [str]("Click to show type information") #### Documentation Returns the value of `attribute` from the element `locator`. [Get DOM Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) keyword only returns attributes declared within the element's HTML markup. If the requested attribute is not there, the keyword returns \${None}. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | | |---|---|---|---| | \${id}= | [Get DOM Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) | css:h1 | id | [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] attribute [str]("Click to show type information") #### Documentation Returns the value of `attribute` from the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | | |---|---|---|---| | \${id}= | [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute) | css:h1 | id | Passing attribute name as part of the `locator` was removed in SeleniumLibrary 3.2. The explicit `attribute` argument should be used instead. [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the number of elements matching `locator`. If you wish to assert the number of matching elements, use [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) with `limit` argument. Keyword will always return an integer. Example: | | | | |---|---|---| | \${count} = | [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) | name:div\_name | | Should Be True | \${count} \> 2 | | New in SeleniumLibrary 3.0. [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns width and height of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Both width and height are returned as integers. Example: | | | | | |---|---|---|---| | \${width} | \${height} = | [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) | css:div\#container | [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the horizontal position of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The position is returned in pixels off the left side of the page, as an integer. See also [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position). [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] values \= False [bool]("Click to show type information") #### Documentation Returns all labels or values of selection list `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Returns visible labels by default, but values can be returned by setting the `values` argument to a true value (see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments)). Example: | | | | | |---|---|---|---| | \${labels} = | [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) | mylist | | | \${values} = | [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) | css:\#example select | values=True | Support to return values is new in SeleniumLibrary 3.0. [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location "Link to this keyword") #### Documentation Returns the current browser window URL. [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations "Link to this keyword") #### Documentation Returns and logs URLs of all windows of the selected browser. **Browser Scope:** The `browser` argument specifies the browser that shall return its windows information. - `browser` can be `index_or_alias` like in [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser). - If `browser` is `CURRENT` (default, case-insensitive) the currently active browser is selected. - If `browser` is `ALL` (case-insensitive) the window information of all windows of all opened browsers are returned. [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] property [str]("Click to show type information") #### Documentation Returns the value of `property` from the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Example: | | | | | |---|---|---|---| | \${text\_length}= | [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property) | css:h1 | text\_length | [Get Selected List Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Label "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the label of selected option from selection list `locator`. If there are multiple selected options, the label of the first option is returned. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get Selected List Labels](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Labels "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns labels of selected options from selection list `locator`. Starting from SeleniumLibrary 3.0, returns an empty list if there are no selections. In earlier versions, this caused an error. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get Selected List Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the value of selected option from selection list `locator`. If there are multiple selected options, the value of the first option is returned. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get Selected List Values](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Values "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns values of selected options from selection list `locator`. Starting from SeleniumLibrary 3.0, returns an empty list if there are no selections. In earlier versions, this caused an error. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Implicit%20Wait "Link to this keyword") #### Documentation Gets the implicit wait value used by Selenium. The value is returned as a human-readable string like `1 second`. See the [Implicit wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20wait) section above for more information. [Get Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Page%20Load%20Timeout "Link to this keyword") #### Documentation Gets the time to wait for a page load to complete before raising a timeout exception. The value is returned as a human-readable string like `1 second`. See the [Page load](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20load) section above for more information. New in SeleniumLibrary 6.1 [Get Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Speed "Link to this keyword") #### Documentation Gets the delay that is waited after each Selenium command. The value is returned as a human-readable string like `1 second`. See the [Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Selenium%20speed) section above for more information. [Get Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Timeout "Link to this keyword") #### Documentation Gets the timeout that is used by various keywords. The value is returned as a human-readable string like `1 second`. See the [Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) section above for more information. [Get Session Id](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Session%20Id "Link to this keyword") #### Documentation Returns the currently active browser session id. New in SeleniumLibrary 3.2 [Get Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source "Link to this keyword") #### Documentation Returns the entire HTML source of the current page or frame. [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell "Link to this keyword") #### Documentation Returns contents of a table cell. The table is located using the `locator` argument and its cell found using `row` and `column`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Both row and column indexes start from 1, and header and footer rows are included in the count. It is possible to refer to rows and columns from the end by using negative indexes so that -1 is the last row/column, -2 is the second last, and so on. All `<th>` and `<td>` elements anywhere in the table are considered to be cells. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the text value of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Title "Link to this keyword") #### Documentation Returns the title of the current page. [Get Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the value attribute of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Returns the vertical position of the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The position is returned in pixels off the top of the page, as an integer. See also [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position). [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type WebElement #### Documentation Returns the first WebElement matching the given `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Get WebElements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElements "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Return Type [List]("Click to show type information") \[ WebElement \] #### Documentation Returns a list of WebElement objects matching the `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Starting from SeleniumLibrary 3.0, the keyword returns an empty list if there are no matching elements. In previous releases, the keyword failed in this case. [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles "Link to this keyword") #### Documentation Returns all child window handles of the selected browser as a list. Can be used as a list of windows to exclude with Select Window. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). Prior to SeleniumLibrary 3.0, this keyword was named List Windows. [Get Window Identifiers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Identifiers "Link to this keyword") #### Documentation Returns and logs id attributes of all windows of the selected browser. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). [Get Window Names](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Names "Link to this keyword") #### Documentation Returns and logs names of all windows of the selected browser. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position "Link to this keyword") #### Documentation Returns current window position. The position is relative to the top left corner of the screen. Returned values are integers. See also [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position). Example: [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size "Link to this keyword") #### Documentation Returns current window width and height as integers. See also [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size). If `inner` parameter is set to True, keyword returns HTML DOM window.innerWidth and window.innerHeight properties. See [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details on how to set boolean arguments. The `inner` is new in SeleniumLibrary 4.0. Example: | | | | | |---|---|---|---| | \${width} | \${height}= | [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) | | | \${width} | \${height}= | [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) | True | [Get Window Titles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Titles "Link to this keyword") #### Documentation Returns and logs titles of all windows of the selected browser. How to select the `browser` scope of this keyword, see [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations). [Go Back](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20Back "Link to this keyword") #### Documentation Simulates the user clicking the back button on their browser. [Go To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Go%20To "Link to this keyword") #### Arguments url #### Documentation Navigates the current browser window to the provided `url`. [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert "Link to this keyword") #### Documentation Handles the current alert and returns its message. By default, the alert is accepted, but this can be controlled with the `action` argument that supports the following case-insensitive values: - `ACCEPT`: Accept the alert i.e. press `Ok`. Default. - `DISMISS`: Dismiss the alert i.e. press `Cancel`. - `LEAVE`: Leave the alert open. The `timeout` argument specifies how long to wait for the alert to appear. If it is not given, the global default [timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) is used instead. Examples: | | | | | |---|---|---|---| | Handle Alert | | | \# Accept alert. | | Handle Alert | action=DISMISS | | \# Dismiss alert. | | Handle Alert | timeout=10 s | | \# Use custom timeout and accept alert. | | Handle Alert | DISMISS | 1 min | \# Use custom timeout and dismiss alert. | | \${message} = | Handle Alert | | \# Accept alert and get its message. | | \${message} = | Handle Alert | LEAVE | \# Leave alert open and get its message. | New in SeleniumLibrary 3.0. [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password "Link to this keyword") #### Documentation Types the given password into the text field identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) for `clear` argument details. Difference compared to [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) is that this keyword does not log the given password on the INFO level. Notice that if you use the keyword like | | | | |---|---|---| | Input Password | password\_field | password | the password is shown as a normal keyword argument. A way to avoid that is using variables like | | | | |---|---|---| | Input Password | password\_field | \${PASSWORD} | Please notice that Robot Framework logs all arguments using the TRACE level and tests must not be executed using level below DEBUG if the password should not be logged in any format. The clear argument is new in SeleniumLibrary 4.0. Hiding password logging from Selenium logs is new in SeleniumLibrary 4.2. [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text "Link to this keyword") #### Documentation Types the given `text` into the text field identified by `locator`. When `clear` is true, the input element is cleared before the text is typed into the element. When false, the previous text is not cleared from the element. Use [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) if you do not want the given `text` to be logged. If [Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) is used and the `text` argument points to a file in the file system, then this keyword prevents the Selenium to transfer the file to the Selenium Grid hub. Instead, this keyword will send the `text` string as is to the element. If a file should be transferred to the hub and upload should be performed, please use [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) keyword. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See the [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) section how Boolean values are handled. Disabling the file upload the Selenium Grid node and the clear argument are new in SeleniumLibrary 4.0 [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert "Link to this keyword") #### Documentation Types the given `text` into an input field in an alert. The alert is accepted by default, but that behavior can be controlled by using the `action` argument same way as with [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert). `timeout` specifies how long to wait for the alert to appear. If it is not given, the global default [timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) is used instead. New in SeleniumLibrary 3.0. [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* expected [str]("Click to show type information") #### Documentation Verifies selection list `locator` has `expected` options selected. It is possible to give expected options both as visible labels and as values. Starting from SeleniumLibrary 3.0, mixing labels and values is not possible. Order of the selected options is not validated. If no expected options are given, validates that the list has no selections. A more explicit alternative is using [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections). See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Examples: | | | | | |---|---|---|---| | [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) | gender | Female | | | [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) | interests | Test Automation | Python | [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Verifies selection list `locator` has no options selected. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be "Link to this keyword") #### Documentation Verifies that the current URL is exactly `url`. The `url` argument contains the exact url that should exist in browser. The `message` argument can be used to override the default error message. `message` argument is new in SeleniumLibrary 3.2.0. [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain "Link to this keyword") #### Documentation Verifies that the current URL contains `expected`. The `expected` argument contains the expected value in url. The `message` argument can be used to override the default error message. `message` argument is new in SeleniumLibrary 3.2.0. [Log Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Location "Link to this keyword") #### Documentation Logs and returns the current browser window URL. [Log Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Source "Link to this keyword") #### Documentation Logs and returns the HTML source of the current page or frame. The `loglevel` argument defines the used log level. Valid log levels are `WARN`, `INFO` (default), `DEBUG`, `TRACE` and `NONE` (no logging). [Log Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Title "Link to this keyword") #### Documentation Logs and returns the title of the current page. [Maximize Browser Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Maximize%20Browser%20Window "Link to this keyword") #### Documentation Maximizes current browser window. [Minimize Browser Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Minimize%20Browser%20Window "Link to this keyword") #### Documentation Minimizes current browser window. [Mouse Down](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates pressing the left mouse button on the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The element is pressed without releasing the mouse button. See also the more specific keywords [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image) and [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link). [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates a mouse down event on an image identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates a mouse down event on a link identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. [Mouse Out](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Out "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates moving the mouse away from the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Mouse Over](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Over "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates hovering the mouse over the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Mouse Up](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Up "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Simulates releasing the left mouse button on the element `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser "Link to this keyword") #### Documentation Opens a new browser instance to the optional `url`. The `browser` argument specifies which browser to use. The supported browsers are listed in the table below. The browser names are case-insensitive and some browsers have multiple supported names. | Browser | Name(s) | |---|---| | Firefox | firefox, ff | | Google Chrome | googlechrome, chrome, gc | | Headless Firefox | headlessfirefox | | Headless Chrome | headlesschrome | | Internet Explorer | internetexplorer, ie | | Edge | edge | | Safari | safari | To be able to actually use one of these browsers, you need to have a matching Selenium browser driver available. See the [project documentation](https://github.com/robotframework/SeleniumLibrary#browser-drivers) 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Chrome | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Firefox | alias=Firefox | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Edge | remote\_url=http://127.0.0.1:4444/wd/hub | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | about:blank | | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keywords, the first keyword will open a new browser, but the second one will switch to the already opened browser and will not open a new browser. The `alias` definition overrules `browser` definition. When same `alias` is used but a different `browser` is defined, then switch to a browser with same alias is done and new browser is not opened. An alternative approach for switching is using an index returned by this keyword. These indices start from 1, are incremented when new browsers are opened, and reset back to 1 when [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) is called. See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) for more information and examples. Alias examples: | | | | | | | |---|---|---|---|---|---| | \${1\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Chrome | alias=Chrome | \# Opens new browser because alias is new. | | \${2\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Firefox | | \# Opens new browser because alias is not defined. | | \${3\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Chrome | alias=Chrome | \# Switches to the browser with Chrome alias. | | \${4\_index} = | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](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 [Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2). 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. The `ff_profile_dir` can also be an instance of the [selenium.webdriver.FirefoxProfile](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html) . As a third option, it is possible to use FirefoxProfile methods and attributes to define the profile using methods and attributes in the same way as with `options` argument. Example: It is possible to use FirefoxProfile set\_preference to define different profile settings. See `options` argument documentation in below how to handle backslash escaping. Example for FirefoxProfile | | | | | | |---|---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Firefox | ff\_profile\_dir=/path/to/profile | \# Using profile from disk. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Firefox | ff\_profile\_dir=\${FirefoxProfile\_instance} | \# Using instance of FirefoxProfile. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](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 [methods and attributes](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options) and for Firefox these [methods and attributes](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.options.html?highlight=firefox#selenium.webdriver.firefox.options.Options) 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 uses a Python like syntax to define Selenium options methods or attributes. Example when using [Chrome options](https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options) method: | | | | | | |---|---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://example.com](http://example.com/) | Chrome | options=add\_argument("--disable-popup-blocking"); add\_argument("--ignore-certificate-errors") | \# Sting format. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | None | Chrome | options=binary\_location="/path/to/binary";add\_argument("remote-debugging-port=port") | \# Start Chomium-based application. | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | 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 [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax). 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 [\$PATH](https://en.wikipedia.org/wiki/PATH_\(variable\)). 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) to customize browser initialization even more. The `service` argument is new in SeleniumLibrary 6.4. [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain "Link to this keyword") #### Documentation Verifies that current page contains `text`. If this keyword fails, it automatically logs the page source using the log level specified with the optional `loglevel` 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](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) 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. [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button "Link to this keyword") #### Documentation Verifies button `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, buttons are searched using `id`, `name`, and `value`. [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox "Link to this keyword") #### Documentation Verifies checkbox `locator` is found from the current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element "Link to this keyword") #### Documentation Verifies that element `locator` is found on the current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. The `message` argument can be used to override the default error message. The `limit` argument can used to define how many elements the page should contain. When `limit` is `None` (default) page can contain one or more elements. When limit is a number, page must contain same number of elements. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. Examples assumes that locator matches to two elements. | | | | | |---|---|---|---| | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | limit=1 | \# Keyword fails. | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | limit=2 | \# Keyword passes. | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | limit=none | \# None is considered one or more. | | [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) | div\_name | | \# Same as above. | The `limit` argument is new in SeleniumLibrary 3.0. [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image "Link to this keyword") #### Documentation Verifies image identified by `locator` is found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link "Link to this keyword") #### Documentation Verifies link identified by `locator` is found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List "Link to this keyword") #### Documentation Verifies selection list `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button "Link to this keyword") #### Documentation Verifies radio button `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, radio buttons are searched using `id`, `name` and `value`. [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield "Link to this keyword") #### Documentation Verifies text field `locator` is found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Page Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain "Link to this keyword") #### Documentation Verifies the current page does not contain `text`. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about the `loglevel` argument. [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button "Link to this keyword") #### Documentation Verifies button `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, buttons are searched using `id`, `name`, and `value`. [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox "Link to this keyword") #### Documentation Verifies checkbox `locator` is not found from the current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element "Link to this keyword") #### Documentation Verifies that element `locator` is not found on the current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) for an explanation about `message` and `loglevel` arguments. [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image "Link to this keyword") #### Documentation Verifies image identified by `locator` is not found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, images are searched using `id`, `name`, `src` and `alt`. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link "Link to this keyword") #### Documentation Verifies link identified by `locator` is not found from current page. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, links are searched using `id`, `name`, `href` and the link text. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List "Link to this keyword") #### Documentation Verifies selection list `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button "Link to this keyword") #### Documentation Verifies radio button `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. When using the default locator strategy, radio buttons are searched using `id`, `name` and `value`. [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield "Link to this keyword") #### Documentation Verifies text field `locator` is not found from current page. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about `message` and `loglevel` arguments. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key "Link to this keyword") #### Documentation Simulates user pressing key on element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `key` is either a single character, a string, or a numerical ASCII code of the key lead by '\\'. Examples: | | | | | |---|---|---|---| | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) | text\_field | q | | | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) | text\_field | abcde | | | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) | login\_button | \\13 | \# ASCII code for enter key | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) and [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) differ in the methods to simulate key presses. [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) uses the WebDriver SEND\_KEYS\_TO\_ELEMENT command using the selenium send\_keys method. Although one is not recommended over the other if [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) does not work we recommend trying [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys). [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys "Link to this keyword") #### Documentation Simulates the user pressing key(s) to an element or on the active browser. If `locator` evaluates as false, see [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details, then the `keys` are sent to the currently active browser. Otherwise element is searched and `keys` are send to the element identified by the `locator`. In later case, keyword fails if element is not found. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `keys` arguments can contain one or many strings, but it can not be empty. `keys` can also be a combination of [Selenium Keys](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html) and strings or a single Selenium Key. If Selenium Key is combined with strings, Selenium key and strings must be separated by the \+ character, like in CONTROL+c. Selenium Keys are space and case sensitive and Selenium Keys are not parsed inside of the string. Example AALTO, would send string AALTO and ALT not parsed inside of the string. But A+ALT+O would found Selenium ALT key from the `keys` argument. It also possible to press many Selenium Keys down at the same time, example 'ALT+ARROW\_DOWN\`. If Selenium Keys are detected in the `keys` argument, keyword will press the Selenium Key down, send the strings and then release the Selenium Key. If keyword needs to send a Selenium Key as a string, then each character must be separated with \+ character, example E+N+D. CTRL is alias for [Selenium CONTROL](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.CONTROL) and ESC is alias for [Selenium ESCAPE](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html#selenium.webdriver.common.keys.Keys.ESCAPE) New in SeleniumLibrary 3.3 Examples: | | | | | | |---|---|---|---|---| | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | AAAAA | | \# Sends string "AAAAA" to element. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | None | BBBBB | | \# Sends string "BBBBB" to currently active browser. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | E+N+D | | \# Sends string "END" to element. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | XXX | YY | \# Sends strings "XXX" and "YY" to element. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | XXX+YY | | \# Same as above. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | ALT+ARROW\_DOWN | | \# Pressing "ALT" key down, then pressing ARROW\_DOWN and then releasing both keys. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | ALT | ARROW\_DOWN | \# Pressing "ALT" key and then pressing ARROW\_DOWN. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | text\_field | CTRL+c | | \# Pressing CTRL key down, sends string "c" and then releases CTRL key. | | [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) | button | RETURN | | \# Pressing "ENTER" key to element. | [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) and [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) differ in the methods to simulate key presses. [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) uses the Selenium/WebDriver Actions. [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) also has a more extensive syntax for describing keys, key combinations, and key actions. Although one is not recommended over the other if [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) does not work we recommend trying [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key). [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf "Link to this keyword") #### Documentation 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. [Radio Button Should Be Set To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Be%20Set%20To "Link to this keyword") #### Documentation Verifies radio button group `group_name` is set to `value`. `group_name` is the `name` of the radio button group. [Radio Button Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Not%20Be%20Selected "Link to this keyword") #### Documentation Verifies radio button group `group_name` has no selection. `group_name` is the `name` of the radio button group. [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure "Link to this keyword") #### Documentation Sets the keyword to execute, when a SeleniumLibrary keyword fails. `keyword` is the name of a keyword that will be executed if a SeleniumLibrary keyword fails. It is possible to use any available keyword, including user keywords or keywords from other libraries, but the keyword must not take any arguments. The initial keyword to use is set when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library, and the keyword that is used by default is [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot). Taking a screenshot when something failed is a very useful feature, but notice that it can slow down the execution. It is possible to use string `NOTHING` or `NONE`, case-insensitively, as well as Python `None` to disable this feature altogether. This keyword returns the name of the previously registered failure keyword or Python `None` if this functionality was previously disabled. The return value can be always used to restore the original value later. Example: Changes in SeleniumLibrary 3.0: - Possible to use string `NONE` or Python `None` to disable the functionality. - Return Python `None` when the functionality was disabled earlier. In previous versions special value `No Keyword` was returned and it could not be used to restore the original state. [Reload Page](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Reload%20Page "Link to this keyword") #### Documentation Simulates user reloading page. [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy "Link to this keyword") #### Documentation Removes a previously added custom location strategy. See [Custom locators](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Custom%20locators) for information on how to create and use custom strategies. [Select All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20All%20From%20List "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Selects all options from multi-selection list `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Select Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Checkbox "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Selects the checkbox identified by `locator`. Does nothing if checkbox is already selected. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Sets frame identified by `locator` as the current frame. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Works both with frames and iframes. Use [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame) to cancel the frame selection and return to the main frame. Example: | | | | |---|---|---| | [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) | top-frame | \# Select frame with id or name 'top-frame' | | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | example | \# Click link 'example' in the selected frame | | [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame) | | \# Back to main frame. | | [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) | //iframe\[@name='xxx'\] | \# Select frame using xpath | [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* indexes [str]("Click to show type information") #### Documentation Selects options from selection list `locator` by `indexes`. Indexes of list options start from 0. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Select From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* labels [str]("Click to show type information") #### Documentation Selects options from selection list `locator` by `labels`. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Select From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* values [str]("Click to show type information") #### Documentation Selects options from selection list `locator` by `values`. If more than one option is given for a single-selection list, the last value will be selected. With multi-selection lists all specified options are selected, but possible old selections are not cleared. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button "Link to this keyword") #### Documentation Sets the radio button group `group_name` to `value`. The radio button to be selected is located by two arguments: - `group_name` is the name of the radio button group. - `value` is the `id` or `value` attribute of the actual radio button. Examples: [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay "Link to this keyword") #### Documentation Sets the duration of delay in ActionChains() used by SeleniumLibrary. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. Value is always stored as milliseconds internally. The previous value is returned and can be used to restore the original value later if needed. [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait "Link to this keyword") #### Documentation Sets the implicit wait value used by Selenium. Same as [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) but only affects the current browser. [Set Focus To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Focus%20To%20Element "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Sets the focus to the element identified by `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Prior to SeleniumLibrary 3.0 this keyword was named Focus. [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory "Link to this keyword") #### Documentation Sets the directory for captured screenshots. `path` argument specifies the absolute path to a directory where the screenshots should be written to. If the directory does not exist, it will be created. The directory can also be set when [importing](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Importing) the library. If it is not configured anywhere, screenshots are saved to the same directory where Robot Framework's log file is written. If `path` equals to EMBED (case insensitive) and [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) or [capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) keywords filename argument is not changed from the default value, then the page or element screenshot is embedded as Base64 image to the log.html. The previous value is returned and can be used to restore the original value later if needed. Returning the previous value is new in SeleniumLibrary 3.0. The persist argument was removed in SeleniumLibrary 3.2 and EMBED is new in SeleniumLibrary 4.2. [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait "Link to this keyword") #### Documentation Sets the implicit wait value used by Selenium. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. This keyword sets the implicit wait for all opened browsers. Use [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait) to set it only to the current browser. See the [Implicit wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Implicit%20wait) section above for more information. Example: | | | | |---|---|---| | \${orig wait} = | [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) | 10 seconds | | Perform AJAX call that is slow | | | | [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) | \${orig wait} | | [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout "Link to this keyword") #### Documentation Sets the page load timeout value used by Selenium. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. In contrast to [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) and [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait), this keywords sets the time for the Webdriver to wait until the page is loaded before raising a timeout exception. See the [Page load](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20load) section above for more information. Example: | | | | |---|---|---| | \${orig page load timeout} = | [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) | 30 seconds | | Open page that loads slowly | | | | [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) | \${orig page load timeout} | | New in SeleniumLibrary 6.1 [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed "Link to this keyword") #### Documentation Sets the delay that is waited after each Selenium command. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. See the [Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Selenium%20speed) section above for more information. Example: | | | |---|---| | [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) | 0\.5 seconds | [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout "Link to this keyword") #### Documentation Sets the timeout that is used by various keywords. The value can be given as a number that is considered to be seconds or as a human-readable string like `1 second`. The previous value is returned and can be used to restore the original value later if needed. See the [Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeout) section above for more information. Example: | | | | |---|---|---| | \${orig timeout} = | [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) | 15 seconds | | Open page that loads slowly | | | | [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) | \${orig timeout} | | [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position "Link to this keyword") #### Documentation Sets window position using `x` and `y` coordinates. The position is relative to the top left corner of the screen, but some browsers exclude possible task bar set by the operating system from the calculation. The actual position may thus be different with different browsers. Values can be given using strings containing numbers or by using actual numbers. See also [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position). Example: [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size "Link to this keyword") #### Documentation Sets current windows size to given `width` and `height`. Values can be given using strings containing numbers or by using actual numbers. See also [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size). Browsers have a limit on their minimum size. Trying to set them smaller will cause the actual size to be bigger than the requested size. If `inner` parameter is set to True, keyword sets the necessary window width and height to have the desired HTML DOM *window.innerWidth* and *window.innerHeight*. See [Boolean arguments](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Boolean%20arguments) for more details on how to set boolean arguments. The `inner` argument is new since SeleniumLibrary 4.0. This `inner` argument does not support Frames. If a frame is selected, switch to default before running this. Example: | | | | | |---|---|---|---| | [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) | 800 | 600 | | | [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) | 800 | 600 | True | [Simulate Event](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Simulate%20Event "Link to this keyword") #### Documentation Simulates `event` on the element identified by `locator`. This keyword is useful if element has `OnEvent` handler that needs to be explicitly invoked. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Prior to SeleniumLibrary 3.0 this keyword was named Simulate. [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form "Link to this keyword") #### Documentation Submits a form identified by `locator`. If `locator` is not given, first form on the page is submitted. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser "Link to this keyword") #### Documentation Switches between active browsers using `index_or_alias`. Indices are returned by the [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) keyword and aliases can be given to it explicitly. Indices start from 1. Example: | | | | | |---|---|---|---| | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://google.com](http://google.com/) | ff | | | [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) | [http://google.com](http://google.com/) | | | | [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) | [http://yahoo.com](http://yahoo.com/) | ie | alias=second | | [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) | [http://yahoo.com](http://yahoo.com/) | | | | [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) | 1 | \# index | | | [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) | I'm feeling lucky | | | | [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) | second | \# alias | | | [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) | More Yahoo\! | | | | [Close All Browsers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Close%20All%20Browsers) | | | | Above example expects that there was no other open browsers when opening the first one because it used index `1` when switching to it later. If you are not sure about that, you can store the index into a variable as below. [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window "Link to this keyword") #### Documentation Switches to browser window matching `locator`. If the window is found, all subsequent commands use the selected window, until this keyword is used again. If the window is not found, this keyword fails. The previous windows handle is returned and can be used to switch back to it later. Notice that alerts should be handled with [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) or other alert related keywords. The `locator` can be specified using different strategies somewhat similarly as when [locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) on pages. - By default, the `locator` is matched against window handle, name, title, and URL. Matching is done in that order and the first matching window is selected. - The `locator` can specify an explicit strategy by using the format `strategy:value` (recommended) or `strategy=value`. Supported strategies are `name`, `title`, and `url`. These matches windows using their name, title, or URL, respectively. Additionally, `default` can be used to explicitly use the default strategy explained above. - If the `locator` is `NEW` (case-insensitive), the latest opened window is selected. It is an error if this is the same as the current window. - If the `locator` is `MAIN` (default, case-insensitive), the main window is selected. - If the `locator` is `CURRENT` (case-insensitive), nothing is done. This effectively just returns the current window handle. - If the `locator` is not a string, it is expected to be a list of window handles *to exclude*. Such a list of excluded windows can be got from [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) before doing an action that opens a new window. The `timeout` is used to specify how long keyword will poll to select the new window. The `timeout` is new in SeleniumLibrary 3.2. Example: | | | | | |---|---|---|---| | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | popup1 | | \# Open new window | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | example | | \# Select window using default strategy | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 1 | | | | [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) | popup2 | | \# Open another window | | \${handle} = | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | NEW | \# Select latest opened window | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 2 | | | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | \${handle} | | \# Select window using handle | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 1 | | | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | MAIN | | \# Select the main window | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Main | | | | \${excludes} = | [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) | | \# Get list of current windows | | [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) | popup3 | | \# Open one more window | | [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) | \${excludes} | | \# Select window using excludes | | [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) | Pop-up 3 | | | The `browser` argument allows with `index_or_alias` to implicitly switch to a specific browser when switching to a window. See [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) - If the `browser` is `CURRENT` (case-insensitive), no other browser is selected. **NOTE:** - The `strategy:value` syntax is only supported by SeleniumLibrary 3.0 and newer. - Prior to SeleniumLibrary 3.0 matching windows by name, title and URL was case-insensitive. - Earlier versions supported aliases `None`, `null` and the empty string for selecting the main window, and alias `self` for selecting the current window. Support for these aliases was removed in SeleniumLibrary 3.2. [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain "Link to this keyword") #### Documentation Verifies table cell contains text `expected`. See [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) that this keyword uses internally for an explanation about accepted arguments. [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] column [int]("Click to show type information") expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table column contains text `expected`. The table is located using the `locator` argument and its column found using `column`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Column indexes start from 1. It is possible to refer to columns from the end by using negative indexes so that -1 is the last column, -2 is the second last, and so on. If a table contains cells that span multiple columns, those merged cells count as a single column. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain "Link to this keyword") #### Documentation Verifies that table row contains text `expected`. The table is located using the `locator` argument and its column found using `column`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. Row indexes start from 1. It is possible to refer to rows from the end by using negative indexes so that -1 is the last row, -2 is the second last, and so on. If a table contains cells that span multiple rows, a match only occurs for the uppermost row of those merged cells. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. [Table Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Should%20Contain "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] expected [str]("Click to show type information") loglevel \= TRACE [str]("Click to show type information") #### Documentation Verifies table contains text `expected`. The table is located using the `locator` argument. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. See [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) for an explanation about the `loglevel` argument. [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain "Link to this keyword") #### Documentation Verifies text area `locator` contains text `expected`. `message` can be used to override default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be "Link to this keyword") #### Documentation Verifies text area `locator` has exactly text `expected`. `message` can be used to override default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain "Link to this keyword") #### Documentation Verifies text field `locator` contains text `expected`. `message` can be used to override the default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be "Link to this keyword") #### Documentation Verifies text field `locator` has exactly text `expected`. `message` can be used to override default error message. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be "Link to this keyword") #### Documentation Verifies that the current page title equals `title`. The `message` argument can be used to override the default error message. `message` argument is new in SeleniumLibrary 3.1. [Unselect All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20All%20From%20List "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Unselects all options from multi-selection list `locator`. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. New in SeleniumLibrary 3.0. [Unselect Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Checkbox "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] #### Documentation Removes the selection of checkbox identified by `locator`. Does nothing if the checkbox is not selected. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Unselect Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Frame "Link to this keyword") #### Documentation Sets the main frame as the current frame. In practice cancels the previous [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) call. [Unselect From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Index "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* indexes [str]("Click to show type information") #### Documentation Unselects options from selection list `locator` by `indexes`. Indexes of list options start from 0. This keyword works only with multi-selection lists. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Unselect From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Label "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* labels [str]("Click to show type information") #### Documentation Unselects options from selection list `locator` by `labels`. This keyword works only with multi-selection lists. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Unselect From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Value "Link to this keyword") #### Arguments locator WebElement \| [str]("Click to show type information") \| [List]("Click to show type information") \[ WebElement \| [str]("Click to show type information") \] \* values [str]("Click to show type information") #### Documentation Unselects options from selection list `locator` by `values`. This keyword works only with multi-selection lists. See the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition "Link to this keyword") #### Documentation Waits until `condition` is true or `timeout` expires. The condition can be arbitrary JavaScript expression but it must return a value to be evaluated. See [Execute JavaScript](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Execute%20Javascript) for information about accessing content on pages. Fails if the timeout expires before the condition becomes true. See the Timeouts section for more information about using timeouts and their default value. `error` can be used to override the default error message. Examples: | | | |---|---| | [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) | return document.title == "New Title" | | [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) | return jQuery.active == 0 | | [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) | style = document.querySelector('h1').style; return style.background == "red" && style.color == "white" | [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition "Link to this keyword") #### Arguments condition \<module 'string' from '/Users/emanlove/.pyenv/versions/3.12.6/lib/python3.12/string.py'\> \* args 🏷 timeout \= 10 [float]("Click to show type information") \| [None]("Click to show type information") #### Documentation Waits until `condition` is true or `timeout` expires. The condition must be one of selenium's expected condition which can be found within the selenium [Python API](https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html#module-selenium.webdriver.support.expected_conditions) 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 be passed along after the expected condition. Fails if the timeout expires before the condition becomes true. The default value is 10 seconds. Examples: | | | | |---|---|---| | [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) | alert\_is\_present | | | [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) | Title Is | New Title | If the expected condition expects a locator then one can pass as arguments a tuple containing the selenium locator strategies and the locator. Example of expected condition expecting locator: ``` ${byElem}= | Evaluate ("id","added_btn") Wait For Expected Condition | Presence Of Element Located | ${byElem} ``` [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains "Link to this keyword") #### Documentation Waits until the element `locator` contains `text`. Fails if `timeout` expires before the text appears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain "Link to this keyword") #### Documentation Waits until the element `locator` does not contain `text`. Fails if `timeout` expires before the text disappears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled "Link to this keyword") #### Documentation Waits until the element `locator` is enabled. Element is considered enabled if it is not disabled nor read-only. Fails if `timeout` expires before the element is enabled. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. Considering read-only elements to be disabled is a new feature in SeleniumLibrary 3.0. [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible "Link to this keyword") #### Documentation Waits until the element `locator` is not visible. Fails if `timeout` expires before the element is not visible. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible "Link to this keyword") #### Documentation Waits until the element `locator` is visible. Fails if `timeout` expires before the element is visible. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains "Link to this keyword") #### Documentation Waits until the current URL contains `expected`. The `expected` argument contains the expected value in url. Fails if `timeout` expires before the location contains. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.0 [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain "Link to this keyword") #### Documentation Waits until the current URL does not contains `location`. The `location` argument contains value not expected in url. Fails if `timeout` expires before the location not contains. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.3 [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is "Link to this keyword") #### Documentation Waits until the current URL is `expected`. The `expected` argument is the expected value in url. Fails if `timeout` expires before the location is. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.0 [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not "Link to this keyword") #### Documentation Waits until the current URL is not `location`. The `location` argument is the unexpected value in url. Fails if `timeout` expires before the location is not. See the Timeouts section for more information about using timeouts and their default value. The `message` argument can be used to override the default error message. New in SeleniumLibrary 4.3 [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains "Link to this keyword") #### Documentation Waits until `text` appears on the current page. Fails if `timeout` expires before the text appears. See the Timeouts section for more information about using timeouts and their default value. `error` can be used to override the default error message. [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element "Link to this keyword") #### Documentation Waits until the element `locator` appears on the current page. Fails if `timeout` expires before the element appears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. The `limit` argument can used to define how many elements the page should contain. When `limit` is [None](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#type-None) (default) page can contain one or more elements. When limit is a number, page must contain same number of elements. `limit` is new in SeleniumLibrary 4.4 [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain "Link to this keyword") #### Documentation Waits until `text` disappears from the current page. Fails if `timeout` expires before the text disappears. See the Timeouts section for more information about using timeouts and their default value. `error` can be used to override the default error message. [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element "Link to this keyword") #### Documentation Waits until the element `locator` disappears from the current page. Fails if `timeout` expires before the element disappears. See the Timeouts section for more information about using timeouts and their default value and the [Locating elements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Locating%20elements) section for details about the locator syntax. `error` can be used to override the default error message. The `limit` argument can used to define how many elements the page should not contain. When `limit` is [None](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#type-None) (default) page can\`t contain any elements. When limit is a number, page must not contain same number of elements. `limit` is new in SeleniumLibrary 4.4 ## Data types Any (Standard) #### Documentation Any value is accepted. No conversion is done. #### Converted Types - Any boolean (Standard) #### Documentation Strings `TRUE`, `YES`, `ON` and `1` are converted to Boolean `True`, the empty string as well as strings `FALSE`, `NO`, `OFF` and `0` are converted to Boolean `False`, and the string `NONE` is converted to the Python `None` object. Other strings and other accepted values are passed as-is, allowing keywords to handle them specially if needed. All string comparisons are case-insensitive. Examples: `TRUE` (converted to `True`), `off` (converted to `False`), `example` (used as-is) #### Converted Types - string - integer - float - None #### Usages - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) - [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) - [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) - [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image) - [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies) - [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) - [Get Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Size) - [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) - [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) dictionary (Standard) #### Documentation Strings must be Python [dictionary](https://docs.python.org/library/stdtypes.html#dict) literals. They are converted to actual dictionaries using the [ast.literal\_eval](https://docs.python.org/library/ast.html#ast.literal_eval) function. They can contain any values `ast.literal_eval` supports, including dictionaries and other containers. If the type has nested types like `dict[str, int]`, items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: `{'a': 1, 'b': 2}`, `{'key': 1, 'nested': {'key': 2}}` #### Converted Types - string - Mapping float (Standard) #### Documentation Conversion is done using Python's [float](https://docs.python.org/library/functions.html#float) built-in function. Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes. Examples: `3.14`, `2.9979e8`, `10 000.000 01` #### Converted Types - string - Real integer (Standard) #### Documentation Conversion is done using Python's [int](https://docs.python.org/library/functions.html#int) built-in function. Floating point numbers are accepted only if they can be represented as integers exactly. For example, `1.0` is accepted and `1.1` is not. Starting from RF 4.1, it is possible to use hexadecimal, octal and binary numbers by prefixing values with `0x`, `0o` and `0b`, respectively. Starting from RF 4.1, spaces and underscores can be used as visual separators for digit grouping purposes. Examples: `42`, `-1`, `0b1010`, `10 000 000`, `0xBAD_C0FFEE` #### Converted Types - string - float #### Usages - [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates) - [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) - [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position) - [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) - [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position) - [Get Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Position) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Set Window Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Position) - [Set Window Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size) - [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain) - [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain) - [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) list (Standard) None (Standard) #### Documentation String `NONE` (case-insensitive) is converted to Python `None` object. Other values cause an error. #### Converted Types - string #### Usages - [\_\_init\_\_](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#__init__) - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) - [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) - [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) - [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button) - [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image) - [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link) - [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List) - [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button) - [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield) - [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button) - [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox) - [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element) - [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image) - [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link) - [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List) - [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button) - [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield) - [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) - [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) - [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form) - [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) - [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain) - [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be) - [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain) - [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be) - [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait For Expected Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Expected%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) string (Standard) #### Documentation All arguments are converted to Unicode strings. #### Converted Types - Any #### Usages - [\_\_init\_\_](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#__init__) - [Add Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Cookie) - [Add Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Add%20Location%20Strategy) - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Assign Id To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Assign%20Id%20To%20Element) - [Capture Element Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Element%20Screenshot) - [Capture Page Screenshot](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Capture%20Page%20Screenshot) - [Checkbox Should Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Be%20Selected) - [Checkbox Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Checkbox%20Should%20Not%20Be%20Selected) - [Choose File](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Choose%20File) - [Clear Element Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Clear%20Element%20Text) - [Click Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Button) - [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) - [Click Element At Coordinates](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element%20At%20Coordinates) - [Click Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Image) - [Click Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link) - [Cover Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Cover%20Element) - [Create Webdriver](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Create%20Webdriver) - [Current Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Contain) - [Current Frame Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Current%20Frame%20Should%20Not%20Contain) - [Double Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Double%20Click%20Element) - [Drag And Drop](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop) - [Drag And Drop By Offset](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Drag%20And%20Drop%20By%20Offset) - [Element Attribute Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Attribute%20Value%20Should%20Be) - [Element Should Be Disabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Disabled) - [Element Should Be Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Enabled) - [Element Should Be Focused](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Focused) - [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) - [Element Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Contain) - [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) - [Element Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Contain) - [Element Text Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Be) - [Element Text Should Not Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Text%20Should%20Not%20Be) - [Frame Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Frame%20Should%20Contain) - [Get All Links](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20All%20Links) - [Get Browser Aliases](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Aliases) - [Get Browser Ids](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Browser%20Ids) - [Get Cookie](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookie) - [Get Cookies](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Cookies) - [Get Dom Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Dom%20Attribute) - [Get Element Attribute](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Attribute) - [Get Element Count](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Count) - [Get Element Size](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Element%20Size) - [Get Horizontal Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Horizontal%20Position) - [Get List Items](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20List%20Items) - [Get Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Location) - [Get Locations](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Locations) - [Get Property](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Property) - [Get Selected List Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Label) - [Get Selected List Labels](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Labels) - [Get Selected List Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Value) - [Get Selected List Values](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selected%20List%20Values) - [Get Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Implicit%20Wait) - [Get Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Page%20Load%20Timeout) - [Get Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Speed) - [Get Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Selenium%20Timeout) - [Get Session Id](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Session%20Id) - [Get Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Source) - [Get Table Cell](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Table%20Cell) - [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text) - [Get Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Title) - [Get Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Value) - [Get Vertical Position](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Vertical%20Position) - [Get WebElement](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElement) - [Get WebElements](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20WebElements) - [Get Window Handles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Handles) - [Get Window Identifiers](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Identifiers) - [Get Window Names](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Names) - [Get Window Titles](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Window%20Titles) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Password](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Password) - [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [List Selection Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Selection%20Should%20Be) - [List Should Have No Selections](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#List%20Should%20Have%20No%20Selections) - [Location Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Be) - [Location Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Location%20Should%20Contain) - [Log Location](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Location) - [Log Source](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Source) - [Log Title](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Log%20Title) - [Mouse Down](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down) - [Mouse Down On Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Image) - [Mouse Down On Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Down%20On%20Link) - [Mouse Out](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Out) - [Mouse Over](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Over) - [Mouse Up](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Mouse%20Up) - [Open Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser) - [Open Context Menu](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Context%20Menu) - [Page Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain) - [Page Should Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Button) - [Page Should Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Checkbox) - [Page Should Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Element) - [Page Should Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Image) - [Page Should Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Link) - [Page Should Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20List) - [Page Should Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Radio%20Button) - [Page Should Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Contain%20Textfield) - [Page Should Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain) - [Page Should Not Contain Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Button) - [Page Should Not Contain Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Checkbox) - [Page Should Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Element) - [Page Should Not Contain Image](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Image) - [Page Should Not Contain Link](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Link) - [Page Should Not Contain List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20List) - [Page Should Not Contain Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Radio%20Button) - [Page Should Not Contain Textfield](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Page%20Should%20Not%20Contain%20Textfield) - [Press Key](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Key) - [Press Keys](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Press%20Keys) - [Print Page As Pdf](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Print%20Page%20As%20Pdf) - [Radio Button Should Be Set To](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Be%20Set%20To) - [Radio Button Should Not Be Selected](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Radio%20Button%20Should%20Not%20Be%20Selected) - [Register Keyword To Run On Failure](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Register%20Keyword%20To%20Run%20On%20Failure) - [Remove Location Strategy](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Remove%20Location%20Strategy) - [Scroll Element Into View](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Scroll%20Element%20Into%20View) - [Select All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20All%20From%20List) - [Select Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Checkbox) - [Select Frame](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Frame) - [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index) - [Select From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label) - [Select From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value) - [Select Radio Button](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20Radio%20Button) - [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay) - [Set Focus To Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Focus%20To%20Element) - [Set Screenshot Directory](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) - [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) - [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) - [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) - [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) - [Simulate Event](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Simulate%20Event) - [Submit Form](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Submit%20Form) - [Switch Browser](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser) - [Switch Window](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Window) - [Table Cell Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Cell%20Should%20Contain) - [Table Column Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Column%20Should%20Contain) - [Table Footer Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Footer%20Should%20Contain) - [Table Header Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Header%20Should%20Contain) - [Table Row Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Row%20Should%20Contain) - [Table Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Table%20Should%20Contain) - [Textarea Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Should%20Contain) - [Textarea Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textarea%20Value%20Should%20Be) - [Textfield Should Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Should%20Contain) - [Textfield Value Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Textfield%20Value%20Should%20Be) - [Title Should Be](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Title%20Should%20Be) - [Unselect All From List](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20All%20From%20List) - [Unselect Checkbox](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20Checkbox) - [Unselect From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Index) - [Unselect From List By Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Label) - [Unselect From List By Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Unselect%20From%20List%20By%20Value) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) timedelta (Standard) #### Documentation Strings are expected to represent a time interval in one of the time formats Robot Framework supports: - a number representing seconds like `42` or `10.5` - a time string like `1 hour 2 seconds` or `1h 2s` - a "timer" string like `01:02` (1 minute 2 seconds) or `01:00:03` (1 hour 3 seconds) Integers and floats are considered to be seconds. See the [Robot Framework User Guide](https://robotframework.org/robotframework/) for more details about the supported time formats. #### Converted Types - string - integer - float #### Usages - [Alert Should Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Be%20Present) - [Alert Should Not Be Present](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Alert%20Should%20Not%20Be%20Present) - [Handle Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert) - [Input Text Into Alert](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text%20Into%20Alert) - [Set Action Chain Delay](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Action%20Chain%20Delay) - [Set Browser Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Browser%20Implicit%20Wait) - [Set Selenium Implicit Wait](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Implicit%20Wait) - [Set Selenium Page Load Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Page%20Load%20Timeout) - [Set Selenium Speed](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Speed) - [Set Selenium Timeout](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Selenium%20Timeout) - [Wait For Condition](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20For%20Condition) - [Wait Until Element Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Contains) - [Wait Until Element Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Does%20Not%20Contain) - [Wait Until Element Is Enabled](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Enabled) - [Wait Until Element Is Not Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Not%20Visible) - [Wait Until Element Is Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Element%20Is%20Visible) - [Wait Until Location Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Contains) - [Wait Until Location Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Does%20Not%20Contain) - [Wait Until Location Is](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is) - [Wait Until Location Is Not](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Location%20Is%20Not) - [Wait Until Page Contains](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains) - [Wait Until Page Contains Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Contains%20Element) - [Wait Until Page Does Not Contain](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain) - [Wait Until Page Does Not Contain Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Wait%20Until%20Page%20Does%20Not%20Contain%20Element) tuple (Standard) #### Documentation Strings must be Python [tuple](https://docs.python.org/library/stdtypes.html#tuple) literals. They are converted to actual tuples using the [ast.literal\_eval](https://docs.python.org/library/ast.html#ast.literal_eval) function. They can contain any values `ast.literal_eval` supports, including tuples and other containers. If the type has nested types like `tuple[str, int, int]`, items are converted to those types automatically. This in new in Robot Framework 6.0. Examples: `('one', 'two')`, `(('one', 1), ('two', 2))` #### Converted Types - string - Sequence
Shard15 (laksa)
Root Hash1181309642191291415
Unparsed URLorg,robotframework!/SeleniumLibrary/SeleniumLibrary.html s443