diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 40542641dc..e6792de04c 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/libraries/http/python.doctree b/.doctrees/libraries/http/python.doctree index 33cacec9e2..cdf75ae846 100644 Binary files a/.doctrees/libraries/http/python.doctree and b/.doctrees/libraries/http/python.doctree differ diff --git a/.doctrees/releasenotes.doctree b/.doctrees/releasenotes.doctree index 9811b6bb2f..99713d2eea 100644 Binary files a/.doctrees/releasenotes.doctree and b/.doctrees/releasenotes.doctree differ diff --git a/_sources/releasenotes.rst.txt b/_sources/releasenotes.rst.txt index 20910a6021..bc6d214604 100644 --- a/_sources/releasenotes.rst.txt +++ b/_sources/releasenotes.rst.txt @@ -27,6 +27,7 @@ Security releases regarding dependency packages `pillow`, `cryptography` and `ai - package ``rpaframework-hubspot`` **1.0.1** - package ``rpaframework-openai`` **1.3.2** - package ``rpaframework-pdf`` **7.3.2** +- package ``rpaframework-recognition`` **5.2.4** - package ``rpaframework-windows`` **7.5.1** .. note:: diff --git a/latest.json b/latest.json index e8d93ac1ec..1d1a5cac25 100644 --- a/latest.json +++ b/latest.json @@ -4,7 +4,7 @@ "name": "RPA.Archive", "doc": "
\n

Archive is a library for operating with ZIP and TAR packages.

\n

Examples

\n
\n*** Settings ***\nLibrary  RPA.Archive\n\n*** Tasks ***\nCreating a ZIP archive\n   Archive Folder With ZIP   ${CURDIR}${/}tasks  tasks.zip   recursive=True  include=*.robot  exclude=/.*\n   @{files}                  List Archive             tasks.zip\n   FOR  ${file}  IN  ${files}\n      Log  ${file}\n   END\n   Add To Archive            .${/}..${/}missing.robot  tasks.zip\n   &{info}                   Get Archive Info\n
\n
\nfrom RPA.Archive import Archive\n\nlib = Archive()\nlib.archive_folder_with_tar('./tasks', 'tasks.tar', recursive=True)\nfiles = lib.list_archive('tasks.tar')\nfor file in files:\n   print(file)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:42", + "generated": "2024-04-03 09:44:58", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -462,7 +462,7 @@ "name": "RPA.Assistant", "doc": "
\n

The Assistant library provides a way to display information to a user\nand request input while a robot is running. It allows building processes\nthat require human interaction. Also it offers capabilities of running\nother robots inside the current one and determine what to display to the\nuser based on his previous responses.

\n

It is not included in the rpaframework package, so in order to use it\nyou have to add rpaframework-assistant with the desired version in your\nconda.yaml file

\n

Some examples of use-cases could be the following:

\n\n

Workflow

\n

The library is used to create dialogs, i.e. windows, that can be composed\non-the-fly based on the current state of the execution.

\n

The content of the dialog is defined by calling relevant keywords\nsuch as Add text or Add file input. When the dialog is opened\nthe content is generated based on the previous keywords.

\n

Depending on the way the dialog is started, the execution will either\nblock or continue while the dialog is open. During this time the user\ncan freely edit any possible input fields or handle other tasks.

\n

After the user has successfully submitted the dialog, any possible\nentered input will be returned as a result. The user also has the option\nto abort by closing the dialog window forcefully.

\n

Results

\n

Each input field has a required name argument that controls what\nthe value will be called in the result object. Each input name should be\nunique, and must not be called submit as that is reserved for the submit\nbutton value.

\n

A result object is a Robot Framework DotDict, where each key\nis the name of the input field and the value is what the user entered.\nThe data type of each field depends on the input. For instance,\na text input will have a string, a checkbox will have a boolean, and\na file input will have a list of paths.

\n

If the user closed the window before submitting or there was an internal\nerror, the results object returned by Run Dialog or Ask User won't have a "submit"\nkey.

\n

Layouting

\n

By default elements are added to the assistant dialog from top to bottom, with a bit\nof margin around each element to add spaciousness. This margin is added as a\nContainer you can manually use Open Container to override the default\ncontainer. You can use it to set smaller margins.

\n

You can combine layouting elements with each other. Layouting elements need to be\nclosed with the corresponding Close keyword. (So Open Row and then\nClose Row.)

\n

Open Row can be used to layout elements in the same row.

\n

Open Column can be used to layout elements in columns.

\n

Open Stack and multiple Open Container's inside it can be used to set\npositions like Center, Topleft, BottomRight, or coordinate tuples likes (0, 0),\n(100, 100) and such.

\n

Open Container can bse used for absolute positioning inside a Stack, or anywhere\nfor setting background color or margins and paddings.

\n

Open Navbar can be used to make a navigation bar that will stay at the top of\nthe dialog. Its contents won't be cleared when.

\n

Examples

\n
\n*** Keywords ***\nSuccess dialog\n    Add icon      Success\n    Add heading   Your orders have been processed\n    Add files     *.txt\n    Run dialog    title=Success\n\nFailure dialog\n    Add icon      Failure\n    Add heading   There was an error\n    Add text      The assistant failed to login to the Enterprise portal\n    Add link      https://robocorp.com/docs    label=Troubleshooting guide\n    Run dialog    title=Failure\n\nLarge dialog\n    Add heading    A real chonker   size=large\n    Add image      fat-cat.jpeg\n    Run dialog     title=Large    height=1024    width=1024\n\nConfirmation dialog\n    Add icon      Warning\n    Add heading   Delete user ${username}?\n    Add submit buttons    buttons=No,Yes    default=Yes\n    ${result}=    Run dialog\n    IF   $result.submit == "Yes"\n        Delete user    ${username}\n    END\n\nInput form dialog\n    Add heading       Send feedback\n    Add text input    email    label=E-mail address\n    Add text input    message\n    ...    label=Feedback\n    ...    placeholder=Enter feedback here\n    ...    maximum_rows=5\n    ${result}=    Run dialog\n    Send feedback message    ${result.email}  ${result.message}\n
\n
\ndef success_dialog():\n    assistant = Assistant()\n    assistant.add_icon("success")\n    assistant.add_heading("Your orders have been processed")\n    assistant.add_files("*.txt")\n    assistant.run_dialog(title="Success")\n\ndef failure_dialog():\n    assistant = Assistant()\n    assistant.add_icon("failure")\n    assistant.add_heading("There was an error")\n    assistant.add_text("The assistant failed to login to the Enterprise portal")\n    assistant.add_link("https://robocorp.com/docs", label="Troubleshooting guide")\n    assistant.add_files("*.txt")\n    assistant.run_dialog(title="Failure")\n\ndef large_dialog():\n    assistant = Assistant()\n    assistant.add_heading("A real chonker", size="large")\n    assistant.add_image("fat-cat.jpeg")\n    assistant.run_dialog(title="Large", height=1024, width=1024)\n\ndef confirmation_dialog():\n    assistant = Assistant()\n    assistant.add_icon("warning")\n    assistant.add_heading("Delete user ${username}?")\n    assistant.add_submit_buttons(buttons="No, Yes", default="Yes")\n    result = assistant.run_dialog()\n    if result.submit == "Yes":\n        delete_user(username)\n\ndef input_from_dialog():\n    assistant = Assistant()\n    assistant.add_heading("Send feedback")\n    assistant.add_text_input("email", label="E-mail address")\n    assistant.add_text_input("message", label="Feedback", placeholder="Enter feedback here", maximum_rows=5)\n    assistant.add_submit_buttons("Submit", default="Submit")\n    result = assistant.run_dialog()\n    send_feedback_message(result.email, result.message)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:42", + "generated": "2024-04-03 09:44:59", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -2671,7 +2671,7 @@ "name": "RPA.Browser", "doc": "

SeleniumLibrary is a web testing library for Robot Framework.

\n

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.

\n

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.

\n\n

Locating elements

\n

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.

\n

Locator syntax

\n

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.

\n

Default locator strategy

\n

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.

\n

Examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Click Elementexample# Match based on id or name.
Click Linkexample# Match also based on link text and href.
Click Buttonexample# Match based on id, name or value.
\n

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.

\n

Examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Click Elementname:foo# Find element with name foo.
Click Elementdefault:name:foo# Use default strategy with value name:foo.
Click Element//foo# Find element using XPath //foo.
Click Elementdefault: //foo# Use default strategy with value //foo.
\n

Explicit locator strategy

\n

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.

\n

Locator strategies that are supported by default are listed in the table below. In addition to them, it is possible to register custom locators.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
StrategyMatch based onExample
idElement id.id:example
namename attribute.name:example
identifierEither id or name.identifier:example
classElement class.class:example
tagTag name.tag:div
xpathXPath expression.xpath://div[@id=\"example\"]
cssCSS selector.css:div#example
domDOM expression.dom:document.images[5]
linkExact text a link has.link:The example
partial linkPartial link text.partial link:he ex
sizzleSizzle selector deprecated.sizzle:div.example
dataElement data-* attributedata:id:my_id
jqueryjQuery expression.jquery:div.example
defaultKeyword specific default behavior.default:example
\n

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.

\n

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.

\n

Examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Click Elementid:foo# Element with id 'foo'.
Click Elementcss:div#foo h1# h1 element under div with id 'foo'.
Click Elementxpath: //div[@id=\"foo\"]//h1# Same as the above using XPath, not CSS.
Click Elementxpath: //*[contains(text(), \"example\")]# Element containing text 'example'.
\n

NOTE:

\n\n

Implicit XPath strategy

\n

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))

\n

Examples:

\n\n\n\n\n\n\n\n\n\n
Click Element//div[@id=\"foo\"]//h1
Click Element(//div)[2]
\n

The support for the (// prefix is new in SeleniumLibrary 3.0. Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0.

\n

Chaining locators

\n

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.

\n

Although all locators support chaining, some locator strategies do not abey the chaining. This is because some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context and not for the element found be the previous locator. Chaining is supported by locator strategies which are based on Selenium API, like xpath or css, but example chaining is not supported by sizzle or `jquery

\n

Examples:

\n\n\n\n\n\n\n
Click Elementcss:.bar >> xpath://a# To find a link which is present after an element with class \"bar\"
\n

List examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
${locator_list} =Create Listcss:div#div_idxpath://*[text(), \" >> \"]
Page Should Contain Element${locator_list}
${element} =Get WebElementxpath://*[text(), \" >> \"]
${locator_list} =Create Listcss:div#div_id${element}
Page Should Contain Element${locator_list}
\n

Chaining locators in new in SeleniumLibrary 5.0

\n

Using WebElements

\n

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.

\n\n\n\n\n\n\n\n\n\n\n\n
${elem} =Get WebElementid:example
Click Element${elem}
\n

Custom locators

\n

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:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Custom Locator Strategy[Arguments]${browser}${locator}${tag}${constraints}
${element}=Execute Javascriptreturn window.document.getElementById('${locator}');
[Return]${element}
\n

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:

\n\n\n\n\n\n\n
Add Location StrategycustomCustom Locator Strategy
\n

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:

\n\n\n\n\n\n
Click Elementcustom:example
\n

See the Add Location Strategy keyword for more details.

\n

Browser and Window

\n

There is different conceptual meaning when SeleniumLibrary talks about windows or browsers. This chapter explains those differences.

\n

Browser

\n

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.

\n

Window

\n

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:

\n
\nExecute Javascript    window.open()    # Opens a new window with location about:blank\n
\n

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.

\n

Structure:

\n
\nBrowserA\n           Window 1  (location=https://robotframework.org/)\n           Window 2  (location=https://robocon.io/)\n           Window 3  (location=https://github.com/robotframework/)\n\nBrowserB\n           Window 1  (location=https://github.com/)\n
\n

Example:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Open Browserhttps://robotframework.org${BROWSER}alias=BrowserA# BrowserA with first window is opened.
Execute Javascriptwindow.open()# In BrowserA second window is opened.
Switch Windowlocator=NEW# Switched to second window in BrowserA
Go Tohttps://robocon.io# Second window navigates to robocon site.
Execute Javascriptwindow.open()# In BrowserA third window is opened.
${handle}Switch Windowlocator=NEW# Switched to third window in BrowserA
Go Tohttps://github.com/robotframework/# Third windows goes to robot framework github site.
Open Browserhttps://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 Locationsbrowser=ALL# By using browser=ALL argument keyword list all locations from all browsers.
\n

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/.

\n

Timeouts, waits, and delays

\n

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.

\n

Timeout

\n

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.

\n

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.

\n

Implicit wait

\n

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.

\n

See time format below for supported syntax.

\n

Page load

\n

Page load timeout is the amount of time to wait for page load to complete until a timeout exception is raised.

\n

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.

\n

See time format below for supported timeout syntax.

\n

Support for page load is new in SeleniumLibrary 6.1

\n

Selenium speed

\n

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.

\n

See time format below for supported syntax.

\n

Time format

\n

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.

\n

Run-on-failure functionality

\n

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.

\n

The run-on-failure functionality can be disabled by using a special value NOTHING or anything considered false (see Boolean arguments) such as NONE.

\n

Boolean arguments

\n

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

\n

Please note SeleniumLibrary 3 and 4 did have own custom methods to covert arguments to boolean values.

\n

EventFiringWebDriver

\n

The SeleniumLibrary offers support for EventFiringWebDriver. See the Selenium and SeleniumLibrary EventFiringWebDriver support documentation for further details.

\n

EventFiringWebDriver is new in SeleniumLibrary 4.0

\n

Thread support

\n

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.

\n

Plugins

\n

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.

\n

Plugin API is new SeleniumLibrary 4.0

\n

Auto closing browser

\n

By default, the browser instances created during a task execution are closed at the end of the task. This can be prevented with the auto_close parameter when importing the library.

\n

The value of the parameter needs to be set to False or any object evaluated as false (see Boolean arguments).

", "version": "6.2.0", - "generated": "2024-04-03 09:43:43", + "generated": "2024-04-03 09:44:59", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -11991,7 +11991,7 @@ "name": "RPA.Browser.Playwright", "doc": "

Browser library is a browser automation library for Robot Framework.

\n

This is the keyword documentation for Browser library. For information about installation, support, and more please visit the project pages. For more information about Robot Framework itself, see robotframework.org.

\n

Browser library uses Playwright Node module to automate Chromium, Firefox and WebKit with a single library.

\n

Table of contents

\n\n

Browser, Context and Page

\n

Browser library works with three different layers that build on each other: Browser, Context and Page.

\n

Browsers

\n

A browser can be started with one of the three different engines Chromium, Firefox or Webkit.

\n

Supported Browsers

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
BrowserBrowser with this engine
chromiumGoogle Chrome, Microsoft Edge (since 2020), Opera
firefoxMozilla Firefox
webkitApple Safari, Mail, AppStore on MacOS and iOS
\n

Since Playwright comes with a pack of builtin binaries for all browsers, no additional drivers e.g. geckodriver are needed.

\n

All these browsers that cover more than 85% of the world wide used browsers, can be tested on Windows, Linux and MacOS. There is no need for dedicated machines anymore.

\n

A browser process is started headless (without a GUI) by default. Run New Browser with specified arguments if a browser with a GUI is requested or if a proxy has to be configured. A browser process can contain several contexts.

\n

Contexts

\n

A context corresponds to a set of independent incognito pages in a browser that share cookies, sessions or profile settings. Pages in two separate contexts do not share cookies, sessions or profile settings. Compared to Selenium, these do not require their own browser process. To get a clean environment a test can just open a new context. Due to this new independent browser sessions can be opened with Robot Framework Browser about 10 times faster than with Selenium by just opening a New Context within the opened browser.

\n

To make pages in the same suite share state, use the same context by opening the context with New Context on suite setup.

\n

The context layer is useful e.g. for testing different user sessions on the same webpage without opening a whole new browser context. Contexts can also have detailed configurations, such as geo-location, language settings, the viewport size or color scheme. Contexts do also support http credentials to be set, so that basic authentication can also be tested. To be able to download files within the test, the acceptDownloads argument must be set to True in New Context keyword. A context can contain different pages.

\n

Pages

\n

A page does contain the content of the loaded web site and has a browsing history. Pages and browser tabs are the same.

\n

Typical usage could be:

\n
\n* Test Cases *\nStarting a browser with a page\n    New Browser    chromium    headless=false\n    New Context    viewport={'width': 1920, 'height': 1080}\n    New Page       https://marketsquare.github.io/robotframework-browser/Browser.html\n    Get Title      ==    Browser\n
\n

The Open Browser keyword opens a new browser, a new context and a new page. This keyword is useful for quick experiments or debugging sessions.

\n

When a New Page is called without an open browser, New Browser and New Context are executed with default values first.

\n

Each Browser, Context and Page has a unique ID with which they can be addressed. A full catalog of what is open can be received by Get Browser Catalog as a dictionary.

\n

Automatic page and context closing

\n

Controls when contexts and pages are closed during the test execution.

\n

If automatic closing level is TEST, contexts and pages that are created during a single test are automatically closed when the test ends. Contexts and pages that are created during suite setup are closed when the suite teardown ends.

\n

If automatic closing level is SUITE, all contexts and pages that are created during the test suite are closed when the suite teardown ends.

\n

If automatic closing level is MANUAL, nothing is closed automatically while the test execution is ongoing.

\n

All browsers are automatically closed, always and regardless of the automatic closing level at the end of the test execution. This will also close all remaining pages and contexts.

\n

Automatic closing can be configured or switched off with the auto_closing_level library import parameter.

\n

See: Importing

\n

Finding elements

\n

All keywords in the library that need to interact with an element on a web page take an argument typically named selector that specifies how to find the element. Keywords can find elements with strict mode. If strict mode is true and locator finds multiple elements from the page, keyword will fail. If keyword finds one element, keyword does not fail because of strict mode. If strict mode is false, keyword does not fail if selector points many elements. Strict mode is enabled by default, but can be changed in library importing or Set Strict Mode keyword. Keyword documentation states if keyword uses strict mode. If keyword does not state that strict mode is used, then strict mode is not applied for the keyword. For more details, see Playwright strict documentation.

\n

Selector strategies that are supported by default are listed in the table below.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
StrategyMatch based onExample
cssCSS selector.css=.class > \\#login_btn
xpathXPath expression.xpath=//input[@id=\"login_btn\"]
textBrowser text engine.text=Login
idElement ID Attribute.id=login_btn
\n

CSS Selectors can also be recorded with Record selector keyword.

\n

Explicit Selector Strategy

\n

The explicit selector strategy is specified with a prefix using syntax strategy=value. Spaces around the separator are ignored, so css=foo, css= foo and css = foo are all equivalent.

\n

Implicit Selector Strategy

\n

The default selector strategy is css.

\n

If selector does not contain one of the know explicit selector strategies, it is assumed to contain css selector.

\n

Selectors that are starting with // or .. are considered as xpath selectors.

\n

Selectors that are in quotes are considered as text selectors.

\n

Examples:

\n
\n# CSS selectors are default.\nClick  span > button.some_class         # This is equivalent\nClick  css=span > button.some_class     # to this.\n\n# // or .. leads to xpath selector strategy\nClick  //span/button[@class=\"some_class\"]\nClick  xpath=//span/button[@class=\"some_class\"]\n\n# \"text\" in quotes leads to exact text selector strategy\nClick  \"Login\"\nClick  text=\"Login\"\n
\n

CSS

\n

As written before, the default selector strategy is css. See css selector for more information.

\n

Any malformed selector not starting with // or .. nor starting and ending with a quote is assumed to be a css selector.

\n

Note that # is a comment character in Robot Framework syntax and needs to be escaped like \\# to work as a css ID selector.

\n

Examples:

\n
\nClick  span > button.some_class\nGet Text  \\#username_field  ==  George\n
\n

XPath

\n

XPath engine is equivalent to Document.evaluate. Example: xpath=//html/body//span[text()=\"Hello World\"].

\n

Malformed selector starting with // or .. is assumed to be an xpath selector. For example, //html/body is converted to xpath=//html/body. More examples are displayed in Examples.

\n

Note that xpath does not pierce shadow_roots.

\n

Text

\n

Text engine finds an element that contains a text node with the passed text. For example, Click text=Login clicks on a login button, and Wait For Elements State text=\"lazy loaded text\" waits for the \"lazy loaded text\" to appear in the page.

\n

Text engine finds fields based on their labels in text inserting keywords.

\n

Malformed selector starting and ending with a quote (either \" or ') is assumed to be a text selector. For example, Click \"Login\" is converted to Click text=\"Login\". Be aware that these leads to exact matches only! More examples are displayed in Examples.

\n

Insensitive match

\n

By default, the match is case-insensitive, ignores leading/trailing whitespace and searches for a substring. This means text= Login matches <button>Button loGIN (click me)</button>.

\n

Exact match

\n

Text body can be escaped with single or double quotes for precise matching, insisting on exact match, including specified whitespace and case. This means text=\"Login \" will only match <button>Login </button> with exactly one space after \"Login\". Quoted text follows the usual escaping rules, e.g. use \\\" to escape double quote in a double-quoted string: text=\"foo\\\"bar\".

\n

RegEx

\n

Text body can also be a JavaScript-like regex wrapped in / symbols. This means text=/^hello .*!$/i or text=/^Hello .*!$/ will match <span>Hello Peter Parker!</span> with any name after Hello, ending with !. The first one flagged with i for case-insensitive. See https://regex101.com for more information about RegEx.

\n

Button and Submit Values

\n

Input elements of the type button and submit are rendered with their value as text, and text engine finds them. For example, text=Login matches <input type=button value=\"Login\">.

\n

Cascaded selector syntax

\n

Browser library supports the same selector strategies as the underlying Playwright node module: xpath, css, id and text. The strategy can either be explicitly specified with a prefix or the strategy can be implicit.

\n

A major advantage of Browser is that multiple selector engines can be used within one selector. It is possible to mix XPath, CSS and Text selectors while selecting a single element.

\n

Selectors are strings that consists of one or more clauses separated by >> token, e.g. clause1 >> clause2 >> clause3. When multiple clauses are present, next one is queried relative to the previous one's result. Browser library supports concatenation of different selectors separated by >>.

\n

For example:

\n
\nHighlight Elements    \"Hello\" >> ../.. >> .select_button\nHighlight Elements    text=Hello >> xpath=../.. >> css=.select_button\n
\n

Each clause contains a selector engine name and selector body, e.g. engine=body. Here engine is one of the supported engines (e.g. css or a custom one). Selector body follows the format of the particular engine, e.g. for css engine it should be a css selector. Body format is assumed to ignore leading and trailing white spaces, so that extra whitespace can be added for readability. If the selector engine needs to include >> in the body, it should be escaped inside a string to not be confused with clause separator, e.g. text=\"some >> text\".

\n

Selector engine name can be prefixed with * to capture an element that matches the particular clause instead of the last one. For example, css=article >> text=Hello captures the element with the text Hello, and *css=article >> text=Hello (note the *) captures the article element that contains some element with the text Hello.

\n

For convenience, selectors in the wrong format are heuristically converted to the right format. See Implicit Selector Strategy

\n

Examples

\n
\n# queries 'div' css selector\nGet Element    css=div\n\n# queries '//html/body/div' xpath selector\nGet Element    //html/body/div\n\n# queries '\"foo\"' text selector\nGet Element    text=foo\n\n# queries 'span' css selector inside the result of '//html/body/div' xpath selector\nGet Element    xpath=//html/body/div >> css=span\n\n# converted to 'css=div'\nGet Element    div\n\n# converted to 'xpath=//html/body/div'\nGet Element    //html/body/div\n\n# converted to 'text=\"foo\"'\nGet Element    \"foo\"\n\n# queries the div element of every 2nd span element inside an element with the id foo\nGet Element    \\#foo >> css=span:nth-child(2n+1) >> div\nGet Element    id=foo >> css=span:nth-child(2n+1) >> div\n
\n

Be aware that using # as a starting character in Robot Framework would be interpreted as comment. Due to that fact a #id must be escaped as \\#id.

\n

Frames

\n

By default, selector chains do not cross frame boundaries. It means that a simple CSS selector is not able to select an element located inside an iframe or a frameset. For this use case, there is a special selector >>> which can be used to combine a selector for the frame and a selector for an element inside a frame.

\n

Given this simple pseudo html snippet:

\n
\n<iframe id=\"iframe\" src=\"src.html\">\n  #document\n    <!DOCTYPE html>\n    <html>\n      <head></head>\n      <body>\n        <button id=\"btn\">Click Me</button>\n      </body>\n    </html>\n</iframe>\n
\n

Here's a keyword call that clicks the button inside the frame.

\n
\nClick   id=iframe >>> id=btn\n
\n

The selectors on the left and right side of >>> can be any valid selectors. The selector clause directly before the frame opener >>> must select the frame element. Frame selection is the only place where Browser Library modifies the selector, as explained in above. In all cases, the library does not alter the selector in any way, instead it is passed as is to the Playwright side.

\n

WebComponents and Shadow DOM

\n

Playwright and so also Browser are able to do automatic piercing of Shadow DOMs and therefore are the best automation technology when working with WebComponents.

\n

Also other technologies claim that they can handle Shadow DOM and Web Components. However, none of them do pierce shadow roots automatically, which may be inconvenient when working with Shadow DOM and Web Components.

\n

For that reason, the css engine pierces shadow roots. More specifically, every Descendant combinator pierces an arbitrary number of open shadow roots, including the implicit descendant combinator at the start of the selector.

\n

That means, it is not necessary to select each shadow host, open its shadow root and select the next shadow host until you reach the element that should be controlled.

\n

CSS:light

\n

css:light engine is equivalent to Document.querySelector and behaves according to the CSS spec. However, it does not pierce shadow roots.

\n

css engine first searches for elements in the light dom in the iteration order, and then recursively inside open shadow roots in the iteration order. It does not search inside closed shadow roots or iframes.

\n

Examples:

\n
\n<article>\n  <div>In the light dom</div>\n  <div slot='myslot'>In the light dom, but goes into the shadow slot</div>\n  <open mode shadow root>\n      <div class='in-the-shadow'>\n          <span class='content'>\n              In the shadow dom\n              <open mode shadow root>\n                  <li id='target'>Deep in the shadow</li>\n              </open mode shadow root>\n          </span>\n      </div>\n      <slot name='myslot'></slot>\n  </open mode shadow root>\n</article>\n
\n

Note that <open mode shadow root> is not an html element, but rather a shadow root created with element.attachShadow({mode: 'open'}).

\n\n

text:light

\n

text engine open pierces shadow roots similarly to css, while text:light does not. Text engine first searches for elements in the light dom in the iteration order, and then recursively inside open shadow roots in the iteration order. It does not search inside closed shadow roots or iframes.

\n

id, data-testid, data-test-id, data-test and their :light counterparts

\n

Attribute engines are selecting based on the corresponding attribute value. For example: data-test-id=foo is equivalent to css=[data-test-id=\"foo\"], and id:light=foo is equivalent to css:light=[id=\"foo\"].

\n

Element reference syntax

\n

It is possible to get a reference to a Locator by using Get Element and Get Elements keywords. Keywords do not save reference to an element in the HTML document, instead it saves reference to a Playwright Locator. In nutshell Locator captures the logic of how to retrieve that element from the page. Each time an action is performed, the locator re-searches the elements in the page. This reference can be used as a first part of a selector by using a special selector syntax element=. like this:

\n
\n${ref}=    Get Element    .some_class\n           Click          ${ref} >> .some_child     # Locator searches an element from the page.\n           Click          ${ref} >> .other_child    # Locator searches again an element from the page.\n
\n

The .some_child and .other_child selectors in the example are relative to the element referenced by ${ref}. Please note that frame piercing is not possible with element reference.

\n

Assertions

\n

Keywords that accept arguments assertion_operator <AssertionOperator> and assertion_expected can optionally assert that a specified condition holds. Keywords will return the value even when the assertion is performed by the keyword.

\n

Assert will retry and fail only after a specified timeout. See Importing and retry_assertions_for (default is 1 second) for configuring this timeout.

\n

Currently supported assertion operators are:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
OperatorAlternative OperatorsDescriptionValidate Equivalent
==equal, equals, should beChecks if returned value is equal to expected value.value == expected
!=inequal, should not beChecks if returned value is not equal to expected value.value != expected
>greater thanChecks if returned value is greater than expected value.value > expected
>=Checks if returned value is greater than or equal to expected value.value >= expected
<less thanChecks if returned value is less than expected value.value < expected
<=Checks if returned value is less than or equal to expected value.value <= expected
*=containsChecks if returned value contains expected value as substring.expected in value
not containsChecks if returned value does not contain expected value as substring.expected in value
^=should start with, startsChecks if returned value starts with expected value.re.search(f\"^{expected}\", value)
$=should end with, endsChecks if returned value ends with expected value.re.search(f\"{expected}$\", value)
matchesChecks if given RegEx matches minimum once in returned value.re.search(expected, value)
validateChecks if given Python expression evaluates to True.
evaluatethenWhen using this operator, the keyword does return the evaluated Python expression.
\n

Currently supported formatters for assertions are:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
FormatterDescription
normalize spacesSubstitutes multiple spaces to single space from the value
stripRemoves spaces from the beginning and end of the value
case insensitiveConverts value to lower case before comparing
apply to expectedApplies rules also for the expected value
\n

Formatters are applied to the value before assertion is performed and keywords returns a value where rule is applied. Formatter is only applied to the value which keyword returns and not all rules are valid for all assertion operators. If apply to expected formatter is defined, then formatters are then formatter are also applied to expected value.

\n

By default, keywords will provide an error message if an assertion fails. Default error messages can be overwritten with a message argument. The message argument accepts {value}, {value_type}, {expected} and {expected_type} format options. The {value} is the value returned by the keyword and the {expected} is the expected value defined by the user, usually the value in the assertion_expected argument. The {value_type} and {expected_type} are the type definitions from {value} and {expected} arguments. In similar fashion as Python type returns type definition. Assertions will retry until timeout has expired if they do not pass.

\n

The assertion assertion_expected value is not converted by the library and is used as is. Therefore when assertion is made, the assertion_expected argument value and value returned the keyword must have the same type. If types are not the same, assertion will fail. Example Get Text always returns a string and has to be compared with a string, even the returned value might look like a number.

\n

Other Keywords have other specific types they return. Get Element Count always returns an integer. Get Bounding Box and Get Viewport Size can be filtered. They return a dictionary without a filter and a number when filtered. These Keywords do automatic conversion for the expected value if a number is returned.

\n

* < less or greater > With Strings* Comparisons of strings with greater than or less than compares each character, starting from 0 regarding where it stands in the code page. Example: A < Z, Z < a, ac < dc It does never compare the length of elements. Neither lists nor strings. The comparison stops at the first character that is different. Examples: `'abcde' < 'abd', '100.000' < '2' In Python 3 and therefore also in Browser it is not possible to compare numbers with strings with a greater or less operator. On keywords that return numbers, the given expected value is automatically converted to a number before comparison.

\n

The getters Get Page State and Get Browser Catalog return a dictionary. Values of the dictionary can directly asserted. Pay attention of possible types because they are evaluated in Python. For example:

\n
\nGet Page State    validate    2020 >= value['year']                     # Comparison of numbers\nGet Page State    validate    \"IMPORTANT MESSAGE!\" == value['message']  # Comparison of strings\n
\n

The 'then' or 'evaluate' closure

\n

Keywords that accept arguments assertion_operator and assertion_expected can optionally also use then or evaluate closure to modify the returned value with BuiltIn Evaluate. Actual value can be accessed with value.

\n

For example Get Title then 'TITLE: '+value. See Builtin Evaluating expressions for more info on the syntax.

\n

Examples

\n
\n# Keyword    Selector                    Key        Assertion Operator    Assertion Expected\nGet Title                                           equal                 Page Title\nGet Title                                           ^=                    Page\nGet Style    //*[@id=\"div-element\"]      width      >                     100\nGet Title                                           matches               \\\\w+\\\\s\\\\w+\nGet Title                                           validate              value == \"Login Page\"\nGet Title                                           evaluate              value if value == \"some value\" else \"something else\"\n
\n

Implicit waiting

\n

Browser library and Playwright have many mechanisms to help in waiting for elements. Playwright will auto-wait before performing actions on elements. Please see Auto-waiting on Playwright documentation for more information.

\n

On top of Playwright auto-waiting Browser assertions will wait and retry for specified time before failing any Assertions. Time is specified in Browser library initialization with retry_assertions_for.

\n

Browser library also includes explicit waiting keywords such as Wait for Elements State if more control for waiting is needed.

\n

Experimental: Re-using same node process

\n

Browser library integrated nodejs and python. The NodeJS side can be also executed as a standalone process. Browser libraries running on the same machine can talk to that instead of starting new node processes. This can speed execution when running tests parallel. To start node side run on the directory when the Browser package is PLAYWRIGHT_BROWSERS_PATH=0 node Browser/wrapper/index.js PORT.

\n

PORT is the port you want to use for the node process. To execute tests then with pabot for example do ROBOT_FRAMEWORK_BROWSER_NODE_PORT=PORT pabot ...

\n

Experimental: Provide parameters to node process

\n

Browser library is integrated with NodeJSand and Python. Browser library starts a node process, to communicate Playwright API in NodeJS side. It is possible to provide parameters for the started node process by defining ROBOT_FRAMEWORK_BROWSER_NODE_DEBUG_OPTIONS environment variable, before starting the test execution. Example: ROBOT_FRAMEWORK_BROWSER_NODE_DEBUG_OPTIONS=--inspect;robot path/to/tests. There can be multiple arguments defined in the environment variable and arguments must be separated with comma.

\n

Scope Setting

\n

Some keywords which manipulates library settings have a scope argument. With that scope argument one can set the \"live time\" of that setting. Available Scopes are: Global, Suite and Test/Task See Scope. Is a scope finished, this scoped setting, like timeout, will no longer be used.

\n

Live Times:

\n\n

A new set higher order scope will always remove the lower order scope which may be in charge. So the setting of a Suite scope from a test, will set that scope to the robot file suite where that test is and removes the Test scope that may have been in place.

\n

Extending Browser library with a JavaScript module

\n

Browser library can be extended with JavaScript. The module must be in CommonJS format that Node.js uses. You can translate your ES6 module to Node.js CommonJS style with Babel. Many other languages can be also translated to modules that can be used from Node.js. For example TypeScript, PureScript and ClojureScript just to mention few.

\n
\nasync function myGoToKeyword(url, args, page, logger, playwright) {\n  logger(args.toString())\n  playwright.coolNewFeature()\n  return await page.goto(url);\n}\n
\n

Functions can contain any number of arguments and arguments may have default values.

\n

There are some reserved arguments that are not accessible from Robot Framework side. They are injected to the function if they are in the arguments:

\n

page: the playwright Page object.

\n

args: the rest of values from Robot Framework keyword call *args.

\n

logger: callback function that takes strings as arguments and writes them to robot log. Can be called multiple times.

\n

playwright: playwright module (* from 'playwright'). Useful for integrating with Playwright features that Browser library doesn't support with it's own keywords. API docs

\n

also argument name self can not be used.

\n

Example module.js

\n
\nasync function myGoToKeyword(pageUrl, page) {\n  await page.goto(pageUrl);\n  return await page.title();\n}\nexports.__esModule = true;\nexports.myGoToKeyword = myGoToKeyword;\n
\n

Example Robot Framework side

\n
\n* Settings *\nLibrary   Browser  jsextension=${CURDIR}/module.js\n\n* Test Cases *\nHello\n  New Page\n  ${title}=  myGoToKeyword  https://playwright.dev\n  Should be equal  ${title}  Playwright\n
\n

Also selector syntax can be extended with a custom selector using a js module

\n

Example module keyword for custom selector registering

\n
\nasync function registerMySelector(playwright) {\nplaywright.selectors.register(\"myselector\", () => ({\n   // Returns the first element matching given selector in the root's subtree.\n   query(root, selector) {\n      return root.querySelector(a[data-title=\"${selector}\"]);\n    },\n\n    // Returns all elements matching given selector in the root's subtree.\n    queryAll(root, selector) {\n      return Array.from(root.querySelectorAll(a[data-title=\"${selector}\"]));\n    }\n}));\nreturn 1;\n}\nexports.__esModule = true;\nexports.registerMySelector = registerMySelector;\n
\n

Plugins

\n

Browser library 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.

\n

Automatic headless detection is supported when opening a new browser.

", "version": "17.5.2", - "generated": "2024-04-03 09:43:43", + "generated": "2024-04-03 09:44:59", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -24053,7 +24053,7 @@ "name": "RPA.Browser.Selenium", "doc": "

SeleniumLibrary is a web testing library for Robot Framework.

\n

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.

\n

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.

\n\n

Locating elements

\n

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.

\n

Locator syntax

\n

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.

\n

Default locator strategy

\n

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.

\n

Examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Click Elementexample# Match based on id or name.
Click Linkexample# Match also based on link text and href.
Click Buttonexample# Match based on id, name or value.
\n

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.

\n

Examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Click Elementname:foo# Find element with name foo.
Click Elementdefault:name:foo# Use default strategy with value name:foo.
Click Element//foo# Find element using XPath //foo.
Click Elementdefault: //foo# Use default strategy with value //foo.
\n

Explicit locator strategy

\n

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.

\n

Locator strategies that are supported by default are listed in the table below. In addition to them, it is possible to register custom locators.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
StrategyMatch based onExample
idElement id.id:example
namename attribute.name:example
identifierEither id or name.identifier:example
classElement class.class:example
tagTag name.tag:div
xpathXPath expression.xpath://div[@id=\"example\"]
cssCSS selector.css:div#example
domDOM expression.dom:document.images[5]
linkExact text a link has.link:The example
partial linkPartial link text.partial link:he ex
sizzleSizzle selector deprecated.sizzle:div.example
dataElement data-* attributedata:id:my_id
jqueryjQuery expression.jquery:div.example
defaultKeyword specific default behavior.default:example
\n

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.

\n

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.

\n

Examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Click Elementid:foo# Element with id 'foo'.
Click Elementcss:div#foo h1# h1 element under div with id 'foo'.
Click Elementxpath: //div[@id=\"foo\"]//h1# Same as the above using XPath, not CSS.
Click Elementxpath: //*[contains(text(), \"example\")]# Element containing text 'example'.
\n

NOTE:

\n\n

Implicit XPath strategy

\n

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))

\n

Examples:

\n\n\n\n\n\n\n\n\n\n
Click Element//div[@id=\"foo\"]//h1
Click Element(//div)[2]
\n

The support for the (// prefix is new in SeleniumLibrary 3.0. Supporting multiple opening parenthesis is new in SeleniumLibrary 5.0.

\n

Chaining locators

\n

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.

\n

Although all locators support chaining, some locator strategies do not abey the chaining. This is because some locator strategies use JavaScript to find elements and JavaScript is executed for the whole browser context and not for the element found be the previous locator. Chaining is supported by locator strategies which are based on Selenium API, like xpath or css, but example chaining is not supported by sizzle or `jquery

\n

Examples:

\n\n\n\n\n\n\n
Click Elementcss:.bar >> xpath://a# To find a link which is present after an element with class \"bar\"
\n

List examples:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
${locator_list} =Create Listcss:div#div_idxpath://*[text(), \" >> \"]
Page Should Contain Element${locator_list}
${element} =Get WebElementxpath://*[text(), \" >> \"]
${locator_list} =Create Listcss:div#div_id${element}
Page Should Contain Element${locator_list}
\n

Chaining locators in new in SeleniumLibrary 5.0

\n

Using WebElements

\n

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.

\n\n\n\n\n\n\n\n\n\n\n\n
${elem} =Get WebElementid:example
Click Element${elem}
\n

Custom locators

\n

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:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Custom Locator Strategy[Arguments]${browser}${locator}${tag}${constraints}
${element}=Execute Javascriptreturn window.document.getElementById('${locator}');
[Return]${element}
\n

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:

\n\n\n\n\n\n\n
Add Location StrategycustomCustom Locator Strategy
\n

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:

\n\n\n\n\n\n
Click Elementcustom:example
\n

See the Add Location Strategy keyword for more details.

\n

Browser and Window

\n

There is different conceptual meaning when SeleniumLibrary talks about windows or browsers. This chapter explains those differences.

\n

Browser

\n

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.

\n

Window

\n

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:

\n
\nExecute Javascript    window.open()    # Opens a new window with location about:blank\n
\n

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.

\n

Structure:

\n
\nBrowserA\n           Window 1  (location=https://robotframework.org/)\n           Window 2  (location=https://robocon.io/)\n           Window 3  (location=https://github.com/robotframework/)\n\nBrowserB\n           Window 1  (location=https://github.com/)\n
\n

Example:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Open Browserhttps://robotframework.org${BROWSER}alias=BrowserA# BrowserA with first window is opened.
Execute Javascriptwindow.open()# In BrowserA second window is opened.
Switch Windowlocator=NEW# Switched to second window in BrowserA
Go Tohttps://robocon.io# Second window navigates to robocon site.
Execute Javascriptwindow.open()# In BrowserA third window is opened.
${handle}Switch Windowlocator=NEW# Switched to third window in BrowserA
Go Tohttps://github.com/robotframework/# Third windows goes to robot framework github site.
Open Browserhttps://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 Locationsbrowser=ALL# By using browser=ALL argument keyword list all locations from all browsers.
\n

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/.

\n

Timeouts, waits, and delays

\n

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.

\n

Timeout

\n

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.

\n

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.

\n

Implicit wait

\n

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.

\n

See time format below for supported syntax.

\n

Page load

\n

Page load timeout is the amount of time to wait for page load to complete until a timeout exception is raised.

\n

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.

\n

See time format below for supported timeout syntax.

\n

Support for page load is new in SeleniumLibrary 6.1

\n

Selenium speed

\n

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.

\n

See time format below for supported syntax.

\n

Time format

\n

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.

\n

Run-on-failure functionality

\n

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.

\n

The run-on-failure functionality can be disabled by using a special value NOTHING or anything considered false (see Boolean arguments) such as NONE.

\n

Boolean arguments

\n

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

\n

Please note SeleniumLibrary 3 and 4 did have own custom methods to covert arguments to boolean values.

\n

EventFiringWebDriver

\n

The SeleniumLibrary offers support for EventFiringWebDriver. See the Selenium and SeleniumLibrary EventFiringWebDriver support documentation for further details.

\n

EventFiringWebDriver is new in SeleniumLibrary 4.0

\n

Thread support

\n

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.

\n

Plugins

\n

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.

\n

Plugin API is new SeleniumLibrary 4.0

\n

Auto closing browser

\n

By default, the browser instances created during a task execution are closed at the end of the task. This can be prevented with the auto_close parameter when importing the library.

\n

The value of the parameter needs to be set to False or any object evaluated as false (see Boolean arguments).

", "version": "6.2.0", - "generated": "2024-04-03 09:43:43", + "generated": "2024-04-03 09:45:00", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -33373,7 +33373,7 @@ "name": "RPA.Browser.common", "doc": "

Documentation for library RPA.Browser.common.

", "version": "", - "generated": "2024-04-03 09:43:43", + "generated": "2024-04-03 09:45:00", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -33464,7 +33464,7 @@ "name": "RPA.Calendar", "doc": "
\n

Library for handling different operations for date and time\nhandling especially in business days and holiday contexts.

\n

Utilizing pendulum and\nholidays packages.

\n

Library is by default using days from Monday to Friday as business\ndays, but that can be changed by giving list of weekdays to\nSet Business Days keyword. A weekday is given as a integer, the\n0 for Sunday and 6 for Saturday.

\n

Common country holidays are respected when getting next and previous\nbusiness days, but custom holidays can be added into consideration\nusing keyword Add Custom Holidays keyword.

\n

Some dates containing for example month names are in English (en), but\nthe locale of the library can be changed with keyword Set Locale or\nfor specific keyword if that has a locale parameter.

\n
\n", "version": "", - "generated": "2024-04-03 09:43:44", + "generated": "2024-04-03 09:45:00", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -34734,7 +34734,7 @@ "name": "RPA.Cloud.AWS", "doc": "
\n

AWS is a library for operating with Amazon AWS services S3, SQS,\nTextract and Comprehend.

\n

Services are initialized with keywords like Init S3 Client for S3.

\n

AWS authentication

\n

Authentication for AWS is set with key id and access key which can be given to the library\nin three different ways.

\n\n

Note. Starting from rpaframework-aws 1.0.3 region can be given as environment\nvariable AWS_REGION or include as Robocorp Vault secret with the same key name.

\n

Redshift Data authentication: Depending on the authorization method, use\none of the following combinations of request parameters, which can only\nbe passed via method 2:

\n
\n\n
\n

Role Assumption: With the use of the STS service client, you are able\nto assume another role, which will return temporary credentials. The\ntemporary credentials will include an access key and session token, see\nkeyword documentation for Assume Role for details of how the\ncredentials are returned. You can use these temporary credentials\nas part of method 2, but you must also include the session token.

\n

Method 1. credentials using environment variable

\n
\n*** Settings ***\nLibrary   RPA.Cloud.AWS\n\n*** Tasks ***\nInit AWS services\n    # NO parameters for client, expecting to get credentials\n    # with AWS_KEY, AWS_KEY_ID and AWS_REGION environment variables\n    Init S3 Client\n
\n

Method 2. credentials with keyword parameter

\n
\n*** Settings ***\nLibrary   RPA.Cloud.AWS   region=us-east-1\n\n*** Tasks ***\nInit AWS services\n    Init S3 Client  aws_key_id=${AWS_KEY_ID}  aws_key=${AWS_KEY}\n
\n

Method 3. setting Robocorp Vault in the library init

\n
\n*** Settings ***\nLibrary   RPA.Cloud.AWS  robocorp_vault_name=aws\n\n*** Tasks ***\nInit AWS services\n    Init S3 Client  use_robocorp_vault=${TRUE}\n
\n

Method 3. setting Robocorp Vault with keyword

\n
\n*** Settings ***\nLibrary   RPA.Cloud.AWS\n\n*** Tasks ***\nInit AWS services\n    Set Robocorp Vault     vault_name=aws\n    Init Textract Client    use_robocorp_vault=${TRUE}\n
\n

Requirements

\n

The default installation depends on boto3 library. Due to the size of the\ndependency, this library is available separate package rpaframework-aws but can\nalso be installed as an optional package for rpaframework.

\n

Recommended installation is rpaframework-aws plus rpaframework package.\nRemember to check latest versions from rpaframework Github repository.

\n
\nchannels:\n  - conda-forge\ndependencies:\n  - python=3.7.5\n  - pip=20.1\n  - pip:\n    - rpaframework==13.0.2\n    - rpaframework-aws==1.0.3\n
\n

Example

\n
\n*** Settings ***\nLibrary   RPA.Cloud.AWS   region=us-east-1\n\n*** Variables ***\n${BUCKET_NAME}        testbucket12213123123\n\n*** Tasks ***\nUpload a file into S3 bucket\n    [Setup]   Init S3 Client\n    Upload File      ${BUCKET_NAME}   ${/}path${/}to${/}file.pdf\n    @{files}         List Files   ${BUCKET_NAME}\n    FOR   ${file}  IN   @{files}\n        Log  ${file}\n    END\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:44", + "generated": "2024-04-03 09:45:01", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -37185,7 +37185,7 @@ "name": "RPA.Cloud.Azure", "doc": "
\n

Azure is a library for operating with Microsoft Azure API endpoints.

\n

List of supported service names:

\n\n

Azure authentication

\n

Authentication for Azure is set with service subscription key which can be given to the library\nin two different ways.

\n\n

Method 1. subscription key using environment variable

\n
\n*** Settings ***\nLibrary   RPA.Cloud.Azure\n\n*** Tasks ***\nInit Azure services\n    # NO parameters for client, expecting to get subscription key\n    # with AZURE_TEXTANALYTICS_KEY or AZURE_SUBSCRIPTION_KEY environment variable\n    Init Text Analytics Service\n
\n

Method 2. setting Robocorp Vault in the library init

\n
\n*** Settings ***\nLibrary   RPA.Cloud.Azure  robocorp_vault_name=azure\n\n*** Tasks ***\nInit Azure services\n    Init Text Analytics Service  use_robocorp_vault=${TRUE}\n
\n

Method 2. setting Robocorp Vault with keyword

\n
\n*** Settings ***\nLibrary   RPA.Cloud.Azure\n\n*** Tasks ***\nInit Azure services\n    Set Robocorp Vault          vault_name=googlecloud\n    Init Text Analytics Service  use_robocorp_vault=${TRUE}\n
\n

References

\n

List of supported language locales - Azure locale list

\n

List of supported region identifiers - Azure region list

\n

Examples

\n

Robot Framework

\n

This is a section which describes how to use the library in your\nRobot Framework tasks.

\n
\n*** Settings ***\nLibrary  RPA.Cloud.Azure\n\n*** Variables ***\n${IMAGE_URL}   IMAGE_URL\n${FEATURES}    Faces,ImageType\n\n*** Tasks ***\nVisioning image information\n   Init Computer Vision Service\n   &{result}   Vision Analyze  image_url=${IMAGE_URL}  visual_features=${FEATURES}\n   @{faces}    Set Variable  ${result}[faces]\n   FOR  ${face}  IN   @{faces}\n      Log  Age: ${face}[age], Gender: ${face}[gender], Rectangle: ${face}[faceRectangle]\n   END\n
\n

Python

\n

This is a section which describes how to use the library in your\nown Python modules.

\n
\nlibrary = Azure()\nlibrary.init_text_analytics_service()\nlibrary.init_face_service()\nlibrary.init_computer_vision_service()\nlibrary.init_speech_service("westeurope")\n\nresponse = library.sentiment_analyze(\n   text="The rooms were wonderful and the staff was helpful."\n)\nresponse = library.detect_face(\n   image_file=PATH_TO_FILE,\n   face_attributes="age,gender,smile,hair,facialHair,emotion",\n)\nfor item in response:\n   gender = item["faceAttributes"]["gender"]\n   age = item["faceAttributes"]["age"]\n   print(f"Detected a face, gender:{gender}, age: {age}")\n\nresponse = library.vision_analyze(\n   image_url=URL_TO_IMAGE,\n   visual_features="Faces,ImageType",\n)\nmeta = response['metadata']\nprint(\n   f"Image dimensions meta['width']}x{meta['height']} pixels"\n)\n\nfor face in response["faces"]:\n   left = face["faceRectangle"]["left"]\n   top = face["faceRectangle"]["top"]\n   width = face["faceRectangle"]["width"]\n   height = face["faceRectangle"]["height"]\n   print(f"Detected a face, gender:{face['gender']}, age: {face['age']}")\n   print(f"      Face rectangle: (left={left}, top={top})")\n   print(f"      Face rectangle: (width={width}, height={height})")\n\nlibrary.text_to_speech(\n    text="Developer tools for open-source RPA leveraging the Robot Framework ecosystem",\n    neural_voice_style="cheerful",\n    target_file='output.mp3'\n)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:44", + "generated": "2024-04-03 09:45:01", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -38165,7 +38165,7 @@ "name": "RPA.Cloud.Google", "doc": "
\n

Google is a library for operating with Google API endpoints.

\n

Installation

\n

Usage requires the following steps:

\n\n

Check the latest package version from PyPI.

\n

Google authentication

\n

Authentication for Google is set with service account JSON file which can be given to the library\nin three different ways or with OAuth2 token, which is used for OAuth authentication.

\n

See library authentication examples for more information.

\n

Basic usage examples

\n

Python

\n
\nfrom RPA.Cloud.Google import Google\n\nlibrary = Google()\nservice_account = '/path/to/service_account.json'\n\nlibrary.init_vision(service_account)\nlibrary.init_text_to_speech(service_account)\n\nresponse = library.detect_text('imagefile.png', 'result.json')\nlibrary.synthesize_speech('I want this said aloud', target_file='said.mp3')\n
\n

Robot Framework

\n
\n*** Settings ***\nLibrary   RPA.Cloud.Google\n\n*** Variables ***\n${SERVICE_ACCOUNT}    ${/}path${/}to${/}service_account.json\n${BUCKET_NAME}            testbucket12213123123\n\n*** Tasks ***\nUpload a file into a new storage bucket\n    [Setup]   Init Storage    ${SERVICE_ACCOUNT}\n    Create Storage Bucket    ${BUCKET_NAME}\n    Upload Storage File      ${BUCKET_NAME}\n    ...   ${/}path${/}to${/}file.pdf\n    ...   myfile.pdf\n    @{files}         List Storage Files   ${BUCKET_NAME}\n    FOR   ${file}  IN   @{files}\n        Log  ${file}\n    END\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:45", + "generated": "2024-04-03 09:45:02", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -43633,7 +43633,7 @@ "name": "RPA.Crypto", "doc": "
\n

Library for common encryption and hashing operations.

\n

Library uses by default the\nFernet format\nfor encryption. More specifically, it uses AES in CBC mode with\na 128-bit key for encryption and HMAC with SHA256 for authentication.

\n

Alternative encryption format for the library is\nAES256.

\n

To use the encryption features, generate a key with the command line\nutility rpa-crypto or with the keyword Generate Key. Store\nthe key in a secure place, such as Robocorp Vault, and load it within\nthe execution before calling encryption/decryption keywords.

\n

Example usage with Robocorp Vault

\n

Create an encryption key with the CLI utility:

\n
\n> rpa-crypto key\nrGx1edA07yz7uD08ChiPSunn8vaauRxw0pAbsal9zjM=\n
\n

Store the key in Robocorp Vault, in this case with the name EncryptionKey.

\n

Load the key from the vault before encryption operations:

\n
\nUse encryption key from vault    EncryptionKey\n${encrypted}=   Encrypt file    orders.xlsx\nAdd work item file    ${encrypted}    name=Orders\n
\n

In another task, this same key can be used to decrypt the file:

\n
\nUse encryption key from vault    EncryptionKey\n${encrypted}=    Get work item file    Orders\n${orders}=   Decrypt file    ${encrypted}\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:45", + "generated": "2024-04-03 09:45:02", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -44321,7 +44321,7 @@ "name": "RPA.Database", "doc": "
\n

Database is a library for handling different database operations.

\n

All database operations are supported. Keywords Query and Get Rows\nreturn values by default in RPA.Table format.

\n

Library is compatible with any Database API Specification 2.0 module.

\n

Workaround for inserting large JSON data for Call Stored Procedure

\n

Workaround is to use instead Query keyword. At the moment there is\nno known fix for the Call Stored Procedure keyword as it fails if\nJSON string is more than 8000 characters long.

\n

Robot Framework

\n
\n${data}=    Load JSON from file    random_data.json\n${json}=    Convert JSON to String    ${data}\n# Single quotes around ${json} string are necessary\nQuery    exec InsertJsonDataToSampleTable '${json}'\n
\n

References:

\n\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary         RPA.Database\n\n*** Tasks ***\nGet Orders From Database\n    Connect To Database  pymysql  tester  user  password  127.0.0.1\n    @{orders}            Query    Select * FROM incoming_orders\n    FOR   ${order}  IN  @{orders}\n        Handle Order  ${order}\n    END\n
\n

Python

\n
\nfrom RPA.Database import Database\nfrom RPA.Robocorp.Vault import FileSecrets\n\nfilesecrets = FileSecrets("secrets.json")\nsecrets = filesecrets.get_secret("databasesecrets")\n\ndb = Database()\ndb.connect_to_database('pymysql',\n                    secrets["DATABASE"],\n                    secrets["USERNAME"],\n                    secrets["PASSWORD"],\n                    '127.0.0.1'\n                    )\norders = db.query("SELECT * FROM incoming_orders")\nfor order in orders:\n    print(order)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:45", + "generated": "2024-04-03 09:45:02", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -44981,7 +44981,7 @@ "name": "RPA.Desktop", "doc": "
\n

Desktop is a cross-platform library for navigating and interacting with\ndesktop environments. It can be used to automate applications through\nthe same interfaces that are available to human users.

\n

The library includes the following features:

\n\n
\n

Warning

\n

Windows element selectors are not currently supported, and require the use of RPA.Desktop.Windows

\n
\n

Installation

\n

The basic features such as mouse and keyboard input and application\ncontrol work with a default rpaframework install.

\n

Advanced computer-vision features such as image template matching and\nOCR require an additional library called rpaframework-recognition.

\n

The dependency should be added separately by specifing it in your conda.yaml\nas rpaframework-recognition==5.0.1 for example. If installing recognition\nthrough pip instead of conda, the OCR feature also requires tesseract.

\n

Locating elements

\n

To automate actions on the desktop, a robot needs to interact with various\ngraphical elements such as buttons or input fields. The locations of these\nelements can be found using a feature called locators.

\n

A locator describes the properties or features of an element. This information\ncan be later used to locate similar elements even when window positions or\nstates change.

\n

The currently supported locator types are:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameArgumentsDescription
aliasname (str)A custom named locator from the locator database, the default.
imagepath (str)Image of an element that is matched to current screen content.
pointx (int), y (int)Pixel coordinates as absolute position.
offsetx (int), y (int)Pixel coordinates relative to current mouse position.
sizewidth (int), height (int)Region of fixed size, around point or screen top-left
regionleft (int), top (int), right (int), bottom (int)Bounding coordinates for a rectangular region.
ocrtext (str), confidence (float, optional)Text to find from the current screen.
\n

A locator is defined by its type and arguments, divided by a colon.\nSome example usages are shown below. Note that the prefix for alias can\nbe omitted as its the default type.

\n
\nClick       point:50,100\nClick       region:20,20,100,30\n\nMove mouse  image:%{ROBOT_ROOT}/logo.png\nMove mouse  offset:200,0\nClick\n\nClick       alias:SpareBin.Login\nClick       SpareBin.Login\n\nClick       ocr:"Create New Account"\n
\n

You can also pass internal region objects as locators:

\n
\n${region}=  Find Element  ocr:"Customer name"\nClick       ${region}\n
\n

Locator chaining

\n

Often it is not enough to have one locator, but instead an element\nis defined through a relationship of various locators. For this use\ncase the library supports a special syntax, which we will call\nlocator chaining.

\n

An example of chaining:

\n
\n# Read text from area on the right side of logo\nRead text    image:logo.png + offset:600,0 + size:400,200\n
\n

The supported operators are:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
OperatorDescription
then, +Base locator relative to the previous one
and, &&, &Both locators should be found
or, ||, |Either of the locators should be found
not, !The locator should not be found
\n

Further examples:

\n
\n# Click below either label\nClick    (image:name.png or image:email.png) then offset:0,300\n\n# Wait until dialog disappears\nWait for element    not image:cookie.png\n
\n

Named locators

\n

The library supports storing locators in a database, which contains\nall of the required fields and various bits of metadata. This enables\nhaving one source of truth, which can be updated if a website's or applications's\nUI changes. Robot Framework scripts can then only contain a reference\nto a stored locator by name.

\n

The main way to create named locators is with VSCode.

\n

Read more on identifying elements and crafting locators:

\n\n

Keyboard and mouse

\n

Keyboard keywords can emulate typing text, but also pressing various function keys.\nThe name of a key is case-insensitive and spaces will be converted to underscores,\ni.e. the key Page Down and page_down are equivalent.

\n

The following function keys are supported:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
KeyDescription
shiftA generic Shift key. This is a modifier.
shift_lThe left Shift key. This is a modifier.
shift_rThe right Shift key. This is a modifier.
ctrlA generic Ctrl key. This is a modifier.
ctrl_lhe left Ctrl key. This is a modifier.
ctrl_rThe right Ctrl key. This is a modifier.
altA generic Alt key. This is a modifier.
alt_lThe left Alt key. This is a modifier.
alt_rThe right Alt key. This is a modifier.
alt_grThe AltGr key. This is a modifier.
cmdA generic command button (Windows / Command / Super key). This may be a modifier.
cmd_lThe left command button (Windows / Command / Super key). This may be a modifier.
cmd_rThe right command button (Windows / Command / Super key). This may be a modifier.
upAn up arrow key.
downA down arrow key.
leftA left arrow key.
rightA right arrow key.
enterThe Enter or Return key.
spaceThe Space key.
tabThe Tab key.
backspaceThe Backspace key.
deleteThe Delete key.
escThe Esc key.
homeThe Home key.
endThe End key.
page_downThe Page Down key.
page_upThe Page Up key.
caps_lockThe Caps Lock key.
f1 to f20The function keys.
insertThe Insert key. This may be undefined for some platforms.
menuThe Menu key. This may be undefined for some platforms.
num_lockThe Num Lock key. This may be undefined for some platforms.
pauseThe Pause / Break key. This may be undefined for some platforms.
print_screenThe Print Screen key. This may be undefined for some platforms.
scroll_lockThe Scroll Lock key. This may be undefined for some platforms.
\n

When controlling the mouse, there are different types of actions that can be\ndone. Same formatting rules as function keys apply. They are as follows:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ActionDescription
clickClick with left mouse button
left_clickClick with left mouse button
double_clickDouble click with left mouse button
triple_clickTriple click with left mouse button
right_clickClick with right mouse button
\n

The supported mouse button types are left, right, and middle.

\n

Examples

\n

Both Robot Framework and Python examples follow.

\n

The library must be imported first.

\n
\n*** Settings ***\nLibrary    RPA.Desktop\n
\n
\nfrom RPA.Desktop import Desktop\ndesktop = Desktop()\n
\n

The library can open applications and interact with them through\nkeyboard and mouse events.

\n
\n*** Keywords ***\nWrite entry in accounting\n    [Arguments]    ${entry}\n    Open application    erp_client.exe\n    Click         image:%{ROBOT_ROOT}/images/create.png\n    Type text     ${entry}\n    Press keys    ctrl    s\n    Press keys    enter\n
\n
\ndef write_entry_in_accounting(entry):\n    desktop.open_application("erp_client.exe")\n    desktop.click(f"image:{ROBOT_ROOT}/images/create.png")\n    desktop.type_text(entry)\n    desktop.press_keys("ctrl", "s")\n    desktop.press_keys("enter")\n
\n

Targeting can be currently done using coordinates (absolute or relative),\nbut using template matching is preferred.

\n
\n*** Keywords ***\nWrite to field\n    [Arguments]  ${text}\n    Move mouse   image:input_label.png\n    Move mouse   offset:200,0\n    Click\n    Type text    ${text}\n    Press keys   enter\n
\n
\ndef write_to_field(text):\n    desktop.move_mouse("image:input_label.png")\n    desktop.move_mouse("offset:200,0")\n    desktop.click()\n    desktop.type_text(text)\n    desktop.press_keys("enter")\n
\n

Elements can be found by text too.

\n
\n*** Keywords ***\nClick New\n    Click       ocr:New\n
\n
\ndef click_new():\n    desktop.click('ocr:"New"')\n
\n

It is recommended to wait for the elements to be visible before\ntrying any interaction. You can also pass region objects as locators.

\n
\n*** Keywords ***\nClick New\n    ${region}=  Wait For element  ocr:New\n    Click       ${region}\n
\n
\ndef click_new():\n    region = desktop.wait_for_element("ocr:New")\n    desktop.click(region)\n
\n

Another way to find elements by offsetting from an anchor:

\n
\n*** Keywords ***\nType Notes\n    [Arguments]        ${text}\n    Click With Offset  ocr:Notes  500  0\n    Type Text          ${text}\n
\n
\ndef type_notes(text):\n    desktop.click_with_offset("ocr:Notes", 500, 0)\n    desktop.type_text(text)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:46", + "generated": "2024-04-03 09:45:02", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -46191,7 +46191,7 @@ "name": "RPA.Desktop.Clipboard", "doc": "
\n

DEPRECATED!! Use library RPA.Desktop's clipboard functionality instead.

\n

Clipboard is a library for managing clipboard - copy text to,\npaste text from, and clear clipboard contents.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary    RPA.Desktop.Clipboard\n\n*** Tasks ***\nClipping\n    Copy To Clipboard   Text from Robot to clipboard\n    ${var}=             Paste From Clipboard\n    Clear Clipboard\n
\n

Python

\n
\nfrom RPA.Desktop.Clipboard import Clipboard\n\nclip = Clipboard()\nclip.copy_to_clipboard('Text from Python to clipboard')\ntext = clip.paste_from_clipboard()\nprint(f"clipboard had text: '{text}'")\nclip.clear_clipboard()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:46", + "generated": "2024-04-03 09:45:02", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -46249,7 +46249,7 @@ "name": "RPA.Desktop.OperatingSystem", "doc": "
\n

OperatingSystem is a cross-platform library for managing\ncomputer properties and actions.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary    RPA.Desktop.OperatingSystem\n\n*** Tasks ***\nGet computer information\n    ${boot_time}=   Get Boot Time  as_datetime=${TRUE}\n    ${machine}=     Get Machine Name\n    ${username}=    Get Username\n    &{memory}=      Get Memory Stats\n    Log Many        ${memory}\n
\n

Python

\n
\nfrom RPA.Desktop.OperatingSystem import OperatingSystem\n\ndef get_computer_information():\n    ops = OperatingSystem()\n    print(f"Boot time    : { ops.get_boot_time(as_datetime=True) }"\n          f"Machine name : { ops.get_machine_name() }"\n          f"Username     : { ops.get_username() }"\n          f"Memory       : { ops.get_memory_stats() }")\n\nif __name__ == "__main__":\n    get_computer_information()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:46", + "generated": "2024-04-03 09:45:02", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -46513,7 +46513,7 @@ "name": "RPA.Desktop.Windows", "doc": "
\n

Windows is a library for managing the Windows operating system.

\n

DEPRECATION WARNING! USE RPA.Windows library instead.

\n

For Windows desktop automation Robocorp recommends the RPA.Windows library.

\n

No further updates will be released for this library and new functionality will continue\nto be developed in RPA.Windows library.

\n

Running Windows applications

\n

Windows applications can be started in several ways. The library supports\nthe following keywords:

\n\n

Locators

\n

Locator is used to identify the element for interaction - usually for a mouse click.

\n

Locators can investigated for application once it has been opened by calling\nthe keyword get_windows_elements which can store locator information into JSON file\nand screenshot of the element into an image file.

\n

Identifying locator

\n

The element needs to be identified by a unique method, for example, "Three" for button 3\nin the Calculator application. It can be given either as Three or name:Three.

\n

Possible search criterias:

\n\n

The current method of inspecting elements on Windows is inspect.exe which is part\nof Windows SDK.

\n

Keyboard

\n

The keyword send_keys can be used to send keys to the active window. The keyword\ntype_keys sends keys to the active window element.

\n

Special key codes are documented on pywinauto\ndocumentation page.

\n

FAQ

\n
    \n
  1. I see error message AttributeError: module 'win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9' has no attribute 'CLSIDToClassMap'
  2. \n
\n
    \n
  1. From PowerShell run this command: Remove-Item -path $env:LOCALAPPDATATempgen_py -recurse
  2. \n
\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary          RPA.Desktop.Windows\nSuite Teardown   Close all applications\n\n*** Tasks ***\nOpen Calculator using run dialog\n    ${result}=              Open using run dialog    calc.exe   Calculator\n    ${result}=              Get Window Elements\n    Send Keys               5*2=\n    ${result}=              Get element             partial name:Display is\n    Log Many                ${result}\n    ${result}=              Get element rich text   id:CalculatorResults\n    Should Be Equal As Strings  ${result}  Display is 10\n    ${result}=              Get element rectangle   partial name:Display is\n    ${result}=              Is Element Visible      CalculatorResults\n    ${result}=              Is Element Enabled      partial name:Display is\n
\n

Python

\n
\nfrom RPA.Desktop.Windows import Windows\n\nwin = Windows()\n\ndef open_calculator():\n    win.open_from_search("calc.exe", "Calculator")\n    elements = win.get_window_elements()\n\ndef make_calculations(expression):\n    win.send_keys(expression)\n    result = win.get_element_rich_text('id:CalculatorResults')\n    return int(result.strip('Display is '))\n\nif __name__ == "__main__":\n    open_calculator()\n    exp = '5*2='\n    result = make_calculations(exp)\n    print(f"Calculation result of '{exp}' is '{result}'")\n    win.close_all_applications()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:46", + "generated": "2024-04-03 09:45:03", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -48924,7 +48924,7 @@ "name": "RPA.DocumentAI", "doc": "
\n

Wrapper library offering generic keywords for initializing, scanning and\nretrieving results as fields from documents (PDF, PNG etc.).

\n

Library requires at the minimum rpaframework version 19.0.0.

\n

This is a helper facade for the following libraries:

\n\n

Where the following steps are required:

\n
    \n
  1. Engine initialization: Init Engine
  2. \n
  3. Document scan: Predict
  4. \n
  5. Result retrieval: Get Result
  6. \n
\n

So no matter the engine you're using, the very same keywords can be used, as only\nthe passed parameters will differ (please check the docs on each library for\nparticularities). Once initialized, you can jump between the engines with\nSwitch Engine. Before scanning documents, you must configure the service first,\nwith a model to scan the files with and an API key for authorizing the access.

\n

See Portal example: https://robocorp.com/portal/robot/robocorp/example-document-ai

\n

Example: Robot Framework

\n
\n*** Settings ***\nLibrary    RPA.DocumentAI\n\n*** Tasks ***\nScan Documents\n    Init Engine    base64ai    vault=document_ai:base64ai\n    Init Engine    nanonets    vault=document_ai:nanonets\n\n    Switch Engine   base64ai\n    Predict    invoice.png\n    ${data} =    Get Result\n    Log List    ${data}\n\n    Switch Engine   nanonets\n    Predict    invoice.png      model=858e4b37-6679-4552-9481-d5497dfc0b4a\n    ${data} =    Get Result\n    Log List    ${data}\n
\n

Example: Python

\n
\nfrom RPA.DocumentAI import DocumentAI, EngineName\n\nlib_docai = DocumentAI()\nlib_docai.init_engine(\n    EngineName.GOOGLE, vault="document_ai:serviceaccount", region="eu"\n)\nlib_docai.predict(\n    "invoice.pdf", model="df1d166771005ff4",\n    project_id="complete-agency-347912", region="eu"\n)\nprint(lib_docai.get_result())\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:47", + "generated": "2024-04-03 09:45:03", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -49239,7 +49239,7 @@ "name": "RPA.DocumentAI.Base64AI", "doc": "
\n

Library to support Base64.ai service for intelligent\ndocument processing (IDP).

\n

Library requires at the minimum rpaframework version 19.0.0.

\n

Service supports identifying fields in the documents, which can be given to the\nservice in multiple different file formats and via URL.

\n

Robot Framework example usage

\n
\n*** Settings ***\nLibrary   RPA.DocumentAI.Base64AI\nLibrary   RPA.Robocorp.Vault\n\n*** Tasks ***\nIdentify document\n    ${secrets}=   Get Secret  base64ai-auth\n    Set Authorization  ${secrets}[email-address]   ${secrets}[apikey]\n    ${results}=  Scan Document File\n    ...   ${CURDIR}${/}invoice.pdf\n    ...   model_types=finance/check/usa,finance/invoice/usa\n    # Scan response contains list of detected models in the document\n    FOR  ${result}  IN  @{results}\n        Log To Console  Model: ${result}[model]\n        Log To Console  Field keys: ${{','.join($result['fields'].keys())}}\n        Log To Console  Fields: ${result}[fields]\n        Log To Console  Text (OCR): ${result}[ocr]\n    END\n
\n

Python example usage

\n
\nfrom RPA.DocumentAI.Base64AI import Base64AI\nfrom RPA.Robocorp.Vault import Vault\n\nsecrets = Vault().get_secret("base64ai-auth")\nbaselib = Base64AI()\nbaselib.set_authorization(secrets["email-address"], secrets["apikey"])\nresult = baselib.scan_document_file(\n    "invoice.pdf",\n    model_types="finance/invoice,finance/check/usa",\n)\nfor r in result:\n    print(f"Model: {r['model']}")\n    for key, props in r["fields"].items():\n        print(f"FIELD {key}: {props['value']}")\n    print(f"Text (OCR): {r['ocr']}")\n
\n

Portal example: https://github.com/robocorp/example-idp-base64

\n
\n", "version": "", - "generated": "2024-04-03 09:43:47", + "generated": "2024-04-03 09:45:03", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -49752,7 +49752,7 @@ "name": "RPA.DocumentAI.DocumentAI", "doc": "
\n

Wrapper library offering generic keywords for initializing, scanning and\nretrieving results as fields from documents (PDF, PNG etc.).

\n

Library requires at the minimum rpaframework version 19.0.0.

\n

This is a helper facade for the following libraries:

\n\n

Where the following steps are required:

\n
    \n
  1. Engine initialization: Init Engine
  2. \n
  3. Document scan: Predict
  4. \n
  5. Result retrieval: Get Result
  6. \n
\n

So no matter the engine you're using, the very same keywords can be used, as only\nthe passed parameters will differ (please check the docs on each library for\nparticularities). Once initialized, you can jump between the engines with\nSwitch Engine. Before scanning documents, you must configure the service first,\nwith a model to scan the files with and an API key for authorizing the access.

\n

See Portal example: https://robocorp.com/portal/robot/robocorp/example-document-ai

\n

Example: Robot Framework

\n
\n*** Settings ***\nLibrary    RPA.DocumentAI\n\n*** Tasks ***\nScan Documents\n    Init Engine    base64ai    vault=document_ai:base64ai\n    Init Engine    nanonets    vault=document_ai:nanonets\n\n    Switch Engine   base64ai\n    Predict    invoice.png\n    ${data} =    Get Result\n    Log List    ${data}\n\n    Switch Engine   nanonets\n    Predict    invoice.png      model=858e4b37-6679-4552-9481-d5497dfc0b4a\n    ${data} =    Get Result\n    Log List    ${data}\n
\n

Example: Python

\n
\nfrom RPA.DocumentAI import DocumentAI, EngineName\n\nlib_docai = DocumentAI()\nlib_docai.init_engine(\n    EngineName.GOOGLE, vault="document_ai:serviceaccount", region="eu"\n)\nlib_docai.predict(\n    "invoice.pdf", model="df1d166771005ff4",\n    project_id="complete-agency-347912", region="eu"\n)\nprint(lib_docai.get_result())\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:47", + "generated": "2024-04-03 09:45:03", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -50067,7 +50067,7 @@ "name": "RPA.DocumentAI.Nanonets", "doc": "
\n

Library to support Nanonets service for intelligent document processing (IDP).

\n

Library requires at the minimum rpaframework version 19.0.0.

\n

Service supports identifying fields in the documents, which can be given to the\nservice in multiple different file formats and via URL.

\n

Robot Framework example usage

\n
\n*** Settings ***\nLibrary   RPA.DocumentAI.Nanonets\nLibrary   RPA.Robocorp.Vault\n\n*** Tasks ***\nIdentify document\n    ${secrets}=   Get Secret  nanonets-auth\n    Set Authorization    ${secrets}[apikey]\n    ${result}=    Predict File\n    ...  ${CURDIR}${/}files${/}eckero.jpg\n    ...  ${secrets}[receipts-model-id]\n    ${fields}=    Get Fields From Prediction Result    ${result}\n    FOR    ${field}    IN    @{fields}\n        Log To Console    Label:${field}[label] Text:${field}[ocr_text]\n    END\n    ${tables}=    Get Tables From Prediction Result    ${result}\n    FOR    ${table}    IN    @{tables}\n        FOR    ${rows}    IN    ${table}[rows]\n            FOR    ${row}    IN    @{rows}\n                ${cells}=    Evaluate    [cell['text'] for cell in $row]\n                Log To Console    ROW:${{" | ".join($cells)}}\n            END\n        END\n    END\n
\n

Python example usage

\n
\nfrom RPA.DocumentAI.Nanonets import Nanonets\nfrom RPA.Robocorp.Vault import Vault\n\nsecrets = Vault().get_secret("nanonets-auth")\nnanolib = Nanonets()\nnanolib.set_authorization(secrets["apikey"])\nresult = nanolib.predict_file(file_to_scan, secrets["receipts-model-id"])\nfields = nanolib.get_fields_from_prediction_result(result)\nfor field in fields:\n    print(f"Label: {field['label']} Text: {field['ocr_text']}")\ntables = nanolib.get_tables_from_prediction_result(result)\nfor table in tables:\n    rpatable = Tables().create_table(table["rows"])\n    for row in table["rows"]:\n        cells = [cell["text"] for cell in row]\n        print(f"ROW: {' | '.join(cells)}")\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:47", + "generated": "2024-04-03 09:45:03", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -50365,7 +50365,7 @@ "name": "RPA.Email.Exchange", "doc": "
\n

Exchange is a library for sending, reading, and deleting emails.\nExchange is interfacing with Exchange Web Services (EWS).

\n

For more information about server settings, see\nthis Microsoft support article.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary     RPA.Email.Exchange\n...     vault_name=email_oauth_microsoft    vault_token_key=token\n...     tenant=ztzvn.onmicrosoft.com  # your custom tenant here\nTask Setup      Ensure Auth\n\n*** Variables ***\n${ACCOUNT}              ACCOUNT_NAME\n${RECIPIENT_ADDRESS}    RECIPIENT\n${IMAGES}               myimage.png\n${ATTACHMENTS}          C:${/}files${/}mydocument.pdf\n\n*** Keywords ***\nEnsure Auth\n    ${secrets} =    Get Secret    email_oauth_microsoft\n    RPA.Email.Exchange.Authorize    ${ACCOUNT}\n    ...    is_oauth=${True}  # use the OAuth2 auth code flow (required)\n    ...    client_id=${secrets}[client_id]  # app ID\n    ...    client_secret=${secrets}[client_secret]  # app password\n    ...    token=${secrets}[token]  # token dict (access, refresh, scope etc.)\n\n*** Tasks ***\nTask of sending email\n    Send Message  recipients=${RECIPIENT_ADDRESS}\n    ...           subject=Exchange Message from RPA Robot\n    ...           body=<p>Exchange RPA Robot message body<br><img src='myimage.png'/></p>\n    ...           save=${TRUE}\n    ...           html=${TRUE}\n    ...           images=${IMAGES}\n    ...           cc=EMAIL_ADDRESS\n    ...           bcc=EMAIL_ADDRESS\n    ...           attachments=${ATTACHMENTS}\n\nTask of listing messages\n    # Attachments are saved specifically with a keyword Save Attachments\n    ${messages}=    List Messages\n    FOR    ${msg}    IN    @{messages}\n        Log Many    ${msg}\n        ${attachments}=    Run Keyword If    "${msg}[subject]"=="about my orders"\n        ...    Save Attachments\n        ...    ${msg}\n        ...    save_dir=${CURDIR}${/}savedir\n    END\n    # Using save_dir all attachments in listed messages are saved\n    ${messages}=    List Messages\n    ...    INBOX/Problems/sub1\n    ...    criterion=subject:'about my orders'\n    ...    save_dir=${CURDIR}${/}savedir2\n    FOR    ${msg}    IN    @{messages}\n        Log Many    ${msg}\n    END\n\nTask of moving messages\n    Move Messages    criterion=subject:'about my orders'\n    ...    source=INBOX/Processed Purchase Invoices/sub2\n    ...    target=INBOX/Problems/sub1\n
\n

Python

\n
\nfrom RPA.Email.Exchange import Exchange\nfrom RPA.Robocorp.Vault import Vault\n\nvault_name = "email_oauth_microsoft"\nsecrets = Vault().get_secret(vault_name)\nex_account = "ACCOUNT_NAME"\n\nmail = Exchange(\n    vault_name=vault_name,\n    vault_token_key="token",\n    tenant="ztzvn.onmicrosoft.com"\n)\nmail.authorize(\n    username=ex_account,\n    is_oauth=True,\n    client_id=secrets["client_id"],\n    client_secret=secrets["client_secret"],\n    token=secrets["token"]\n)\nmail.send_message(\n    recipients="RECIPIENT",\n    subject="Message from RPA Python",\n    body="RPA Python message body",\n)\n
\n

OAuth2

\n

The OAuth2 flow is the only way of authorizing at the moment as Microsoft disabled\nentirely the usage of passwords, even App Passwords. And since you have to work\nwith tokens now and because this library has the capability to automatically\nrefresh an expired token, please don't forget to initialize the library with the\nfollowing parameters: vault_name, vault_token_key and tenant.

\n

Learn more on how to use the OAuth2 flow in this Portal robot\nexample-oauth-email.

\n

About criterion parameter

\n

Following table shows possible criterion keys that can be used to filter emails.\nThere apply to all keywords which have criterion parameter.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
KeyEffective search
subjectsubject to match
subject_containssubject to contain
bodybody to match
body_containsbody to contain
sendersender (from) to match
sender_containssender (from) to contain
beforereceived time before this time
afterreceived time after this time
betweenreceived time between start and end
categorycategories to match
category_containscategories to contain
importanceimportance to match
\n

Keys before, after and between at the moment support two\ndifferent timeformats either %d-%m-%Y %H:%M or %d-%m-%Y. These\nkeys also support special string NOW which can be used especially\ntogether with keyword Wait for message  criterion=after:NOW.

\n

When giving time which includes hours and minutes then the whole\ntime string needs to be enclosed into single quotes.

\n
\nbefore:25-02-2022\nafter:NOW\nbetween:'31-12-2021 23:50 and 01-01-2022 00:10'\n
\n

Different criterion keys can be combined.

\n
\nsubject_contains:'new year' between:'31-12-2021 23:50 and 01-01-2022 00:10'\n
\n

Please note that all values in the criterion that contain spaces need\nto be enclosed within single quotes.

\n

In the following example the email subject is going to matched\nonly against new not new year.

\n
\nsubject_contains:new year\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:48", + "generated": "2024-04-03 09:45:04", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -51766,7 +51766,7 @@ "name": "RPA.Email.ImapSmtp", "doc": "
\n

ImapSmtp is a library for sending, reading, and deleting emails.\nImapSmtp is interfacing with SMTP and IMAP protocols.

\n

*About criteria argument*

\n

Various keywords like List Messages and Move Messages have keyword\nargument called criterion which can be used to filter emails according\nto given criteria.

\n

Syntax needs to according to specification and more information about that\ncan be read from https://robocorp.com/docs/development-guide/email/sending-emails-with-gmail-smtp#listing-email-messages-by-criteria

\n

Troubleshooting

\n\n

Examples

\n

Robot Framework

\n

It is highly recommended to secure your passwords and take care\nthat they are not stored in version control by mistake.\nSee RPA.Robocorp.Vault to see how to store secrets in\nRobocorp Vault.

\n

When sending HTML content with IMG tags, the src filenames must match\nthe base image name given with the images parameter.

\n
\n*** Settings ***\nLibrary     RPA.Email.ImapSmtp   smtp_server=smtp.gmail.com  smtp_port=587\nTask Setup  Authorize  account=${GMAIL_ACCOUNT}  password=${GMAIL_PASSWORD}\n\n*** Variables ***\n${GMAIL_ACCOUNT}        ACCOUNT_NAME\n${GMAIL_PASSWORD}       APP_PASSWORD\n${RECIPIENT_ADDRESS}    RECIPIENT\n${BODY_IMG1}            ${IMAGEDIR}${/}approved.png\n${BODY_IMG2}            ${IMAGEDIR}${/}invoice.png\n${EMAIL_BODY}     <h1>Heading</h1><p>Status: <img src='approved.png' alt='approved image'/></p>\n...               <p>INVOICE: <img src='invoice.png' alt='invoice image'/></p>\n\n*** Tasks ***\nSending email\n    Send Message  sender=${GMAIL_ACCOUNT}\n    ...           recipients=${RECIPIENT_ADDRESS}\n    ...           subject=Message from RPA Robot\n    ...           body=RPA Robot message body\n\nSending HTML Email With Image\n    [Documentation]     Sending email with HTML content and attachment\n    Send Message\n    ...                 sender=${GMAIL_ACCOUNT}\n    ...                 recipients=${RECIPIENT_ADDRESS}\n    ...                 subject=HTML email with body images (2) plus one attachment\n    ...                 body=${EMAIL_BODY}\n    ...                 html=${TRUE}\n    ...                 images=${BODY_IMG1}, ${BODY_IMG2}\n    ...                 attachments=example.png\n
\n

Python

\n
\nfrom RPA.Email.ImapSmtp import ImapSmtp\n\ngmail_account = "ACCOUNT_NAME"\ngmail_password = "APP_PASSWORD"\n\nmail = ImapSmtp(smtp_server="smtp.gmail.com", smtp_port=587)\nmail.authorize(account=gmail_account, password=gmail_password)\nmail.send_message(\n    sender=gmail_account,\n    recipients="RECIPIENT",\n    subject="Message from RPA Python",\n    body="RPA Python message body",\n)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:48", + "generated": "2024-04-03 09:45:04", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -53955,7 +53955,7 @@ "name": "RPA.Excel.Application", "doc": "
\n

Excel.Application is a library for controlling the Excel application.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary             RPA.Excel.Application\nTask Setup          Open Application\nTask Teardown       Quit Application\n\n*** Tasks ***\nManipulate Excel application\n    Open Workbook           workbook.xlsx\n    Set Active Worksheet    sheetname=new stuff\n    Write To Cells          row=1\n    ...                     column=1\n    ...                     value=my data\n    Save Excel\n\nRun Excel Macro\n    Open Workbook   orders_with_macro.xlsm\n    Run Macro       Sheet1.CommandButton1_Click\n\nExport Workbook as PDF\n    Open Workbook           workbook.xlsx\n    Export as PDF           workbook.pdf\n
\n

Python

\n
\nfrom RPA.Excel.Application import Application\n\napp = Application()\n\napp.open_application()\napp.open_workbook('workbook.xlsx')\napp.set_active_worksheet(sheetname='new stuff')\napp.write_to_cells(row=1, column=1, value='new data')\napp.save_excel()\napp.quit_application()\n
\n

Caveats

\n

This library works on a Windows operating system with UI enabled only, and you must\nensure that you open the app first with Open Application before running any\nother relevant keyword which requires to operate on an open app. The application is\nautomatically closed at the end of the task execution, so this can be changed by\nimporting the library with the autoexit=${False} setting.

\n
\n*** Settings ***\nLibrary     RPA.Excel|Outlook|Word.Application    autoexit=${False}\n
\n

If you're running the Process by Control Room through a custom self-hosted Worker\nservice, then please make sure that you enable an RDP session by ticking "Use\nDesktop Connection" under the Step configuration.

\n

If you still encounter issues with opening a document, please ensure that file can\nbe opened first manually and dismiss any alert potentially blocking the process.

\n

Check the documentation below for more info:

\n\n
\n", "version": "", - "generated": "2024-04-03 09:43:48", + "generated": "2024-04-03 09:45:04", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -55229,7 +55229,7 @@ "name": "RPA.Excel.Files", "doc": "
\n

The Excel.Files library can be used to read and write Excel\nfiles without the need to start the actual Excel application.

\n

It supports both legacy .xls files and modern .xlsx files.

\n

Note: To run macros or load password protected worksheets,\nplease use the Excel application library.

\n

Examples

\n

Robot Framework

\n

A common use-case is to load an existing Excel file as a table,\nwhich can be iterated over later in a Robot Framework keyword or task:

\n
\n*** Settings ***\nLibrary    RPA.Tables\nLibrary    RPA.Excel.Files\n\n*** Keywords ***\nRead orders as table\n    Open workbook    ${ORDERS_FILE}\n    ${worksheet}=    Read worksheet   header=${TRUE}\n    ${orders}=       Create table     ${worksheet}\n    [Return]         ${orders}\n    [Teardown]       Close workbook\n
\n

Processing all worksheets in the Excel file and checking row count:

\n
\n*** Settings ***\nLibrary    RPA.Excel.Files\n\n*** Variables ***\n${EXCEL_FILE}   /path/to/excel.xlsx\n\n*** Tasks ***\nRows in the sheet\n    [Setup]      Open Workbook    ${EXCEL_FILE}\n    @{sheets}=   List Worksheets\n    FOR  ${sheet}  IN   @{sheets}\n        ${count}=  Get row count in the sheet   ${sheet}\n        Log   Worksheet '${sheet}' has ${count} rows\n    END\n\n*** Keywords ***\nGet row count in the sheet\n    [Arguments]      ${SHEET_NAME}\n    ${sheet}=        Read Worksheet   ${SHEET_NAME}\n    ${rows}=         Get Length  ${sheet}\n    [Return]         ${rows}\n
\n

Creating a new Excel file with a dictionary:

\n
\n*** Tasks ***\nCreating new Excel\n    Create Workbook  my_new_excel.xlsx\n    FOR    ${index}    IN RANGE    20\n        &{row}=       Create Dictionary\n        ...           Row No   ${index}\n        ...           Amount   ${index * 25}\n        Append Rows to Worksheet  ${row}  header=${TRUE}\n    END\n    Save Workbook\n
\n

Creating a new Excel file with a list:

\n
\n*** Variables ***\n@{heading}   Row No   Amount\n@{rows}      ${heading}\n\n*** Tasks ***\nCreating new Excel\n    Create Workbook  my_new_excel.xlsx\n    FOR    ${index}    IN RANGE   1  20\n        @{row}=         Create List   ${index}   ${index * 25}\n        Append To List  ${rows}  ${row}\n    END\n    Append Rows to Worksheet  ${rows}\n    Save Workbook\n
\n

Python

\n

The library can also be imported directly into Python.

\n
\nfrom RPA.Excel.Files import Files\n\ndef read_excel_worksheet(path, worksheet):\n    lib = Files()\n    lib.open_workbook(path)\n    try:\n        return lib.read_worksheet(worksheet)\n    finally:\n        lib.close_workbook()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:49", + "generated": "2024-04-03 09:45:05", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -57161,7 +57161,7 @@ "name": "RPA.FTP", "doc": "
\n

FTP library can be used to access an FTP server,\nand interact with files.

\n

The library is based on Python's built-in ftplib.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary    RPA.FTP\n\n*** Variables ***\n${HOST}       127.0.0.1\n${PORT}       27345\n${USER}       user\n${PASS}       12345\n\n*** Tasks ***\nList files on the server directory\n    Connect   ${HOST}  ${PORT}  ${USER}  ${PASS}\n    @{files}  List Files\n    FOR  ${file}  IN  @{files}\n        Log  ${file}\n    END\n
\n

Python

\n
\nfrom RPA.FTP import FTP\n\nlibrary = FTP()\nlibrary.connect('127.0.0.1', 27345, 'user', '12345')\nfiles = library.list_files()\nfor f in files:\n    print(f)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:49", + "generated": "2024-04-03 09:45:05", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -57764,7 +57764,7 @@ "name": "RPA.FileSystem", "doc": "
\n

The FileSystem library can be used to interact with files and directories\non the local computer. It can inspect and list files, remove and create them,\nread contents from files, and write data out.

\n

It shadows the built-in OperatingSystem library but contains keywords\nwhich are more RPA-oriented.

\n

Examples

\n

Robot Framework

\n

The library allows, for instance, iterating over files and inspecting them.

\n
\n*** Settings ***\nLibrary    RPA.FileSystem\n\n*** Keywords ***\nDelete large files\n    ${files}=    List files in directory    archive/orders/\n    FOR    ${file}  IN  @{FILES}\n        Run keyword if    ${file.size} > 10**8    Remove file    ${file}\n    END\n\nRead process output\n    Start external program\n    Wait until modified    process.log\n    ${output}=  Read file  process.log\n    [Return]    ${output}\n
\n

Python

\n

The library can also be used inside Python.

\n
\nfrom RPA.FileSystem import FileSystem\n\ndef move_to_archive():\n    lib = FileSystem()\n\n    matches = lib.find_files("**/*.xlsx")\n    if matches:\n        lib.create_directory("archive")\n        lib.move_files(matches, "archive")\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:49", + "generated": "2024-04-03 09:45:06", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -59422,7 +59422,7 @@ "name": "RPA.HTTP", "doc": "
\n

The RPA.HTTP library extends functionality of the RequestsLibrary.\nSee that documentation for several examples of how to issue GET\nrequests and utilize the returned result objects.

\n

This extension provides helper keywords to get an HTTP resource on a\nsession. The HTTP Get and Download keywords will initiate a\nsession if one does not exist for the provided URL, or use an existing\nsession. When using these keywords, you do not need to manage\nsessions with Create Session. Session management is still\nrequired if you use the underlying session keywords, e.g.,\n* On Session.

\n
\n", "version": "0.9.6", - "generated": "2024-04-03 09:43:50", + "generated": "2024-04-03 09:45:06", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -59593,10 +59593,10 @@ "name": "retry_method_list", "types": [], "typedocs": {}, - "defaultValue": "['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']", + "defaultValue": "['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "retry_method_list=['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']" + "repr": "retry_method_list=['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']" } ], "doc": "
\n

Create Session: create a HTTP session to a server

\n

url Base url of the server

\n

alias Robot Framework alias to identify the session

\n

headers Dictionary of default headers

\n

cookies Dictionary of cookies

\n

client_certs ['client certificate', 'client key'] PEM files containing the client key and certificate

\n

timeout Connection timeout

\n
\n
proxies Dictionary mapping protocol or protocol and host to the URL of the proxy
\n
(e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'})
\n
verify Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.
\n
Defaults to False.
\n
debug Enable http verbosity option more information
\n
https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel
\n
max_retries Number of maximum retries each connection should attempt.
\n
By default it will retry 3 times in case of connection errors only.\nA 0 value will disable any kind of retries regardless of other retry settings.\nIn case the number of retries is reached a retry exception is raised.
\n
\n

disable_warnings Disable requests warning useful when you have large number of testcases

\n
\n
backoff_factor Introduces a delay time between retries that is longer after each retry.
\n
eg. if backoff_factor is set to 0.1\nthe sleep between attemps will be: 0.0, 0.2, 0.4\nMore info here: https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html
\n
retry_method_list List of uppercased HTTP method verbs where retries are allowed.
\n
By default retries are allowed only on HTTP requests methods that are considered to be\nidempotent (multiple requests with the same parameters end with the same state).\neg. set to ['POST', 'GET'] to retry only those kind of requests.
\n
retry_status_list List of integer HTTP status codes that, if returned, a retry is attempted.
\n
eg. set to [502, 503] to retry requests if those status are returned.\nNote that max_retries must be greater than 0.
\n
\n
\n", @@ -59729,10 +59729,10 @@ "name": "retry_method_list", "types": [], "typedocs": {}, - "defaultValue": "['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']", + "defaultValue": "['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "retry_method_list=['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']" + "repr": "retry_method_list=['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']" } ], "doc": "
\n

Create Session: create a HTTP session to a server

\n

url Base url of the server

\n

alias Robot Framework alias to identify the session

\n

headers Dictionary of default headers

\n

cookies Dictionary of cookies

\n
\n
auth A Custom Authentication object to be passed on to the requests library.
\n
http://docs.python-requests.org/en/master/user/advanced/#custom-authentication
\n
\n

timeout Connection timeout

\n
\n
proxies Dictionary mapping protocol or protocol and host to the URL of the proxy
\n
(e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'})
\n
verify Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.
\n
Defaults to False.
\n
debug Enable http verbosity option more information
\n
https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel
\n
max_retries Number of maximum retries each connection should attempt.
\n
By default it will retry 3 times in case of connection errors only.\nA 0 value will disable any kind of retries regardless of other retry settings.\nIn case the number of retries is reached a retry exception is raised.
\n
\n

disable_warnings Disable requests warning useful when you have large number of testcases

\n
\n
backoff_factor Introduces a delay time between retries that is longer after each retry.
\n
eg. if backoff_factor is set to 0.1\nthe sleep between attemps will be: 0.0, 0.2, 0.4\nMore info here: https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html
\n
retry_method_list List of uppercased HTTP method verbs where retries are allowed.
\n
By default retries are allowed only on HTTP requests methods that are considered to be\nidempotent (multiple requests with the same parameters end with the same state).\neg. set to ['POST', 'GET'] to retry only those kind of requests.
\n
retry_status_list List of integer HTTP status codes that, if returned, a retry is attempted.
\n
eg. set to [502, 503] to retry requests if those status are returned.\nNote that max_retries must be greater than 0.
\n
\n
\n", @@ -59865,10 +59865,10 @@ "name": "retry_method_list", "types": [], "typedocs": {}, - "defaultValue": "['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']", + "defaultValue": "['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "retry_method_list=['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']" + "repr": "retry_method_list=['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']" } ], "doc": "
\n

Create Session: create a HTTP session to a server

\n

url Base url of the server

\n

alias Robot Framework alias to identify the session

\n

headers Dictionary of default headers

\n

cookies Dictionary of cookies

\n

auth ['DOMAIN', 'username', 'password'] for NTLM Authentication

\n

timeout Connection timeout

\n
\n
proxies Dictionary mapping protocol or protocol and host to the URL of the proxy
\n
(e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'})
\n
verify Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.
\n
Defaults to False.
\n
debug Enable http verbosity option more information
\n
https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel
\n
max_retries Number of maximum retries each connection should attempt.
\n
By default it will retry 3 times in case of connection errors only.\nA 0 value will disable any kind of retries regardless of other retry settings.\nIn case the number of retries is reached a retry exception is raised.
\n
\n

disable_warnings Disable requests warning useful when you have large number of testcases

\n
\n
backoff_factor Introduces a delay time between retries that is longer after each retry.
\n
eg. if backoff_factor is set to 0.1\nthe sleep between attemps will be: 0.0, 0.2, 0.4\nMore info here: https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html
\n
retry_method_list List of uppercased HTTP method verbs where retries are allowed.
\n
By default retries are allowed only on HTTP requests methods that are considered to be\nidempotent (multiple requests with the same parameters end with the same state).\neg. set to ['POST', 'GET'] to retry only those kind of requests.
\n
retry_status_list List of integer HTTP status codes that, if returned, a retry is attempted.
\n
eg. set to [502, 503] to retry requests if those status are returned.\nNote that max_retries must be greater than 0.
\n
\n
\n", @@ -60001,10 +60001,10 @@ "name": "retry_method_list", "types": [], "typedocs": {}, - "defaultValue": "['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']", + "defaultValue": "['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "retry_method_list=['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']" + "repr": "retry_method_list=['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']" } ], "doc": "
\n

Create Session: create a HTTP session to a server

\n

url Base url of the server

\n

alias Robot Framework alias to identify the session

\n

headers Dictionary of default headers

\n

cookies Dictionary of cookies

\n

auth ['DOMAIN', 'username', 'password'] for NTLM Authentication

\n

timeout Connection timeout

\n
\n
proxies Dictionary mapping protocol or protocol and host to the URL of the proxy
\n
(e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'})
\n
verify Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.
\n
Defaults to False.
\n
debug Enable http verbosity option more information
\n
https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel
\n
max_retries Number of maximum retries each connection should attempt.
\n
By default it will retry 3 times in case of connection errors only.\nA 0 value will disable any kind of retries regardless of other retry settings.\nIn case the number of retries is reached a retry exception is raised.
\n
\n

disable_warnings Disable requests warning useful when you have large number of testcases

\n
\n
backoff_factor Introduces a delay time between retries that is longer after each retry.
\n
eg. if backoff_factor is set to 0.1\nthe sleep between attemps will be: 0.0, 0.2, 0.4\nMore info here: https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html
\n
retry_method_list List of uppercased HTTP method verbs where retries are allowed.
\n
By default retries are allowed only on HTTP requests methods that are considered to be\nidempotent (multiple requests with the same parameters end with the same state).\neg. set to ['POST', 'GET'] to retry only those kind of requests.
\n
retry_status_list List of integer HTTP status codes that, if returned, a retry is attempted.
\n
eg. set to [502, 503] to retry requests if those status are returned.\nNote that max_retries must be greater than 0.
\n
\n
\n", @@ -60137,10 +60137,10 @@ "name": "retry_method_list", "types": [], "typedocs": {}, - "defaultValue": "['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']", + "defaultValue": "['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "retry_method_list=['OPTIONS', 'DELETE', 'HEAD', 'TRACE', 'PUT', 'GET']" + "repr": "retry_method_list=['TRACE', 'PUT', 'GET', 'OPTIONS', 'DELETE', 'HEAD']" } ], "doc": "
\n

Create Session: create a HTTP session to a server

\n

alias Robot Framework alias to identify the session

\n

url Base url of the server

\n

headers Dictionary of default headers

\n

cookies Dictionary of cookies

\n

auth List of username & password for HTTP Basic Auth

\n

timeout Connection timeout

\n
\n
proxies Dictionary mapping protocol or protocol and host to the URL of the proxy
\n
(e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'})
\n
\n

verify Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.

\n
\n
debug Enable http verbosity option more information
\n
https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel
\n
max_retries Number of maximum retries each connection should attempt.
\n
By default it will retry 3 times in case of connection errors only.\nA 0 value will disable any kind of retries regardless of other retry settings.\nIn case the number of retries is reached a retry exception is raised.
\n
\n

disable_warnings Disable requests warning useful when you have large number of testcases

\n
\n
backoff_factor Introduces a delay time between retries that is longer after each retry.
\n
eg. if backoff_factor is set to 0.1\nthe sleep between attemps will be: 0.0, 0.2, 0.4\nMore info here: https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html
\n
retry_method_list List of uppercased HTTP method verbs where retries are allowed.
\n
By default retries are allowed only on HTTP requests methods that are considered to be\nidempotent (multiple requests with the same parameters end with the same state).\neg. set to ['POST', 'GET'] to retry only those kind of requests.
\n
retry_status_list List of integer HTTP status codes that, if returned, a retry is attempted.
\n
eg. set to [502, 503] to retry requests if those status are returned.\nNote that max_retries must be greater than 0.
\n
\n
\n", @@ -61519,7 +61519,7 @@ "name": "RPA.Hubspot", "doc": "
\n

Hubspot is a library for accessing HubSpot using REST API. It\nextends hubspot-api-client.

\n

Current features of this library focus on retrieving CRM object data\nfrom HubSpot via API. For additional information, see\nUnderstanding the CRM.

\n
\n

Using Date Times When Searching

\n

When using date times with the Hubspot API, you must provide\nthem as Unix-style epoch timestamps (with milliseconds), which can be obtained\nusing the DateTime library's Convert Date with the\nargument result_format=epoch. The resulting timestamp string\nwill be a float, but the API only accepts integers, so you must\nmultiply the resulting timestamp by 1,000 and then round it to\nthe nearest integar to include in API calls (i.e., the resulting\ninteger sent to the API must have 13 digits as of March 18, 2022).

\n

Robot framework example usage:

\n
\n*** Settings ***\nLibrary     DateTime\nLibrary     RPA.Hubspot\nTask Setup  Authorize Hubspot\n\n*** Tasks ***\nSearch with date\n    ${yesterday}=    Get current date    increment=-24h   result_format=epoch\n    ${yesterday_hs_ts}=    Evaluate    round(${yesterday} * 1000)\n    ${deals}=    Search for objects    DEALS\n    ...    hs_lastmodifieddate    GTE    ${yesterday_hs_ts}\n
\n

Python example usage

\n
\nfrom robot.libraries.DateTime import get_current_date, subtract_time_from_date\nfrom RPA.Hubspot import Hubspot\nfrom RPA.Robocorp.Vault import Vault\n\nsecrets = Vault().get_secret("hubspot")\n\nhs = Hubspot(hubspot_apikey=secrets["api_key"])\nyesterday = round(\n    subtract_time_from_date(get_current_date(), "24h", result_format="epoch") * 1000\n)\ndeals = hs.search_for_objects("DEALS", "hs_lastmodifieddate", "GTE", yesterday)\nprint(deals)\n
\n
\n
\n

Batch Inputs

\n

When retrieving information, the library automatically batches requests\nthat are provided as lists, see Get object keyword for an example,\nbut when wishing to create or update many objects, the library provides\na batching system.

\n

In order to start a batch, you must first call the Create new batch\nkeyword. This initializes a new batch to accept inputs. If a batch\nalready exists when you call this keyword, it will be lost and a new\nblank one will be started.

\n

Once the batch has been initialized, you can add inputs one at a time with\nAdd input to batch or many at a time with Extend batch with inputs.

\n

In order to finally send the batch to HubSpot, you must call\nExecute batch. The final keyword will return the created or updated\nobjects from HubSpot. New object IDs can be obtained from the id\nproperty, see the SimplePublicObject reference.

\n

Robot framework example:

\n
\n*** Settings ***\nLibrary         RPA.Hubspot\nLibrary         RPA.Robocorp.Vault\nTask Setup      Authorize Hubspot\n\n*** Tasks ***\nCreate objects via batch\n    Create new batch\n    Add input to batch    name=Nokia    country=Finland\n    Add input to batch    name=Google    country=USA\n    ${new_companies}=    Execute batch\n    Log    The first new company added has the new id ${{$new_companies[0].id}}\n\n*** Keywords ***\nAuthorize Hubspot\n    ${secrets}=    Get secret    hubspot\n    Auth with api key    ${secrets}[API_KEY]\n
\n

Python example:

\n

NOTE: When executing a batch input in Python, you can directly import the\nBatchInputFactory class to use to create your batch input before\nexecuting the batch.

\n
\nfrom RPA.Hubspot import Hubspot, BatchInputFactory, BatchMode\nfrom RPA.Robocorp.Vault import RobocorpVault\n\n\nvault = RobocorpVault()\nsecrets = vault.get_secret("hubspot")\n\nhs = Hubspot(secrets["API_KEY"])\n\nbatch = BatchInputFactory(BatchMode.UPDATE, "company")\nbatch.extend_inputs(\n    [\n        {"name": "Nokia's New Name", "city": "Espoo"},\n        {"name": "Alphabet", "city": "Mountain View"},\n    ],\n    ["1001", "1002"],\n)\nhs.batch_input = batch\nupdated_companies = hs.execute_batch()\nprint(\n    "Companies have been updated:\\\\n" +\n    "\\\\n".join([str(c) for c in updated_companies])\n)\n
\n
\n
\n

Information Caching

\n

This library loads custom object schemas and pipelines into memory\nthe first time when keywords using them are called. These cached versions\nare recalled unless the use_cache is set to False, where available.

\n
\n
\n

Custom Object Types

\n

All keywords that request a parameter of object_type can accept\ncustom object type names as long as they are properly configured in\nHubSpot. The system will lookup the custom object ID using the\nprovided name against the configured name or one of the configured\nlabels (e.g., "singular" and "plural" types of the name).

\n
\n
\n

HubSpot Object Reference

\n

This section describes the types of objects returned by this Library\nand their associated attributes. These attributes can be accessed via\ndot-notation as described in the Attribute Access section below.

\n
\n

Attribute Access

\n

Keywords return native Python Hubspot objects, rather than common Robot\nFramework types. These types have sets of defined attributes allowing\nfor dot-notation access of object properties. Properties (e.g.,\nthose configured in Hubspot settings for each object) will be\naccessible in a Python dictionary attached to the properties attribute\nof the returned object. See the Attribute Definitions section for\ndetails of that associated attributes for all types returned by this\nlibrary.

\n

Example usage retrieving the city property of a Company object:

\n

Robot framework example:

\n
\n*** Settings ***\nLibrary         RPA.Hubspot\nLibrary         RPA.Robocorp.Vault\n\nTask Setup      Authorize Hubspot\n\n*** Variables ***\n${ACCOUNT_NOKIA}    6818764598\n\n*** Tasks ***\nObtain city information from Hubspot\n    ${account}=    Get object    COMPANY    ${ACCOUNT_NOKIA}\n    Log    The city for account number ${ACCOUNT_NOKIA} is ${account.properties}[city]\n\n*** Keywords ***\nAuthorize Hubspot\n    ${secrets}=    Get secret    hubspot\n    Auth with api key    ${secrets}[API_KEY]\n
\n

Python example:

\n
\nfrom RPA.Hubspot import Hubspot\nfrom RPA.Robocorp.Vault import RobocorpVault\n\nvault = RobocorpVault()\nsecrets = vault.get_secret("hubspot")\n\nhs = Hubspot(secrets["API_KEY"])\nnokia_account_id = "6818764598"\naccount = hs.get_object("COMPANY", nokia_account_id)\nprint(f"The city for account number {nokia_account_id} is {account.properties['city']}")\n
\n
\n
\n

Attribute Definitions

\n

This library can return various types of objects, whose attributes\nare only accessible via dot-notation. The below reference describes\nthe attributes available on these objects.

\n
\n

SimplePublicObject

\n

An object in HubSpot. The object itself does not describe what type\nit represents.

\n
\n
id : str
\n
The HubSpot ID of the object.
\n
properties : Dict[str, str]
\n
A dictionary representing all returned properties associated\nto this object. Properties must be accessed as via standard\ndictionary subscription, e.g., properties["name"].
\n
created_at : datetime
\n
The timestamp when this object was created in HubSpot.
\n
updated_at : datetime
\n
The last modified timestamp for this object.
\n
archived : bool
\n
Whether this object is archived.
\n
archived_at : datetime
\n
The timestamp when this object was archived.
\n
\n
\n
\n

SimplePublicObjectWithAssociations

\n

An object in HubSpot including associations to other objects. The\nobject itself does not describe what type it represents.

\n
\n
id : str
\n
The HubSpot ID of the object.
\n
properties : Dict[str, str]
\n
A dictionary representing all returned properties associated\nto this object. Properties must be accessed as via standard\ndictionary subscription, e.g., properties["name"].
\n
created_at : datetime
\n
The timestamp when this object was created in HubSpot.
\n
updated_at : datetime
\n
The last modified timestamp for this object.
\n
archived : bool
\n
Whether this object is archived.
\n
archived_at : datetime
\n
The timestamp when this object was archived.
\n
associations : Dict[str, CollectionResponseAssociatedId]
\n
A dictionary whose key will be the requested association type, e.g.,\ncompanies and associated value will be a container object\nwith all the associations. See CollectionResponseAssociatedId.
\n
\n
\n
\n

AssociatedId

\n

The ID of an associated object, as well as the type of association.

\n
\n
id : str
\n
The ID of the associated HubSpot object.
\n
type : str
\n
The type of association, e.g., deals_to_companies.
\n
\n
\n
\n

CollectionResponseAssociatedId

\n

A container object for a collection of AssociatedId objects returned\nby the API.

\n
\n
results : List[AssociatedId]
\n
The list of AssociatedId objects returned by the API.
\n
paging : Paging
\n
Used by this library to assist with retreiving multi-page\nAPI responses.
\n
\n
\n
\n

Pipeline

\n

A pipeline represents the steps objects travel through within HubSpot.

\n
\n
id : str
\n
The HubSpot ID for the pipeline. All accounts start with one\npipeline with the id default.
\n
label : str
\n
The human-readabel label for the pipeline.
\n
stages : List[PipelineStage]
\n
A list of PipelineStage objects in the order the object would\nfollow through the pipeline.
\n
created_at : datetime
\n
The timestamp when this pipeline was created in HubSpot.
\n
updated_at : datetime
\n
The last modified timestamp for this pipeline.
\n
archived : bool
\n
Whether this pipeline is archived.
\n
display_order : int
\n
The place in the list of pipelines where this pipeline is shown\nin the HubSpot UI.
\n
\n
\n
\n

PipelineStage

\n

A pipeline stage is one of the various stages defined in a Pipeline.

\n
\n
id : str
\n
The HubSpot ID of the stage.
\n
label : str
\n
The human-readabel label for the stage.
\n
metadata : Dict[str, str]
\n
A dictionary of additional data associated with ths stage, such\nas probability.
\n
created_at : datetime
\n
The timestamp when this stage was created in HubSpot.
\n
updated_at : datetime
\n
The last modified timestamp for this stage.
\n
archived : bool
\n
Whether this stage is archived.
\n
archived_at : datetime
\n
The timestamp when this stage was archived.
\n
\n
\n
\n

PublicOwner

\n

An owner in HubSpot. Owners of companies and deals are responsible\nfor driving a sale to close or similar.

\n
\n
id : str
\n
The HubSpot ID of the owner.
\n
email : str
\n
The owner's email address in HubSpot.
\n
first_name : str
\n
The owner's first name.
\n
last_name : str
\n
The owner's last name.
\n
user_id : int
\n
The associated user ID if the owner is a HubSpot user.
\n
created_at : datetime
\n
The timestamp when this owner was created in HubSpot.
\n
updated_at : datetime
\n
The last modified timestamp for this owner.
\n
archived : bool
\n
Whether this owner is archived.
\n
teams : List[PublicTeam]
\n
A list of teams the owner is in. See PublicTeam.
\n
\n
\n
\n

PublicTeam

\n

A team of owners in HubSpot

\n
\n
id : str
\n
The HubSpot ID of the Team.
\n
name : str
\n
The Team's name.
\n
membership : str
\n
One of PRIMARY, SECONDARY, or CHILD.
\n
\n
\n
\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:51", + "generated": "2024-04-03 09:45:07", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -62695,7 +62695,7 @@ "name": "RPA.Images", "doc": "
\n

Images is a library for general image manipulation.\nFor image-based desktop automation, use the RPA.Desktop library.

\n

Coordinates

\n

The coordinates used in the library are pairs of x and y values that\nrepresent pixels. The upper left corner of the image or screen\nis (0, 0). The x-coordinate increases towards the right, and the y-coordinate\nincreases towards the bottom.

\n

Regions are represented as tuples of (left, top, right, bottom). For example,\na 400 by 200-pixel region in the upper left corner would be (0, 0, 400, 200).

\n

Template matching

\n

Template matching refers to an operation where the (potential) location of\na smaller image is searched from a larger image. It can be used for verifying\ncertain conditions or locating UI elements for desktop or web automation.

\n

Requirements

\n

The default installation depends on Pillow\nlibrary, which is used for general image manipulation operations.

\n

For more robust and faster template matching, the library can use a combination\nof NumPy and OpenCV.\nThey can be installed by opting in to the recognition dependency:

\n

pip install rpaframework rpaframework-recognition

\n

Examples

\n

Robot Framework

\n

The Images library can be imported and used directly in Robot Framework,\nfor instance, for capturing screenshots or verifying something on the screen.

\n

Desktop automation based on images should be done using the corresponding\ndesktop library, i.e. RPA.Desktop.

\n
\n*** Settings ***\nLibrary    RPA.Images\n\n*** Keywords ***\nShould show success\n    [Documentation]    Raises ImageNotFoundError if success image is not on screen\n    Find template on screen    ${CURDIR}${/}success.png\n\nSave screenshot to results\n    [Documentation]    Saves screenshot of desktop with unique name\n    ${timestamp}=      Get current date    result_format=%H%M%S\n    Take screenshot    filename=${OUTPUT_DIR}${/}desktop_${timestamp}.png\n
\n

Python

\n
\nfrom RPA.Images import Images\n\ndef draw_matches_on_image(source, template):\n    matches = lib.find_template_in_image(source, template)\n    for match in matches:\n        lib.show_region_in_image(source, match)\n\n    source.save("matches.png")\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:51", + "generated": "2024-04-03 09:45:07", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -62882,7 +62882,7 @@ "name": "RPA.JSON", "doc": "
\n

JSON is a library for manipulating JSON files and strings.

\n

JSON is a common data interchange format inspired by a subset of\nthe Javascript programming language, but these days is a de facto\nstandard in modern web APIs and is language agnostic.

\n
\n

Serialization

\n

The term serialization refers to the process of converting\nRobot Framework or Python types to JSON or the other way around.

\n

Basic types can be easily converted between the domains,\nand the mapping is as follows:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
JSONPython
objectdict
arraylist
stringstr
number (int)int
number (real)float
trueTrue
falseFalse
nullNone
\n
\n
\n

About JSONPath

\n

Reading and writing values from/to JSON serializable objects is done\nusing JSONPath. It's a syntax designed to quickly and easily refer to\nspecific elements in a JSON structure. The specific flavor used in this\nlibrary is based on jsonpath-ng.

\n

Compared to Python's normal dictionary access, JSONPath expressions can\ntarget multiple elements through features such as conditionals and wildcards,\nwhich can simplify many JSON-related operations. It's analogous to XPath\nfor XML structures.

\n
\n

Syntax example

\n

For this example consider the following structure:

\n
\n{\n  "clients": [\n    {\n      "name": "Johnny Example",\n      "email": "john@example.com",\n      "orders": [\n          {"address": "Streetroad 123", "price": 103.20},\n          {"address": "Streetroad 123", "price": 98.99}\n      ]\n    },\n    {\n      "name": "Jane Example",\n      "email": "jane@example.com",\n      "orders": [\n          {"address": "Waypath 321", "price": 22.00},\n          {"address": "Streetroad 123", "price": 2330.01}\n      ]\n    }\n  ]\n}\n
\n

In the simplest case JSONPath can replace nested access:

\n
\n*** Tasks ***\nNested access\n    # First order of first client, with direct dictionary access\n    ${value}=    Set variable    ${json}["clients"][0]["orders"][0]\n\n    # JSONPath access\n    ${value}=    Get value from JSON    ${json}    $.clients[0].orders[0]\n
\n

But the power comes from complicated expressions:

\n
\n*** Tasks ***\nComplicated expressions\n    # Find delivery addresses for all orders\n    ${prices}=        Get values from JSON    $..address\n\n    # Find orders that cost over 100\n    ${expensives}=    Get values from JSON    $..orders[?(@.price>100)]\n
\n
\n
\n

Supported Expressions

\n

The supported syntax elements are:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ElementDescription
$Root object/element
@Current object/element inside expressions
. or []Child operator
..Recursive descendant operator
`parent`Parent operator, see functions
*Wilcard, any element
,Select multiple fields
[n]Array index
[a:b:c]Array slice (start, end, step)
[a,b]Union of indices or names
[?()]Apply a filter expression
()Script expression
[\\\\field]Sort descending by field, cannot be combined with\nfilters.
[/field]Sort ascending by field, cannot be combined with\nfilters.
`str()`Convert value to string, see functions
`sub()`Regex substitution function, see functions
`len`Calculate value's length, see functions
`split()`String split function, see functions
+ - * /Arithmetic functions, see functions
\n
\n

Functions

\n

This library allows JSON path expressions to include certain functions\nwhich can provide additional benefit to users. These functions are\ngenerally encapsulated in backticks (`). Some functions require\nyou to pass arguments similar to a Python function.

\n

For example, let's say a JSON has nodes on the JSON path\n$.books[*].genres which are represented as strings of genres with\ncommas separating each genre. So for one book, this node might have a\nvalue like horror,young-adult. You can return a list of first genre\nfor each book by using the split function like so:

\n
\n*** Task ***\nGet genres\n    ${genres}=  Get values from JSON    $.books[*].genres.`split(,, 0, -1)`\n
\n

Each functions parameters are defined here:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
FunctionUsage
str()No parameters, but parenthesis are required
sub(/regex/, repl)The regex pattern must be provided in regex\nand the replacement value provided in repl
lenNo parameters and no parenthesis
split(char, segment, max_split)Separator character provided as char, which\nindex from the resulting array to be returns\nprovided as segment, and maximum number of\nsplits to perform provided as max_split,\n-1 for all splits.
parentNo parameters, no parenthesis
\n

Arithmetic Functions

\n

JSON Path can be written and combined to concatenate string values\nor perform arithmetic functions on numerical values. Each JSONPath\nexpression used must return the same type, and when performing\nsuch functions between returned lists, each list must be the same\nlength. An example is included in documentation for the keyword\nGet values from JSON.

\n
\n
\n

Additional Information

\n

There are a multitude of different script expressions\nin addition to the elements listed above, which can\nbe seen in the aforementioned article.

\n

For further library usage examples, see the individual keywords.

\n
\n
\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:51", + "generated": "2024-04-03 09:45:07", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -63538,7 +63538,7 @@ "name": "RPA.JavaAccessBridge", "doc": "
\n

Java application UI automation library using Java Access Bridge technology.

\n

The library utilizes java-access-bridge-wrapper package to interact with\nJava UI. Currently only the 64-bit Windows OS is supported.

\n

Inspecting elements

\n

We have built an Assistant for working with Java application's element structure and Java locators.\nThe Assistant provides copy-paste-able locators for each element and also allows testing locators against\nselected application.

\n

If our tools fail to pick the locator from your target application, there is always the\nAccess Bridge Explorer from Google that enables you to see the raw view. Please note that\nAccess Bridge Explorer repository has been archived on July 27, 2022 and is no longer actively\nmaintained.

\n

The Accessibility Insights for Windows can show element properties if application framework\nsupports Windows UI Automation (UIA), see more at using Accessibility Insights. Then the recommended\nlibrary would be RPA.Windows library.

\n

Steps to enable

\n
\n
    \n
  1. Enable the Java Access Bridge in Windows
  2. \n
  3. Set environment variable RC_JAVA_ACCESS_BRIDGE_DLL as an absolute path to WindowsAccessBridge-64.dll.\nIt is also possible to give DLL location as library initialization parameter access_bridge_path.
  4. \n
\n
\nC:\\path\\to\\java\\bin\\jabswitch -enable\nset RC_JAVA_ACCESS_BRIDGE_DLL=C:\\path\\to\\Java\\bin\\WindowsAccessBridge-64.dll\n
\n
\n*** Settings ***\nLibrary   RPA.JavaAccessBridge   access_bridge_path=C:\\path\\to\\Java\\bin\\WindowsAccessBridge-64.dll\n
\n
\n

About Java wrapper callbacks and actions

\n

There might be a compatibility issue with callbacks and actions on target Java application. Possible reasons:

\n\n

Workaround for this situation is to initialize JavaAccessBridge library with parameter ignore_callbacks=True.\nThen application's element information is still accessible and any actions on those elements can be performed\nwith RPA.Desktop library. Keep in mind that you can still manuall refresh an element with Refresh Element.

\n

Note. There are still keywords, for example. Call Element Action, which will cause error if used in this\nsituation.

\n
\n*** Settings ***\nLibrary   RPA.JavaAccessBridge   ignore_callbacks=True\n
\n

Controlling the Java window

\n

Keyword for this purpose is Select Window. Window selection is based on the title parameter, which can be\ngiven as a regular expressions to match the correct window. The keyword brings the window into focus and initially\nreads window's element structure.

\n

Locating elements

\n

To automate actions on the Java application, the robot needs locations to various elements\nusing a feature called Java locators. Locator describes properties of an element.

\n

At the moment library contains basic level support for locators.

\n

The common locator types are name and role.

\n

To identify element with more than one property and can be used, for example:

\n
\n
\nrole:push button and name:Clear\n
\n
\n

To address element within parent element > can be used, for example:

\n
\n
\nname:Find Purchase Orders > name:NumberField\n
\n
\n

Some keywords accept element as an parameter in place of locator.

\n

New locator type strict has been added in rpaframework==12.5.0. Currently\nproperty values of string type have been evaluated with startsWith which\ncan match several property values. With strict set in the locator string,\nall locator on the right side of this definition will be matched using\nstrict (equal matching), example:

\n
\n
\n# without strict, name can be 'Type', 'Type1', 'Type of'...\nGet Elements   role:push button and name:Type\n# name must be equal to 'Type'\nGet Elements  role:push button and strict:True and name:Type\n
\n
\n

Keyword Get Elements has extra parameter strict, which when set to\nTrue forces all locator value matches to be strict, example:

\n
\n
\n# without strict, name can be 'Type', 'Type1', 'Type of'...\nGet Elements  role:push button and name:Type\n# name must be equal to 'Type' and role must be equal to 'text'\nGet Elements  role:text and name:Type  strict=True\n
\n
\n

About JavaElement object

\n

The JavaElement was added in rpaframework==12.3.0 for easy access into\nContextNode objects which have been returned by Get Elements keyword.

\n

Keyword Get Elements still returns ContextNode objects, but with parameter\njava_elements=True the keyword returns JavaElement objects instead (they\nstill contain reference to ContextNode object via node property, e.g.\nJavaObject.node).

\n

Properties and methods included in the JavaElement:

\n\n

Interacting with elements

\n

By default application elements are interacted with Actions supported by the element.\nMost common example is click action supported by an button element.

\n

But because application and technology support for the actions might be limited, it is also\npossible to opt for interaction elements by their coordinates by giving keyword parameter\naction=False if parameter is available.

\n

Examples

\n

robotframework

\n
\n*** Settings ***\nLibrary   RPA.JavaAccessBridge\nLibrary   Process\n\n*** Tasks ***\nWrite text into Swing application\n    Start Process    java -jar BasicSwing.jar\n    ...              shell=${TRUE}\n    ...              cwd=${CURDIR}\n    Select Window    Chat Frame\n    Type Text    role:text\n    ...          text for the textarea\n    Type Text    role:text\n    ...          text for the input field\n    ...          index=1\n    ...          clear=${TRUE}\n    Click Element    role:push button and name:Send\n
\n

Python

\n
\nfrom RPA.JavaAccessBridge import JavaAccessBridge\nimport subprocess\n\njab = JavaAccessBridge()\n\nsubprocess.Popen(\n    ["java", "-jar", "BasicSwing.jar"],\n    shell=True,\n    cwd=".",\n    close_fds=True\n)\njab.select_window("Chat Frame")\njab.type_text(\n    "role:text",\n    "text for the textarea",\n    enter=True\n)\njab.type_text(\n    "role:text",\n    "text for the input field",\n    index=1,\n    clear=True\n)\njab.click_element("role:push button and name:Send")\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:51", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -64852,7 +64852,7 @@ "name": "RPA.MFA", "doc": "
\n

RPA.MFA is a library intended mainly for generating one-time passwords (OTP)\nand not only, as OAuth2 support was introduced lately.

\n

Library requires at the minimum rpaframework version 19.4.0.

\n

Based on the pyotp and\nrequests_oauthlib packages. It\nprovides support for both MFA with the * OTP related keywords and OAuth2\n"Authorization Code Flow" with the * OAuth * related keywords.

\n

In the below example the mfa secret we are reading from the Robocorp\nVault is the passcode generated by the Authenticator service. The passcode\nvalue is stored into the Vault with key otpsecret.

\n

Passcode is typically a long string (16-32 characters), which is provided\nin a form of QR image, but it can be obtained by requesting access to a string.

\n

Note that same code can be used to add a mobile phone as a duplicate authentication\ndevice at the same time when the same code is added into the Vault.

\n

Robot framework example usage:

\n
\n*** Settings ***\nLibrary     RPA.MFA\nLibrary     RPA.Robocorp.Vault\n\n*** Tasks ***\nGenerate time based code\n    ${secrets}=    Get Secret   mfa\n    ${code}=    Get Time Based OTP    ${secrets}[otpsecret]\n
\n

Python example usage

\n
\nfrom RPA.MFA import MFA\nfrom RPA.Robocorp.Vault import Vault\n\n\ndef main():\n    secrets = Vault().get_secret("mfa")\n    code = MFA().get_time_based_otp(secrets["otpsecret"])\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:51", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -65402,7 +65402,7 @@ "name": "RPA.MSGraph", "doc": "
\n

The MSGraph library wraps the O365 package, giving robots\nthe ability to access the Microsoft Graph API programmatically.

\n

OAuth Configuration

\n

Graph's API primarily authenticates via the OAuth 2.0 authorization code grant\nflow or OpenID Connect. This library exposes the OAuth 2.0 flow for robots to\nauthenticate on behalf of users. A user must complete an initial authentication\nflow with the help of our OAuth Graph Example Bot.

\n

For best results, register an app in Azure AD and configure it as so:

\n\n
\n", "version": "", - "generated": "2024-04-03 09:43:52", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -66749,7 +66749,7 @@ "name": "RPA.Netsuite", "doc": "
\n

Netsuite is a library for accessing Netsuite using NetSuite SOAP web service SuiteTalk.\nThe library extends the netsuitesdk library.

\n

More information available at NetSuite SOAP webservice SuiteTalk.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary     RPA.Netsuite\nLibrary     RPA.Excel.Files\nLibrary     RPA.Tables\nTask Setup  Authorize Netsuite\n\n*** Tasks ***\nGet data from Netsuite and Store into Excel files\n    ${accounts}=        Get Accounts   account_type=_expense\n    ${accounts}=        Create table    ${accounts}\n    Create Workbook\n    Append Rows To Worksheet  ${accounts}\n    Save Workbook       netsuite_accounts.xlsx\n    Close Workbook\n    ${bills}=           Get Vendor Bills\n    ${bills}=           Create table    ${bills}\n    Create Workbook\n    Append Rows To Worksheet  ${bills}\n    Save Workbook       netsuite_bills.xlsx\n    Close Workbook\n\n\n*** Keywords ***\nAuthorize Netsuite\n    ${secrets}=     Get Secret   netsuite\n    Connect\n    ...        account=${secrets}[ACCOUNT]\n    ...        consumer_key=${secrets}[CONSUMER_KEY]\n    ...        consumer_secret=${secrets}[CONSUMER_KEY]\n    ...        token_key=${secrets}[CONSUMER_SECRET]\n    ...        token_secret=${secrets}[TOKEN_KEY]\n
\n

Python

\n
\nfrom RPA.Netsuite import Netsuite\n\nns = Netsuite()\nns.connect()\naccounts = ns.get_accounts()\ncurrencies = ns.get_currencies()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:52", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -67298,7 +67298,7 @@ "name": "RPA.Notifier", "doc": "
\n

Notifier is a library interfacting with different notification providers.

\n

Supported providers

\n\n

Providers not supported yet via specific keywords

\n\n

There is a keyword Generic Notify which can be used\nto call above services, for example.

\n
\nGeneric Notify\n    provider_name=gitter\n    message=Hello from Robot\n    token=TOKEN\n    room_id=ID_OF_THE_GITTER_ROOM\n
\n

Parameters for different providers can be read from the\nNotifiers documents (link below).

\n

Read more at https://notifiers.readthedocs.io/en/latest/

\n

About kwargs

\n

The **kwargs is a term for any extra named parameters, which\ncan be included in the same way as already named arguments,\ne.g. Notify Email could be called with subject=my email subject\nwhich will be passed through **kwargs.

\n

Notifier documentation contains information about all possible\narguments that different providers support.

\n

Robot Framework

\n
\n&{account}=    Create Dictionary\n...    host=smtp.office365.com\n...    username=ACCOUNT_USERNAME\n...    password=ACCOUNT_PASSWORD\nNotify Email\n...    to=RECIPIENT_EMAIL\n...    from_=SENDER_ADDRESS            # passed via kwargs\n...    subject=Hello from the Robot    # passed via kwargs\n...    message=Hello from the Robot\n...    &{account}                      # passed via kwargs\n
\n
\nnotifier = Notifier()\naccount = {\n    "host": "smtp.office365.com",\n    "username": "EMAIL_USERNAME",\n    "password": "EMAIL_PASSWORD"\n}\nnotifier.email_notify(\n    to="RECIPIENT_EMAIL",\n    from_="SENDER_EMAIL",\n    subject="Hello from the Python Robot",\n    message="Hello from the Python RObot",\n    **account\n)\n
\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary  RPA.Notifier\n\n*** Variables ***\n${SLACK_WEBHOOK}   https://hooks.slack.com/services/WEBHOOKDETAILS\n${CHANNEL}         notification-channel\n\n*** Tasks ***\nLets notify\n   Notify Slack   message from robot  channel=${CHANNEL}  webhook_url=${SLACK_WEBHOOK}\n
\n

Python

\n
\nfrom RPA.Notifier import Notifier\n\nlibrary = Notifier()\n\nslack_attachments = [\n   {\n      "title": "attachment 1",\n      "fallback": "liverpool logo",\n      "image_url": "https://upload.wikimedia.org/wikipedia/fi/thumb/c/cd/Liverpool_FC-n_logo.svg/1200px-Liverpool_FC-n_logo.svg.png",\n   }\n]\n\nlibrary.notify_slack(\n   message='message for the Slack',\n   channel="notification-channel",\n   webhook_url=slack_webhook_url,\n   attachments=slack_attachments,\n)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:52", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -67896,7 +67896,7 @@ "name": "RPA.OpenAI", "doc": "
\n

Library to support OpenAI and Azure OpenAI services.

\n

Library is not included in the rpaframework package, so in order to use it\nyou have to add rpaframework-openai with the desired version in your\nconda.yaml file.

\n

Robot Framework example usage

\n
\n*** Settings ***\nLibrary    RPA.Robocorp.Vault\nLibrary    RPA.OpenAI\n\n*** Tasks ***\nCreate a text completion\n    ${secrets}   Get Secret   secret_name=OpenAI\n    Authorize To OpenAI   api_key=${secrets}[key]\n    ${completion}    Completion Create\n    ...     Write a tagline for an ice cream shop\n    ...     temperature=0.6\n    Log   ${completion}\n
\n

Python example usage

\n
\nfrom RPA.Robocorp.Vault import Vault\nfrom RPA.OpenAI import OpenAI\n\nsecrets = Vault().get_secret("OpenAI")\nbaselib = OpenAI()\nbaselib.authorize_to_openai(secrets["key"])\n\nresult = baselib.completion_create(\n    Create a tagline for icecream shop',\n    temperature=0.6,\n)\nprint(result)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:52", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -68459,7 +68459,7 @@ "name": "RPA.Outlook.Application", "doc": "
\n

Outlook.Application is a library for controlling the Outlook application.

\n

About Email Filtering

\n

Emails can be filtered according to specification set by Restrict method of the\nItem class https://docs.microsoft.com/en-us/office/vba/api/outlook.items.restrict.

\n

Couple of examples:

\n
\nGet Emails\n...   email_filter=[Subject]='test email'\n\nMove Emails\n...   email_filter=[SenderEmailAddress]='hello@gmail.com'\n
\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary                 RPA.Outlook.Application\nTask Setup              Open Application\nSuite Teardown          Quit Application\n\n*** Variables ***\n${RECIPIENT}            address@domain.com\n\n*** Tasks ***\nSend email\n    Send Email         recipients=${RECIPIENT}\n    ...                subject=This is the subject\n    ...                body=This is the message body\n    ..                 attachments=approved.png\n
\n

Python

\n
\nfrom RPA.Outlook.Application import Application\n\ndef send_email():\n    app = Application()\n    app.open_application()\n    app.send_email(\n        recipients='EMAILADDRESS_1, EMAILADDRESS_2',\n        subject='email subject',\n        body='email body message',\n        attachments='../orders.csv'\n
\n

For more information, see: https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb219950(v=office.12)

\n

Caveats

\n

This library works on a Windows operating system with UI enabled only, and you must\nensure that you open the app first with Open Application before running any\nother relevant keyword which requires to operate on an open app. The application is\nautomatically closed at the end of the task execution, so this can be changed by\nimporting the library with the autoexit=${False} setting.

\n
\n*** Settings ***\nLibrary     RPA.Excel|Outlook|Word.Application    autoexit=${False}\n
\n

If you're running the Process by Control Room through a custom self-hosted Worker\nservice, then please make sure that you enable an RDP session by ticking "Use\nDesktop Connection" under the Step configuration.

\n

If you still encounter issues with opening a document, please ensure that file can\nbe opened first manually and dismiss any alert potentially blocking the process.

\n

Check the documentation below for more info:

\n\n
\n", "version": "", - "generated": "2024-04-03 09:43:52", + "generated": "2024-04-03 09:45:08", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -69204,7 +69204,7 @@ "name": "RPA.PDF", "doc": "
\n

PDF is a library for managing PDF documents.

\n

It can be used to extract text from PDFs, add watermarks to pages, and\ndecrypt/encrypt documents.

\n

Merging and splitting PDFs is supported by Add Files To PDF keyword. Read\nthe keyword documentation for examples.

\n

There is also limited support for updating form field values. (check\nSet Field Value and Save Field Values for more info)

\n

The input PDF file can be passed as an argument to the keywords, or it can be\nomitted if you first call Open PDF. A reference to the current active PDF will\nbe stored in the library instance and can be changed by using the Switch To PDF\nkeyword with another PDF file path, therefore you can asynchronously work with\nmultiple PDFs.

\n
\n

Attention!

\n

Keep in mind that this library works with text-based PDFs, and it can't\nextract information from an image-based (scan) PDF file. For accurate\nresults, you have to use specialized external services wrapped by the\nRPA.DocumentAI library.

\n
\n

Portal example with video recording demo for parsing PDF invoices:\nhttps://github.com/robocorp/example-parse-pdf-invoice

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary    RPA.PDF\nLibrary    String\n\n*** Tasks ***\nExtract Data From First Page\n    ${text} =    Get Text From PDF    report.pdf\n    ${lines} =     Get Lines Matching Regexp    ${text}[${1}]    .+pain.+\n    Log    ${lines}\n\nGet Invoice Number\n    Open Pdf    invoice.pdf\n    ${matches} =  Find Text    Invoice Number\n    Log List      ${matches}\n\nFill Form Fields\n    Switch To Pdf    form.pdf\n    ${fields} =     Get Input Fields   encoding=utf-16\n    Log Dictionary    ${fields}\n    Set Field Value    Given Name Text Box    Mark\n    Save Field Values    output_path=${OUTPUT_DIR}${/}completed-form.pdf\n    ...                  use_appearances_writer=${True}\n
\n
\nfrom RPA.PDF import PDF\nfrom robot.libraries.String import String\n\npdf = PDF()\nstring = String()\n\ndef extract_data_from_first_page():\n    text = pdf.get_text_from_pdf("report.pdf")\n    lines = string.get_lines_matching_regexp(text[1], ".+pain.+")\n    print(lines)\n\ndef get_invoice_number():\n    pdf.open_pdf("invoice.pdf")\n    matches = pdf.find_text("Invoice Number")\n    for match in matches:\n        print(match)\n\ndef fill_form_fields():\n    pdf.switch_to_pdf("form.pdf")\n    fields = pdf.get_input_fields(encoding="utf-16")\n    for key, value in fields.items():\n        print(f"{key}: {value}")\n    pdf.set_field_value("Given Name Text Box", "Mark")\n    pdf.save_field_values(\n        output_path="completed-form.pdf",\n        use_appearances_writer=True\n    )\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:09", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -70859,7 +70859,7 @@ "name": "RPA.Robocloud.Items", "doc": "
\n

A library for interacting with Control Room work items.

\n

Work items are used for managing data that go through multiple\nsteps and tasks inside a process. Each step of a process receives\ninput work items from the previous step, and creates output work items for\nthe next step.

\n

Item structure

\n

A work item's data payload is JSON and allows storing anything that is\nserializable. This library by default interacts with payloads that\nare a dictionary of key-value pairs, which it treats as individual\nvariables. These variables can be exposed to the Robot Framework task\nto be used directly.

\n

In addition to the data section, a work item can also contain files,\nwhich are stored by default in Robocorp Control Room. Adding and using\nfiles with work items requires no additional setup from the user.

\n

Loading inputs

\n

The library automatically loads the first input work item, if the\nlibrary input argument autoload is truthy (default).

\n

After an input has been loaded its payload and files can be accessed\nthrough corresponding keywords, and optionally these values can be modified.

\n

E-mail triggering

\n

Since a process can be started in Control Room by sending an e-mail, a body\nin Text/JSON/YAML/HTML format can be sent as well and this gets attached to the\ninput work item with the rawEmail payload variable. This library automatically\nparses the content of it and saves into parsedEmail the dictionary\ntransformation of the original e-mail.

\n

If "Parse email" Control Room configuration option is enabled (recommended), then\nyour e-mail is automatically parsed in the work item under the email payload\nvariable, which is a dictionary containing a body holding the final parsed form\nof the interpreted e-mail body. The payload variable parsedEmail is still\navailable for backwards compatibility reasons and holds the very same body inside\nthe parsedEmail[Body].

\n

E-mail attachments will be added into the work item as files. Read more on:\nhttps://robocorp.com/docs/control-room/attended-or-unattended/email-trigger

\n

Example:

\n

After starting the process by sending an e-mail with a body like:

\n
\n{\n    "message": "Hello world!"\n}\n
\n

The robot can use the parsed e-mail body's dictionary:

\n
\n*** Tasks ***\nUsing Parsed Emails\n    ${mail} =    Get Work Item Variable    email\n    Set Work Item Variables    &{mail}[body]\n    ${message} =     Get Work Item Variable     message\n    Log    ${message}    # will print "Hello world!"\n
\n

The behaviour can be disabled by loading the library with\nauto_parse_email=${None} or altered by providing to it a dictionary with one\n"key: value" where the key is usually "email.text" (deprecated "rawEmail", the\nvariable set by Control Room, which acts as source for the parsed (deprecated raw)\ne-mail data) and the value can be "email.body" (deprecated "parsedEmail", where the\nparsed e-mail data gets stored into), value which can be customized and retrieved\nwith Get Work Item Variable.

\n

Creating outputs

\n

It's possible to create multiple new work items as an output from a\ntask. With the keyword Create Output Work Item a new empty item\nis created as a child for the currently loaded input.

\n

All created output items are sent into the input queue of the next\nstep in the process.

\n

Active work item

\n

Keywords that read or write from a work item always operate on the currently\nactive work item. Usually that is the input item that has been automatically\nloaded when the execution started, but the currently active item is changed\nwhenever the keywords Create Output Work Item or Get Input Work Item\nare called. It's also possible to change the active item manually with the\nkeyword Set current work item.

\n

Saving changes

\n

While a work item is loaded automatically when a suite starts, changes are\nnot automatically reflected back to the source. The work item will be modified\nlocally and then saved when the keyword Save Work Item is called.\nThis also applies to created output work items.

\n

It is recommended to defer saves until all changes have been made to prevent\nleaving work items in a half-modified state in case of failures.

\n

Local Development

\n

While Control Room is the default implementation, it can also be replaced\nwith a custom adapter. The selection is based on either the default_adapter\nargument for the library, or the RPA_WORKITEMS_ADAPTER environment\nvariable. The library has a built-in alternative adapter called FileAdapter for\nstoring work items to disk.

\n

The FileAdapter uses a local JSON file for input work items.\nIt's a list of work items, each of which has a data payload and files.

\n

An example of a local file with one work item:

\n
\n[\n    {\n        "payload": {\n            "variable1": "a-string-value",\n            "variable2": ["a", "list", "value"]\n        },\n        "files": {\n            "file1": "path/to/file.ext"\n        }\n    }\n]\n
\n

Output work items (if any) are saved to an adjacent file\nwith the same name, but with the extension .output.json. You can specify\nthrough the "RPA_OUTPUT_WORKITEM_PATH" env var a different path and name for this\nfile.

\n

Simulating the Cloud with Robocorp Code VSCode Extension

\n

If you are developing in VSCode with the Robocorp Code extension, you can\nutilize the built in local development features described in the\nDeveloping with work items locally section of the\nUsing work items development guide.

\n

Examples

\n

Robot Framework

\n

In the following example a task creates an output work item,\nand attaches some variables to it.

\n
\n*** Settings ***\nLibrary    RPA.Robocorp.WorkItems\n\n*** Tasks ***\nSave variables to Control Room\n    Create Output Work Item\n    Set work item variables    user=Dude    mail=address@company.com\n    Save Work Item\n
\n

In the next step of the process inside a different robot, we can use\npreviously saved work item variables. Also note how the input work item is\nloaded implicitly when the suite starts.

\n
\n*** Settings ***\nLibrary    RPA.Robocorp.WorkItems\n\n*** Tasks ***\nUse variables from Control Room\n    Set task variables from work item\n    Log    Variables are now available: s${user}, ${mail}\n
\n

Python

\n

The library can also be used through Python, but it does not implicitly\nload the first work item.

\n
\nimport logging\nfrom RPA.Robocorp.WorkItems import WorkItems\n\ndef list_variables(item_id):\n    library = WorkItems()\n    library.get_input_work_item()\n\n    variables = library.get_work_item_variables()\n    for variable, value in variables.items():\n        logging.info("%s = %s", variable, value)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:09", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -71217,10 +71217,10 @@ "name": "default", "types": [], "typedocs": {}, - "defaultValue": "", + "defaultValue": "", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "default=" + "repr": "default=" } ], "doc": "
\n

Return a single variable value from the work item,\nor default value if defined and key does not exist.

\n

If key does not exist and default is not defined, raises KeyError.

\n\n\n\n\n\n\n\n\n\n
param name:Name of variable
param default:Default value if key does not exist
\n

Robot Framework Example:

\n
\n*** Tasks ***\nUsing a work item\n    ${username}=    Get work item variable    username    default=guest\n
\n

Python Example:

\n
\nfrom RPA.Robocorp.WorkItems import WorkItems\n\nwi = WorkItems()\nwi.get_input_work_item()\ncustomers = wi.get_work_item_variable("customers")\nprint(customers)\n
\n
\n", @@ -71666,7 +71666,7 @@ "name": "RPA.Robocloud.Secrets", "doc": "
\n

Vault is a library for interacting with secrets stored in the Robocorp\nControl Room Vault (by default) or file-based secrets, which can be taken\ninto use by setting some environment variables.

\n

Robocorp Vault relies on environment variables, which are normally set\nautomatically by the Robocorp Work Agent or Assistant when a run is\ninitialized by the Robocorp Control Room. When developing robots locally\nin VSCode, you can use the Robocorp Code Extension to set these\nvariables automatically as well.

\n

Alternatively, you may set these environment variable manually using\nrcc or directly in some other fashion. The specific variables which\nmust exist are:

\n
    \n
  • RC_API_SECRET_HOST: URL to Robocorp Vault API
  • \n
  • RC_API_SECRET_TOKEN: API Token for Robocorp Vault API
  • \n
  • RC_WORKSPACE_ID: Control Room Workspace ID
  • \n
\n

File-based secrets can be set by defining two environment variables.

\n
    \n
  • RPA_SECRET_MANAGER: RPA.Robocorp.Vault.FileSecrets
  • \n
  • RPA_SECRET_FILE: Absolute path to the secrets database file
  • \n
\n

Example content of local secrets file:

\n
\n{\n    "swaglabs": {\n        "username": "standard_user",\n        "password": "secret_sauce"\n    }\n}\n
\n

OR

\n
\nswaglabs:\n    username: standard_user\n    password: secret_sauce\n
\n

Examples of Using Secrets in a Robot

\n

Robot Framework

\n
\n*** Settings ***\nLibrary    Collections\nLibrary    RPA.Robocorp.Vault\n\n*** Tasks ***\nReading secrets\n    ${secret}=    Get Secret  swaglabs\n    Log Many      ${secret}\n\nModifying secrets\n    ${secret}=          Get Secret      swaglabs\n    ${level}=           Set Log Level   NONE\n    Set To Dictionary   ${secret}       username    nobody\n    Set Log Level       ${level}\n    Set Secret          ${secret}\n
\n

Python

\n
\nfrom RPA.Robocorp.Vault import Vault\n\nVAULT = Vault()\n\ndef reading_secrets():\n    print(f"My secrets: {VAULT.get_secret('swaglabs')}")\n\ndef modifying_secrets():\n    secret = VAULT.get_secret("swaglabs")\n    secret["username"] = "nobody"\n    VAULT.set_secret(secret)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:09", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -71786,7 +71786,7 @@ "name": "RPA.Robocorp.Process", "doc": "
\n

A library for interacting with Control Room (CR) Process API endpoints.

\n

See Unattended processes for information about process run, step run and work\nitem states.

\n

See APIs and webhooks for information about Control Room APIs.

\n

The Process API endpoint is defined by RC_API_PROCESS_HOST environment variable,\nwhich is available during Robocorp Workforce Agent runs.

\n

Examples

\n

Robot Framework

\n

In the following example a task creates two input work items,\nand starts a process with those items. This results in 2 different\nprocess runs in the Control Room.

\n
\n*** Settings ***\nLibrary    RPA.Robocorp.Process\nLibrary    RPA.Robocorp.Vault\n\n*** Keywords ***\nInitialize Process Library\n    ${secrets}=  Get Secret  ProcessAPI\n    Set Credentials\n    ...   ${secrets}[workspace_id]\n    ...   ${secrets}[process_id]\n    ...   ${secrets}[apikey]\n\n*** Tasks ***\nStart process with work items\n    [Setup]   Initialize Process Library\n    &{item1}=  Create Dictionary  fname=Mark  lname=Monkey\n    &{item2}=  Create Dictionary  fname=John  lname=Doe\n    @{items}=  Create List  ${item1}   ${item2}\n    Start Process  work_items=${items}  batch=True\n
\n

Robot Framework

\n

In the following example a task creates work item with files.\nTo include files in a work item, the item needs to be created\nbefore starting the process (note. different start keyword than above).

\n

In this example I am using same keywords and settings from above example.

\n
\n*** Tasks ***\nStart process with work items\n    [Setup]   Initialize Process Library\n    &{data}=  Create Dictionary  fname=Mark  lname=Monkey\n    @{files}=  Create List\n    ...   ${CURDIR}${/}workdata.xlsx\n    ...   ${CURDIR}${/}other.csv\n    ${item_id}=    Create Input Work Item\n    ...   payload=${data}\n    ...   files=${files}\n    Start Configured Process\n    ...  config_type=work_items\n    ...  extra_info=${item_id}\n
\n

Download from process runs artifacts all matching files

\n
\n*** Settings ***\nLibrary      RPA.Robocorp.Process\nLibrary      RPA.Robocorp.Vault\nLibrary      RPA.HTTP\nTask Setup   Set Control Room Variables\n\n*** Keywords ***\nDownload Artifacts Matching\n    [Arguments]   ${filematch}\n    @{workitems}=   List Process Work Items\n    FOR  ${item}  IN  @{workitems}\n        @{artifacts}=   List Run Artifacts\n        ...  process_run_id=${item}[processRunId]\n        ...  step_run_id=${item}[activityRunId]\n        FOR  ${artifact}  IN  @{artifacts}\n            IF  "${filematch}"  IN   "${artifact}[fileName]"\n                ${download_link}=   Get Robot Run Artifact\n                ...  process_run_id=${item}[processRunId]\n                ...  step_run_id=${item}[activityRunId]\n                ...  artifact_id=${artifact}[id]\n                ...  filename=${artifact}[fileName]\n                Download\n                ...  url=${download_link}\n                ...  target=%{ROBOT_ARTIFACTS}${/}${artifact}[fileName]\n                ...  overwrite=${TRUE}\n                ...  stream=${TRUE}\n            END\n        END\n    END\n
\n

Python

\n

List work items in Control Room and retry failed items.

\n
\nfrom RPA.Robocorp.Process import Process\nfrom RPA.Robocorp.Vault import Vault\n\nsecrets = Vault().get_secret("ProcessAPI")\nprocess = Process(\n    secrets["workspace_id"],\n    secrets["process_id"],\n    secrets["apikey"]\n)\n\n\ndef retry_failed_items():\n    items = process.list_process_work_items()\n    for item in items:\n        if item["state"] == "FAILED":\n            print("FAILED work item: %s" % item["id"])\n            result = process.retry_work_item(item["id"])\n            print(result)\n\nif __name__ == "__main__":\n    retry_failed_items()\n
\n

Download from process runs artifacts all ".xlsx" files

\n
\nfrom RPA.Robocorp.Process import Process\nfrom RPA.HTTP import HTTP\n\ndef download_artifacts_matching(filematch=".xlsx"):\n    work_items = process.list_process_work_items()\n    for item in work_items:\n        artifacts = process.list_run_artifacts(\n            process_run_id=item["processRunId"],\n            step_run_id=item["activityRunId"]\n        )\n        for artifact in artifacts:\n            if filematch in artifact["fileName"]:\n                download_link = process.get_robot_run_artifact(\n                    process_run_id=item["processRunId"],\n                    step_run_id=item["activityRunId"],\n                    artifact_id=artifact["id"],\n                    filename=artifact["fileName"]\n                )\n                target_filepath = os.path.join(\n                    os.getenv("ROBOT_ARTIFACTS"),\n                    f"{artifact['fileName']}"\n                )\n                HTTP().download(\n                    url=download_link,\n                    target_file=target_filepath,\n                    overwrite=True,\n                    stream=True\n                )\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:09", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -72961,7 +72961,7 @@ "name": "RPA.Robocorp.Storage", "doc": "
\n

Control Room Asset Storage library operating with the cloud built-in key-value\nstore.

\n

Library requires at the minimum rpaframework version 24.0.0.

\n

Usage

\n
\n*** Tasks ***\nManage Assets\n    @{assets} =    List Assets\n    Log List    ${assets}\n\n    Set Text Asset    my-asset    My string asset value\n    ${value} =      Get Text Asset       my-asset\n    Log     Asset value: ${value}\n\n    Delete Asset    my-asset\n
\n
\nimport logging\nfrom RPA.Robocorp.Storage import Storage\n\nstorage = Storage()\n\ndef manage_assets():\n    assets = storage.list_assets()\n    logging.info(assets)\n\n    storage.set_text_asset("my-asset", "My string asset value")\n    value = storage.get_text_asset("my-asset")\n    logging.info("Asset value: %s", value)\n\n    storage.delete_asset("my-asset")\n
\n

Caveats

\n

Currently, there's no local file adapter support, therefore you need to be linked\nto Control Room and connected to a Workspace in VSCode before being able to develop\nlocally robots using this functionality.

\n

While the content type can be controlled (during bytes and file setting), it is\ncurrently disabled in this version of the library for simplicity reasons.

\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:09", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -73390,7 +73390,7 @@ "name": "RPA.Robocorp.Vault", "doc": "
\n

Vault is a library for interacting with secrets stored in the Robocorp\nControl Room Vault (by default) or file-based secrets, which can be taken\ninto use by setting some environment variables.

\n

Robocorp Vault relies on environment variables, which are normally set\nautomatically by the Robocorp Work Agent or Assistant when a run is\ninitialized by the Robocorp Control Room. When developing robots locally\nin VSCode, you can use the Robocorp Code Extension to set these\nvariables automatically as well.

\n

Alternatively, you may set these environment variable manually using\nrcc or directly in some other fashion. The specific variables which\nmust exist are:

\n
    \n
  • RC_API_SECRET_HOST: URL to Robocorp Vault API
  • \n
  • RC_API_SECRET_TOKEN: API Token for Robocorp Vault API
  • \n
  • RC_WORKSPACE_ID: Control Room Workspace ID
  • \n
\n

File-based secrets can be set by defining two environment variables.

\n
    \n
  • RPA_SECRET_MANAGER: RPA.Robocorp.Vault.FileSecrets
  • \n
  • RPA_SECRET_FILE: Absolute path to the secrets database file
  • \n
\n

Example content of local secrets file:

\n
\n{\n    "swaglabs": {\n        "username": "standard_user",\n        "password": "secret_sauce"\n    }\n}\n
\n

OR

\n
\nswaglabs:\n    username: standard_user\n    password: secret_sauce\n
\n

Examples of Using Secrets in a Robot

\n

Robot Framework

\n
\n*** Settings ***\nLibrary    Collections\nLibrary    RPA.Robocorp.Vault\n\n*** Tasks ***\nReading secrets\n    ${secret}=    Get Secret  swaglabs\n    Log Many      ${secret}\n\nModifying secrets\n    ${secret}=          Get Secret      swaglabs\n    ${level}=           Set Log Level   NONE\n    Set To Dictionary   ${secret}       username    nobody\n    Set Log Level       ${level}\n    Set Secret          ${secret}\n
\n

Python

\n
\nfrom RPA.Robocorp.Vault import Vault\n\nVAULT = Vault()\n\ndef reading_secrets():\n    print(f"My secrets: {VAULT.get_secret('swaglabs')}")\n\ndef modifying_secrets():\n    secret = VAULT.get_secret("swaglabs")\n    secret["username"] = "nobody"\n    VAULT.set_secret(secret)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:09", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -73510,7 +73510,7 @@ "name": "RPA.Robocorp.WorkItems", "doc": "
\n

A library for interacting with Control Room work items.

\n

Work items are used for managing data that go through multiple\nsteps and tasks inside a process. Each step of a process receives\ninput work items from the previous step, and creates output work items for\nthe next step.

\n

Item structure

\n

A work item's data payload is JSON and allows storing anything that is\nserializable. This library by default interacts with payloads that\nare a dictionary of key-value pairs, which it treats as individual\nvariables. These variables can be exposed to the Robot Framework task\nto be used directly.

\n

In addition to the data section, a work item can also contain files,\nwhich are stored by default in Robocorp Control Room. Adding and using\nfiles with work items requires no additional setup from the user.

\n

Loading inputs

\n

The library automatically loads the first input work item, if the\nlibrary input argument autoload is truthy (default).

\n

After an input has been loaded its payload and files can be accessed\nthrough corresponding keywords, and optionally these values can be modified.

\n

E-mail triggering

\n

Since a process can be started in Control Room by sending an e-mail, a body\nin Text/JSON/YAML/HTML format can be sent as well and this gets attached to the\ninput work item with the rawEmail payload variable. This library automatically\nparses the content of it and saves into parsedEmail the dictionary\ntransformation of the original e-mail.

\n

If "Parse email" Control Room configuration option is enabled (recommended), then\nyour e-mail is automatically parsed in the work item under the email payload\nvariable, which is a dictionary containing a body holding the final parsed form\nof the interpreted e-mail body. The payload variable parsedEmail is still\navailable for backwards compatibility reasons and holds the very same body inside\nthe parsedEmail[Body].

\n

E-mail attachments will be added into the work item as files. Read more on:\nhttps://robocorp.com/docs/control-room/attended-or-unattended/email-trigger

\n

Example:

\n

After starting the process by sending an e-mail with a body like:

\n
\n{\n    "message": "Hello world!"\n}\n
\n

The robot can use the parsed e-mail body's dictionary:

\n
\n*** Tasks ***\nUsing Parsed Emails\n    ${mail} =    Get Work Item Variable    email\n    Set Work Item Variables    &{mail}[body]\n    ${message} =     Get Work Item Variable     message\n    Log    ${message}    # will print "Hello world!"\n
\n

The behaviour can be disabled by loading the library with\nauto_parse_email=${None} or altered by providing to it a dictionary with one\n"key: value" where the key is usually "email.text" (deprecated "rawEmail", the\nvariable set by Control Room, which acts as source for the parsed (deprecated raw)\ne-mail data) and the value can be "email.body" (deprecated "parsedEmail", where the\nparsed e-mail data gets stored into), value which can be customized and retrieved\nwith Get Work Item Variable.

\n

Creating outputs

\n

It's possible to create multiple new work items as an output from a\ntask. With the keyword Create Output Work Item a new empty item\nis created as a child for the currently loaded input.

\n

All created output items are sent into the input queue of the next\nstep in the process.

\n

Active work item

\n

Keywords that read or write from a work item always operate on the currently\nactive work item. Usually that is the input item that has been automatically\nloaded when the execution started, but the currently active item is changed\nwhenever the keywords Create Output Work Item or Get Input Work Item\nare called. It's also possible to change the active item manually with the\nkeyword Set current work item.

\n

Saving changes

\n

While a work item is loaded automatically when a suite starts, changes are\nnot automatically reflected back to the source. The work item will be modified\nlocally and then saved when the keyword Save Work Item is called.\nThis also applies to created output work items.

\n

It is recommended to defer saves until all changes have been made to prevent\nleaving work items in a half-modified state in case of failures.

\n

Local Development

\n

While Control Room is the default implementation, it can also be replaced\nwith a custom adapter. The selection is based on either the default_adapter\nargument for the library, or the RPA_WORKITEMS_ADAPTER environment\nvariable. The library has a built-in alternative adapter called FileAdapter for\nstoring work items to disk.

\n

The FileAdapter uses a local JSON file for input work items.\nIt's a list of work items, each of which has a data payload and files.

\n

An example of a local file with one work item:

\n
\n[\n    {\n        "payload": {\n            "variable1": "a-string-value",\n            "variable2": ["a", "list", "value"]\n        },\n        "files": {\n            "file1": "path/to/file.ext"\n        }\n    }\n]\n
\n

Output work items (if any) are saved to an adjacent file\nwith the same name, but with the extension .output.json. You can specify\nthrough the "RPA_OUTPUT_WORKITEM_PATH" env var a different path and name for this\nfile.

\n

Simulating the Cloud with Robocorp Code VSCode Extension

\n

If you are developing in VSCode with the Robocorp Code extension, you can\nutilize the built in local development features described in the\nDeveloping with work items locally section of the\nUsing work items development guide.

\n

Examples

\n

Robot Framework

\n

In the following example a task creates an output work item,\nand attaches some variables to it.

\n
\n*** Settings ***\nLibrary    RPA.Robocorp.WorkItems\n\n*** Tasks ***\nSave variables to Control Room\n    Create Output Work Item\n    Set work item variables    user=Dude    mail=address@company.com\n    Save Work Item\n
\n

In the next step of the process inside a different robot, we can use\npreviously saved work item variables. Also note how the input work item is\nloaded implicitly when the suite starts.

\n
\n*** Settings ***\nLibrary    RPA.Robocorp.WorkItems\n\n*** Tasks ***\nUse variables from Control Room\n    Set task variables from work item\n    Log    Variables are now available: s${user}, ${mail}\n
\n

Python

\n

The library can also be used through Python, but it does not implicitly\nload the first work item.

\n
\nimport logging\nfrom RPA.Robocorp.WorkItems import WorkItems\n\ndef list_variables(item_id):\n    library = WorkItems()\n    library.get_input_work_item()\n\n    variables = library.get_work_item_variables()\n    for variable, value in variables.items():\n        logging.info("%s = %s", variable, value)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:10", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -73907,10 +73907,10 @@ "name": "default", "types": [], "typedocs": {}, - "defaultValue": "", + "defaultValue": "", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "default=" + "repr": "default=" } ], "doc": "
\n

Return a single variable value from the work item,\nor default value if defined and key does not exist.

\n

If key does not exist and default is not defined, raises KeyError.

\n\n\n\n\n\n\n\n\n\n
param name:Name of variable
param default:Default value if key does not exist
\n

Robot Framework Example:

\n
\n*** Tasks ***\nUsing a work item\n    ${username}=    Get work item variable    username    default=guest\n
\n

Python Example:

\n
\nfrom RPA.Robocorp.WorkItems import WorkItems\n\nwi = WorkItems()\nwi.get_input_work_item()\ncustomers = wi.get_work_item_variable("customers")\nprint(customers)\n
\n
\n", @@ -74360,7 +74360,7 @@ "name": "RPA.RobotLogListener", "doc": "
\n

RobotLogListener is a library for controlling logging during\na Robot Framework execution using the listener API.

\n

About keyword parameters

\n

Parameters names and keywords for keywords Mute Run On Failure and Register Protected Keywords\ndo not need to be full names of keywords, ie. all keywords matching even partially will be affected.\nRun Keyword would match all BuiltIn library keywords (17 keywords in RF 3.2.1) and of course all\nRun Keyword named keywords in any resource and/or library file which are imported would be matched also.

\n

Mute Run On Failure

\n

This keyword is to be used specifically with RPA.Browser.Selenium library, which extends\nSeleniumLibrary. Normally most of the SeleniumLibrary keywords execute run_on_failure\nbehaviour, which can be set at library initialization. By default this behaviour is running\nCapture Page Screenshot keyword on failure.

\n

In the example task Check the official website below the keyword Run Keyword is muted and when\nit runs the keyword Element Should Be Visible then those failures do not create page screenshots\ninto log file.

\n

It is also possible to change default failure behaviour by giving parameter\noptional_keyword_to_run for Mute Run On Failure, see task Check the official website with error log.\nThis optional keyword would be then executed on failure. Due to the underlying SeleniumLibrary\nimplementation this keyword can't have arguments.

\n

Example of using Mute Run On Failure without and with optional keyword to run.

\n
\n*** Settings ***\nLibrary         RPA.Browser.Selenium\nLibrary         RPA.RobotLogListener\nTask Setup      Set Task Variable   ${TRIES}   1\nTask Teardown   Close All Browsers\n\n*** Tasks ***\nCheck the official website\n   Mute Run On Failure   Run Keyword\n   Open Available Browser   https://www.robocorp.com\n   Check for visible element\n   Capture Page Screenshot\n\nCheck the official website with error log\n   Mute Run On Failure   Run Keyword  optional_keyword_to_run=Log tries\n   Open Available Browser   https://www.robocorp.com\n   Check for visible element\n   Capture Page Screenshot\n\n*** Keywords ***\nCheck for visible element\n   FOR  ${idx}  IN RANGE  1   20\n      Set Task Variable   ${TRIES}   ${idx}\n      ${status}   Run Keyword And Return Status   Element Should Be Visible  id:xyz\n      Exit For Loop If   '${status}' == 'PASS'\n      Sleep  2s\n   END\n\nLog tries\n   Log  Checked element visibility ${TRIES} times\n
\n

Register Protected Keywords

\n

This keyword is used to totally disable logging for named keywords. In the example below\nthe keyword This will not output is protected and it will not be logging into Robot Framework\nlog files.

\n

Robot Framework

\n
\n*** Settings ***\nLibrary         RPA.RobotLogListener\n\n*** Tasks ***\nProtecting keywords\n   This will not output        # will output because called before register\n   Register Protected Keywords    This will not output\n   This will not output        # is now registered\n   This will output\n\n*** Keywords ***\nThis will not output\n   Log   1\n\nThis will output\n   Log   2\n
\n

Python

\n
\nfrom robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError\nfrom RPA.RobotLogListener import RobotLogListener\n\ntry:\n   BuiltIn().import_library("RPA.RobotLogListener")\nexcept RobotNotRunningError:\n   pass\n\nclass CustomLibrary:\n\n   def __init__(self):\n      listener = RobotLogListener()\n      listener.register_protected_keywords(\n            ["CustomLibrary.special_keyword"]\n      )\n\n   def special_keyword(self):\n      print('will not be written to log')\n      return 'not shown in the log'\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:53", + "generated": "2024-04-03 09:45:10", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -74574,7 +74574,7 @@ "name": "RPA.SAP", "doc": "

This library wraps the upstream SapGuiLibrary.

\n

The SapGuiLibrary is a library that enables users to create tests for the Sap Gui application

\n

The library uses the Sap Scripting Engine, therefore Scripting must be enabled in Sap in order for this library to work.

\n

Opening a connection / Before running tests

\n

First of all, you have to make sure the Sap Logon Pad is started. You can automate this process by using the AutoIT library or the Process Library.

\n

After the Sap Login Pad is started, you can connect to the Sap Session using the keyword connect to session.

\n

If you have a successful connection you can use Open Connection to open a new connection from the Sap Logon Pad or Connect To Existing Connection to connect to a connection that is already open.

\n

Locating or specifying elements

\n

You need to specify elements starting from the window ID, for example, wnd[0]/tbar[1]/btn[8]. In some cases the SAP ID contains backslashes. Make sure you escape these backslashes by adding another backslash in front of it.

\n

Screenshots (on error)

\n

The SapGUILibrary offers an option for automatic screenshots on error. Default this option is enabled, use keyword disable screenshots on error to skip the screenshot functionality. Alternatively, this option can be set at import.

", "version": "1.1", - "generated": "2024-04-03 09:43:54", + "generated": "2024-04-03 09:45:10", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -75846,7 +75846,7 @@ "name": "RPA.Salesforce", "doc": "
\n

Salesforce is a library for accessing Salesforce using REST API.\nThe library extends simple-salesforce library.

\n

More information available at Salesforce REST API Developer Guide.

\n

Dataloader

\n

The keyword execute_dataloader_import can be used to mimic\nSalesforce Dataloader import behaviour.

\n

input_object can be given in different formats. Below is an example where\ninput is in RPA.Table format in method a and list format in method b.

\n
\n*** Settings ***\nLibrary     RPA.Salesforce\nLibrary     RPA.Database\nTask Setup  Authorize Salesforce\n\n*** Tasks ***\n# Method a\n${orders}=        Database Query Result As Table\n...               SELECT * FROM incoming_orders\n${status}=        Execute Dataloader Insert\n...               ${orders}  ${mapping_dict}  Tilaus__c\n# Method b\n${status}=        Execute Dataloader Insert\n...               ${WORKDIR}${/}orders.json  ${mapping_dict}  Tilaus__c\n
\n

Example file orders.json

\n
\n[\n    {\n        "asiakas": "0015I000002jBLIQA2"\n    },\n    {\n        "asiakas": "0015I000002jBLDQA2"\n    },\n]\n
\n

mapping_object describes how the input data fields are mapped into Salesforce\nobject attributes. In the example, the mapping defines that asiakas attribute in the\ninput object is mapped into Tilaaja__c attribute of Tilaus__c custom Salesforce object.

\n
\n{\n    "Tilaus__c": {\n        "asiakas": "Tilaaja__c"\n    },\n}\n
\n

Object type could be, for example, Tilaus__c.

\n

Salesforce object operations

\n

Following operations can be used to manage Salesforce objects:

\n
    \n
  • Get Salesforce Object By Id
  • \n
  • Create Salesforce Object
  • \n
  • Update Salesforce Object
  • \n
  • Upsert Salesforce Object
  • \n
  • Delete Salesforce Object
  • \n
  • Get Salesforce Object Metadata
  • \n
  • Describe Salesforce Object
  • \n
\n

There are two ways to set the Salesforce domain. You can set the domain at time of\nlibrary import or using the Set Domain keyword.

\n

There are several ways to declare a domain at time of library import:

\n
\n*** Settings ***\nLibrary     RPA.Salesforce    sandbox=${TRUE}\n
\n

Or using the domain to your Salesforce My domain:

\n
\n*** Settings ***\nLibrary     RPA.Salesforce    domain="robocorp"\n
\n

The domain can also be set using the keyword Set Domain:

\n
\n*** Settings ***\nLibrary     RPA.Salesforce\n\n*** Tasks ***\n# Sets the domain for a sandbox environment\nSet Domain    sandbox\n\n# Sets the domain to a Salseforce My domain\nSet Domain    robocorp\n\n# Sets to domain to the default of 'login'\nSet Domain\n
\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary     RPA.Salesforce\nTask Setup  Authorize Salesforce\n\n*** Variables ***\n${ACCOUNT_NOKIA}    0015I000002jBLDQA2\n\n*** Tasks ***\nChange account details in Salesforce\n    &{account}=      Get Salesforce Object By Id   Account  ${ACCOUNT_NOKIA}\n    &{update_obj}=   Create Dictionary   Name=Nokia Ltd  BillingStreet=Nokia bulevard 1\n    ${result}=       Update Salesforce Object  Account  ${ACCOUNT_NOKIA}  ${update_obj}\n\n*** Keywords ***\nAuthorize Salesforce\n    ${secrets}=     Get Secret   salesforce\n    Auth With Token\n    ...        username=${secrets}[USERNAME]\n    ...        password=${secrets}[PASSWORD]\n    ...        api_token=${secrets}[API_TOKEN]\n
\n

Python

\n
\nimport pprint\nfrom RPA.Salesforce import Salesforce\nfrom RPA.Robocorp.Vault import FileSecrets\n\npp = pprint.PrettyPrinter(indent=4)\nfilesecrets = FileSecrets("secrets.json")\nsecrets = filesecrets.get_secret("salesforce")\n\nsf = Salesforce()\nsf.auth_with_token(\n    username=secrets["USERNAME"],\n    password=secrets["PASSWORD"],\n    api_token=secrets["API_TOKEN"],\n)\nnokia_account_id = "0015I000002jBLDQA2"\naccount = sf.get_salesforce_object_by_id("Account", nokia_account_id)\npp.pprint(account)\nbilling_information = {\n    "BillingStreet": "Nokia Bulevard 1",\n    "BillingCity": "Espoo",\n    "BillingPostalCode": "01210",\n    "BillingCountry": "Finland",\n}\nresult = sf.update_salesforce_object("Account", nokia_account_id, billing_information)\nprint(f"Update result: {result}")\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:54", + "generated": "2024-04-03 09:45:10", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -76905,7 +76905,7 @@ "name": "RPA.Slack", "doc": "
\n

RPA Framework library for Slack operations.

\n
\n", "version": "", - "generated": "2024-04-03 09:43:54", + "generated": "2024-04-03 09:45:10", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -77093,7 +77093,7 @@ "name": "RPA.Smartsheet", "doc": "
\n

Smartsheet is a library for accessing Smartsheet using the\nSmartsheet API 2.0. It extends smartsheet-python-sdk.

\n
\n

Getting started

\n

To use this library, you need to have a Smartsheet account and an API token.\nYou can get your API token from the Smartsheet Developer Portal.\nThis library currently only supports raw token authentication. Once\nobtained, you can configure the access token using the Set Access Token\nkeyword or via the access_token argument in the library import.

\n
\n
\n

Working on a sheet

\n

The library supports working on a single sheet at a time. To select a sheet\nto work on, use the Select Sheet keyword. This will set the sheet as\nthe active sheet for all subsequent operations. Some operations\nupdate the sheet, but this will not necessarily be reflected in the active\nsheet. To refresh the active sheet, use the Refresh Sheet keyword.

\n
\n
\n

Native Smartsheet objects

\n

You can retrieve the native Smartsheet object from many keywords by\nspecifying the native argument. The default will return a more\ncommon Python object, such as a dictionary or list. The native object\nis a class from the smartsheet-python-sdk library and will have\nadditional methods and attributes. The most important attributes\navailable for most native objects are (some may be unavailable\nfor some objects):

\n
    \n
  • id: the unique identifier of the object
  • \n
  • name: the name of the object
  • \n
  • title: the title of a column
  • \n
  • permalink: the URL to the object
  • \n
\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:54", + "generated": "2024-04-03 09:45:10", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -78410,7 +78410,7 @@ "name": "RPA.Tables", "doc": "
\n

Tables is a library for manipulating tabular data inside Robot Framework.

\n

It can import data from various sources and apply different operations to it.\nCommon use-cases are reading and writing CSV files, inspecting files in\ndirectories, or running tasks using existing Excel data.

\n

Import types

\n

The data a table can be created from can be of two main types:

\n
    \n
  1. An iterable of individual rows, like a list of lists, or list of dictionaries
  2. \n
  3. A dictionary of columns, where each dictionary value is a list of values
  4. \n
\n

For instance, these two input values:

\n
\ndata1 = [\n    {"name": "Mark", "age": 58},\n    {"name": "John", "age": 22},\n    {"name": "Adam", "age": 67},\n]\n\ndata2 = {\n    "name": ["Mark", "John", "Adam"],\n    "age":  [    58,     22,     67],\n}\n
\n

Would both result in the following table:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
IndexNameAge
0Mark58
1John22
2Adam67
\n

Indexing columns and rows

\n

Columns can be referred to in two ways: either with a unique string\nname or their position as an integer. Columns can be named either when\nthe table is created, or they can be (re)named dynamically with keywords.\nThe integer position can always be used, and it starts from zero.

\n

For instance, a table with columns "Name", "Age", and "Address" would\nallow referring to the "Age" column with either the name "Age" or the\nnumber 1.

\n

Rows do not have a name, but instead only have an integer index. This\nindex also starts from zero. Keywords where rows are indexed also support\nnegative values, which start counting backwards from the end.

\n

For instance, in a table with five rows, the first row could be referred\nto with the number 0. The last row could be accessed with either 4 or\n-1.

\n

Examples

\n

Robot Framework

\n

The Tables library can load tabular data from various other libraries\nand manipulate it inside Robot Framework.

\n
\n*** Settings ***\nLibrary    RPA.Tables\n\n*** Keywords ***\nFiles to Table\n    ${files}=    List files in directory    ${CURDIR}\n    ${files}=    Create table    ${files}\n    Filter table by column    ${files}    size  >=  ${1024}\n    FOR    ${file}    IN    @{files}\n        Log    ${file}[name]\n    END\n    Write table to CSV    ${files}    ${OUTPUT_DIR}${/}files.csv\n
\n

Python

\n

The library is also available directly through Python, where it\nis easier to handle multiple different tables or do more bespoke\nmanipulation operations.

\n
\nfrom RPA.Tables import Tables\n\nlibrary = Tables()\norders = library.read_table_from_csv(\n    "orders.csv", columns=["name", "mail", "product"]\n)\n\ncustomers = library.group_table_by_column(rows, "mail")\nfor customer in customers:\n    for order in customer:\n        add_cart(order)\n    make_order()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:54", + "generated": "2024-04-03 09:45:11", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -80078,7 +80078,7 @@ "name": "RPA.Tasks", "doc": "
\n

Tasks is a library for controlling task execution during a Robot Framework run.

\n

It allows conditional branching between tasks, loops and jumps, and optionally\nvalidating the execution through a schema file. It can also be used to\nvisualize the tasks as a graph.

\n

Execution model

\n

In a typical Robot Framework run, tasks are ordered linearly in a file and\nthey're executed in definition order. Events that happen during\nthe execution can not affect the order and only have the option to fail the task\nor continue as defined.

\n

Using the Tasks library, it's possible to change this model according\nto different states or inputs. The execution will start by running a single\nstart task from the suite, and then according to user-defined keywords or\nschema rules select the next task. Any task which is defined in the same file\ncan be used, and the same task can also be used multiple times during a single\nexecution.

\n

Example:

\n

As an example, the following Robot Framework file describes a process where\na task would have to be executed multiple times before a condition is reached.\nIn a real-world scenario, these tasks would be more complicated, instead of just\nincrementing numbers.

\n
\n*** Settings ***\nLibrary    RPA.Tasks\n\n*** Variables ***\n${CURRENT}    ${1}\n${TARGET}     ${5}\n\n*** Tasks ***\nCheck loop condition\n    Log    I'm trying to count to ${TARGET}\n    Set next task if    ${CURRENT} >= ${TARGET}\n    ...    Target reached\n    ...    Increment current number\n\nThis will not run\n    Fail    This should never run\n\nIncrement current number\n    Set suite variable    ${CURRENT}    ${CURRENT + 1}\n    Log    Number is now ${CURRENT}\n    Jump to task    Check loop condition\n\nTarget reached\n    Log    Those are some good numbers!\n
\n

The execution for this example would go as follows:

\n
    \n
  1. It starts from Check loop condition, as it's the first task in the file.
  2. \n
  3. During the first task, the keyword Set next task if is called, which queues\nup the next task according to a condition.
  4. \n
  5. In the initial state, we have not reached the target number, and will next run\nthe task Increment current number.
  6. \n
  7. The second task executes normally and in the end jumps back to the first\ntask using the keyword Jump to task.
  8. \n
  9. The above sequence is repeated until the condition is met, and we move to\nthe final task of the file. This final task does not schedule further tasks\nand the execution ends.
  10. \n
\n

You can also note the task This will not run, which as the name implies\nis never executed, as no other task schedules or jumps to it.

\n

The console log from the above execution shows how the same task is executed\nmultiple times:

\n
\n==============================================================================\nIncrementing Process\n==============================================================================\n#1   Check loop condition                                             | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#2   Increment current number                                         | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#3   Check loop condition                                             | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#4   Increment current number                                         | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#5   Check loop condition                                             | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#6   Increment current number                                         | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#7   Check loop condition                                             | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#8   Increment current number                                         | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#9   Check loop condition                                             | PASS |\nTransition: Set by keyword\n------------------------------------------------------------------------------\n#10  Target reached                                                   | PASS |\n------------------------------------------------------------------------------\nIncrementing Process:: [/graph_incrementing_process.svg]              | PASS |\n10 critical tasks, 10 passed, 0 failed\n10 tasks total, 10 passed, 0 failed\n==============================================================================\n
\n

Graph

\n

A common way to document a process is through a directed graph. These graphs\nare usually drawn manually and describe the expected higher level steps.\nThe actual implementation itself follows a different path through a graph,\ndepending on inputs or implementation details. This library visualizes this\nexecution graph using the Graphviz tool.

\n

After the execution is finished, it will create a\nDOT file\nand render it as an image. This image will automatically be appended\nto the suite's documentation field.

\n

Requirements

\n

Drawing the graph requires a working installation of\nGraphviz. This can be installed through their\nwebsite or by using Conda.

\n

This requirement is optional for the functioning of this library, and will\ndisplay a warning if the tool is not available. The visualization\ncan be entirely disabled with the graph argument during library\ninitialization.

\n

Schema

\n

There is an option to define a schema file for the suite, which is written in JSON.\nThis file will be used to validate the actual execution and fail it if an unexpected\ntransition between tasks happens. It can also define rules for selecting the next\ntask, which allows separating the task and process definitions.

\n

Example:

\n

The execution-example shown previously used keywords to control\nthe execution. This can also be done using the following schema:

\n
\n{\n    "tasks": {\n        "Check loop condition": {\n            "alias": "check",\n            "start": true,\n            "next": [\n                "increment",\n                "target"\n            ],\n            "actions": [\n                {\n                    "condition": "$CURRENT >= $TARGET",\n                    "task": "target"\n                },\n                {\n                    "condition": "$CURRENT < $TARGET",\n                    "task": "increment"\n                }\n            ]\n        },\n        "Increment current number": {\n            "alias": "increment",\n            "next": [\n                "check"\n            ],\n            "actions": [\n                {\n                    "status": "PASS",\n                    "task": "check"\n                }\n            ]\n        },\n        "Target reached": {\n            "alias": "target",\n            "end": true,\n            "next": []\n        }\n    }\n}\n
\n

This has the added benefit of protecting against implementation errors,\nas the library will validate the start and end tasks, and transitions between\ndifferent tasks.

\n

After this schema has been taken into use, the aforementioned example\nwill reduce to the following:

\n
\n*** Settings ***\nLibrary    RPA.Tasks    schema=counter-schema.json\n\n*** Variables ***\n${CURRENT}    ${1}\n${TARGET}     ${5}\n\n*** Tasks ***\nCheck loop condition\n    Log    I'm trying to count to ${TARGET}\n\nThis will not run\n    Fail    This should never run\n\nIncrement current number\n    Set suite variable    ${CURRENT}    ${CURRENT + 1}\n    Log    Number is now ${CURRENT}\n\nTarget reached\n    Log    Those are some good numbers!\n
\n

Format

\n

The current format is JSON with the following structure:

\n
\n{\n    "tasks": {\n        [name: string]: {\n            "alias": string,\n            "start": boolean,\n            "end": boolean,\n            "next": string[],\n            "actions": action[],\n        }\n    }\n}\n
\n

Each schema is a map of tasks with various properties. The keys must\nmatch the task names in the Robot Framework file definition. All properties\ninside the task are optional.

\n

The available properties and their uses:

\n
    \n
  • \n
    alias: Define a short name for the task, which can be used as a reference
    \n
    inside the schema.
    \n
    \n
  • \n
  • \n
    start: Start task for execution. There can be only one task with this
    \n
    enabled. If not defined, will default to first task in the file.
    \n
    \n
  • \n
  • \n
    end: Valid end task for execution. There can be multiple tasks with this
    \n
    enabled. Fails the execution if this is defined for any task and the\nexecution stops in a non-end task.
    \n
    \n
  • \n
  • \n
    next: List of valid tasks to transition to from this task. Supports
    \n
    alias definitions.
    \n
    \n
  • \n
  • \n
    actions: List of actions that are executed at the end of the task.
    \n
    See section below for details.
    \n
    \n
  • \n
\n

The types of actions:

\n
    \n
  • \n
    exception: Set the next task if a matching exception occurs.
    \n
    Matches the exception message as regex.
    \n
    \n
  • \n
  • \n
    condition: Set the next task if a conditional expression is true.
    \n
    Allows using Robot Framework variables.
    \n
    \n
  • \n
  • \n
    status: Set the next task if the current task's result matches,
    \n
    e.g. PASS or FAIL.
    \n
    \n
  • \n
\n

Examples of actions:

\n
\n[\n    {"exception": ".*ValueError.*", "task": "Invalid input values"},\n    {"condition": "$ATTEMPTS > 10", "task": "Too many attempts"},\n    {"status": "PASS", "task": "Success state"}\n]\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:55", + "generated": "2024-04-03 09:45:11", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -80406,7 +80406,7 @@ "name": "RPA.Twitter", "doc": "
\n

Twitter is a library for accessing Twitter using developer API.\nThe library extends tweepy library.

\n

Authorization credentials can be given as parameters for authorize keyword\nor keyword can read them in as environment variables:

\n
    \n
  • TWITTER_CONSUMER_KEY
  • \n
  • TWITTER_CONSUMER_SECRET
  • \n
  • TWITTER_ACCESS_TOKEN
  • \n
  • TWITTER_ACCESS_TOKEN_SECRET
  • \n
\n

Library usage requires Twitter developer credentials.\nThose can be requested from Twitter developer site

\n

Examples

\n
\n*** Settings ***\nLibrary   RPA.Twitter\n\n*** Tasks ***\nGet user tweets and like them\n    [Setup]   Authorize\n    @{tweets}=   Get User Tweets   username=niinisto   count=5\n    FOR   ${tweet}  IN   @{tweets}\n        Like   ${tweet}\n    END\n
\n
\nfrom RPA.Twitter import Twitter\n\nlibrary = Twitter()\nlibrary.authorize()\ntweets = library.get_user_tweets(username="niinisto", count=5)\nfor tw in tweets:\n    library.like(tw)\ntweets = library.text_search_tweets(query="corona trump")\nfor tw in tweets:\n    print(tw.text)\nuser = library.get_user_profile("niinisto")\nlibrary.follow(user)\nlibrary.tweet("first tweet")\nme = library.get_me()\nprint(me)\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:55", + "generated": "2024-04-03 09:45:11", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -80883,7 +80883,7 @@ "name": "RPA.Windows", "doc": "
\n

The Windows is a library that can be used for Windows desktop automation.

\n

Library is included in the rpaframework package by default, but as shown in the\nbelow example library can be also installed separately without rpaframework.

\n
\nchannels:\n  - conda-forge\ndependencies:\n  - python=3.9.13\n  - pip=22.1.2\n  - pip:\n    - rpaframework-windows==7.0.2 # standalone Windows library (rpaframework includes this library)\n
\n

About terminology

\n

ControlType is a value referred to by locator keys type: or control. Represents type of application\nobject, which can be e.g. Window, Button or ListItem.

\n

Element is an entity of an application structure (e.g. certain button in a window), which can be\nidentified by a locator. (also referred as Control)

\n

WindowsElement is an library container object for the Element. All the keywords returning elements, will in\nfact return WindowsElement`s. The ones accepting `locator or root_element as arguments, will accept\nWindowsElement as an argument value. (locator accepts strings as well)

\n

Structure of the WindowsElement

\n
\nclass WindowsElement:\n    item: Control        # `item` contains object instance of the element\n    locator: str         # `locator` that found this element\n    name: str            # `Name` attribute of the element\n    automation_id: str   # `AutomationId` attribute of the element\n    control_type: str    # `ControlTypeName` attribute of the element\n    class_name: str      # `ClassName` attribute of the element\n    left: int            # element's rectangle left coordinate\n    right: int           # element's rectangle right coordinate\n    top: int             # element's rectangle top coordinate\n    bottom: int          # element's rectangle bottom coordinate\n    width: int           # element's rectangle horizontal width\n    height: int          # element's rectangle vertical height\n    xcenter: int         # element's rectangle center point x coordinate\n    ycenter: int         # element's rectangle center point y coordinate\n
\n

Example of the WindowsElement usage

\n
\n${rows}=    Get Elements    class:DataGridRow\n# ${rows} is a list of `WindowsElement`s\nFOR    ${row}    IN    @{rows}\n    Log To Console   ${row.name}                # access `WindowsElement`\n    Log To Console   ${row.item.AutomationId}   # access `WindowsElement.item` directly\n    Log To Console   ${row.item.Name}           # same as `${row.name}`\nEND\n
\n

Locators

\n

Locators are based on different strategies that can used identify Control object.

\n

Available strategies that can be used for the locators:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
KeyMaps to search property
nameName
classClassName
typeControlType
controlControlType
idAutomationId
automationidAutomationId
regexRegexName
subnameSubName
indexfoundIndex (int)
offsetoffset coordinates (x (int), y (int)) from control center
executabletarget window by its executable name
handletarget window handle (int)
desktopSPECIAL target desktop, no value for the key e.g. desktop:desktop and name:Calculator
processNOT YET SUPPORTED target window by its executable's process id
depthsearchDepth (int) for finding Control (default 8)
pathtarget element by its index-based path traversal (e.g. path:2|3|8|2)
\n

About root element on locators

\n

Locators work on currently active root element. At the start root element is the whole\ndesktop. There are different ways on changing this root element.

\n

Keyword Control Window is the most common method of setting certain system window\nas a root element for further actions using locators. In the absence of a provided\nroot_element parameter, here's how you can control the default root element\nresolving:

\n
\n
    \n
  • Set Anchor: Sets the active anchor window from which the search begins.
  • \n
  • Control Window: Controls and focuses on a window and marks it as the current\nactive window, from which all the subsequent searches will start from in the\nabsence of a set anchor.
  • \n
  • If there's no set anchor nor active window, then the last resort will be the\n"Desktop" element itself.
  • \n
\n
\n

Locators themselves support cascading syntax (denoted by character > in the locator string),\nwhich can denote root element in "parent (root) & child" terms.

\n

For example.

\n
\nClick  id:controls > id:activate\n
\n

On the above example the left side of the > character, id:controls, represents the root element\n(can be called as "parent element" in this case). Right side of the locator string, id:activate,\nrepresents "child" element and it will be searched under the "parent element".

\n

This way element search is more efficient, because search are restricted to certain section of element\ntree which can be quite huge especially on the desktop level and in certain applications.

\n

Keyword examples:

\n
\nControl Window    name:Calculator\nControl Window    Calculator  # will execute search by 'name:Calculator'\nControl Window    executable:Spotify.exe\n
\n

some example locators, and can be omitted ie. space between locator keys means the same thing as and:

\n
\nid:clearButton\ntype:Group and name:"Number pad" > type:Button and index:4\ntype:Group and name:"Number pad" > control:Button index:5\nid:Units1 > name:${unit}\nclass:Button offset:370,0\n
\n

About locator restrictions

\n

Visual locators are not supported in this library and they can't be used in the same chain with these\nWindows locators. Visual locators are supported by the RPA.Desktop library. Locator chaining (image and\nWindows locators) support will be added in the future.

\n

Locator syntax does not yet support OR operation (only AND operations).

\n

About search depth

\n

The library does element search depth by default to the level of 8. This means that locator will look into\n8 levels of elements under element tree of the root element. This can lead into situation where element\ncan't be found. To fix this it is recommended to set root element which can be found within 8 levels OR\ndefining depth in the locator string to a bigger value, e.g. id:deeplyNestedButton depth:16. Useful\nkeywords for setting root element are Control Window, Set Anchor and Get Element.

\n

About the path strategy

\n

When automation IDs and names aren't enough (or not reliable), then you can fallback\nto the positions of elements in a tree. This can be achieved using the path:\nstrategy to specify a list of element positions which indicates how to traverse the\ntree from parent to child beginning with the resolved root.

\n

Example: Calculator > path:2|3|2|8|2 - this locator looks for the "Calculator"\nwindow, then it looks for the 2nd direct child and then it looks for the 3rd one of\nthe previous child and so on until it consumes the path completely. (indexes start\nwith 1)

\n

An alternative way to get the whole tree to explore it yourself would be to use the\nPrint Tree keyword.

\n

Keyboard and mouse

\n

Keys for the keyboard actions are given using uiautomation specification.

\n

Special keys which are given within {} syntax.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
KeyMaps to action
LBUTTONLeft mouse button
RBUTTONRight mouse button
CANCELControl-break processing
MBUTTONMiddle mouse button (three-button mouse)
XBUTTON1X1 mouse button
XBUTTON2X2 mouse button
BACKBACKSPACE key
TABTAB key
CLEARCLEAR key
RETURNENTER key
ENTERENTER key
SHIFTSHIFT key
CTRLCTRL key
CONTROLCTRL key
ALTALT key
PAUSEPAUSE key
CAPITALCAPS LOCK key
KANAIME Kana mode
HANGUELIME Hanguel mode (maintained for compatibility; use VK_HANGUL)
HANGULIME Hangul mode
JUNJAIME Junja mode
FINALIME final mode
HANJAIME Hanja mode
KANJIIME Kanji mode
ESCESC key
ESCAPEESC key
CONVERTIME convert
NONCONVERTIME nonconvert
ACCEPTIME accept
MODECHANGEIME mode change request
SPACESPACEBAR
PRIORPAGE UP key
PAGEUPPAGE UP key
NEXTPAGE DOWN key
PAGEDOWNPAGE DOWN key
ENDEND key
HOMEHOME key
LEFTLEFT ARROW key
UPUP ARROW key
RIGHTRIGHT ARROW key
DOWNDOWN ARROW key
SELECTSELECT key
PRINTPRINT key
EXECUTEEXECUTE key
SNAPSHOTPRINT SCREEN key
PRINTSCREENPRINT SCREEN key
INSERTINS key
INSINS key
DELETEDEL key
DELDEL key
HELPHELP key
WINLeft Windows key (Natural keyboard)
LWINLeft Windows key (Natural keyboard)
RWINRight Windows key (Natural keyboard)
APPSApplications key (Natural keyboard)
SLEEPComputer Sleep key
NUMPAD0Numeric keypad 0 key
NUMPAD1Numeric keypad 1 key
NUMPAD2Numeric keypad 2 key
NUMPAD3Numeric keypad 3 key
NUMPAD4Numeric keypad 4 key
NUMPAD5Numeric keypad 5 key
NUMPAD6Numeric keypad 6 key
NUMPAD7Numeric keypad 7 key
NUMPAD8Numeric keypad 8 key
NUMPAD9Numeric keypad 9 key
MULTIPLYMultiply key
ADDAdd key
SEPARATORSeparator key
SUBTRACTSubtract key
DECIMALDecimal key
DIVIDEDivide key
F1F1 key
F2F2 key
F3F3 key
F4F4 key
F5F5 key
F6F6 key
F7F7 key
F8F8 key
F9F9 key
F10F10 key
F11F11 key
F12F12 key
F13F13 key
F14F14 key
F15F15 key
F16F16 key
F17F17 key
F18F18 key
F19F19 key
F20F20 key
F21F21 key
F22F22 key
F23F23 key
F24F24 key
NUMLOCKNUM LOCK key
SCROLLSCROLL LOCK key
LSHIFTLeft SHIFT key
RSHIFTRight SHIFT key
LCONTROLLeft CONTROL key
LCTRLLeft CONTROL key
RCONTROLRight CONTROL key
RCTRLRight CONTROL key
LALTLeft MENU key
RALTRight MENU key
BROWSER_BACKBrowser Back key
BROWSER_FORWARDBrowser Forward key
BROWSER_REFRESHBrowser Refresh key
BROWSER_STOPBrowser Stop key
BROWSER_SEARCHBrowser Search key
BROWSER_FAVORITESBrowser Favorites key
BROWSER_HOMEBrowser Start and Home key
VOLUME_MUTEVolume Mute key
VOLUME_DOWNVolume Down key
VOLUME_UPVolume Up key
MEDIA_NEXT_TRACKNext Track key
MEDIA_PREV_TRACKPrevious Track key
MEDIA_STOPStop Media key
MEDIA_PLAY_PAUSEPlay/Pause Media key
LAUNCH_MAILStart Mail key
LAUNCH_MEDIA_SELECTSelect Media key
LAUNCH_APP1Start Application 1 key
LAUNCH_APP2Start Application 2 key
OEM_1Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the ';:' key
OEM_PLUSFor any country/region, the '+' key
OEM_COMMAFor any country/region, the ',' key
OEM_MINUSFor any country/region, the '-' key
OEM_PERIODFor any country/region, the '.' key
OEM_2Used for miscellaneous characters; it can vary by keyboard.
OEM_3Used for miscellaneous characters; it can vary by keyboard.
OEM_4Used for miscellaneous characters; it can vary by keyboard.
OEM_5Used for miscellaneous characters; it can vary by keyboard.
OEM_6Used for miscellaneous characters; it can vary by keyboard.
OEM_7Used for miscellaneous characters; it can vary by keyboard.
OEM_8Used for miscellaneous characters; it can vary by keyboard.
OEM_102Either the angle bracket key or the backslash key on the RT 102-key keyboard
PROCESSKEYIME PROCESS key
PACKETUsed to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KeyUp
ATTNAttn key
CRSELCrSel key
EXSELExSel key
EREOFErase EOF key
PLAYPlay key
ZOOMZoom key
NONAMEReserved
PA1PA1 key
OEM_CLEARClear key
\n

Examples.

\n
\nlib = Windows()\n# {Ctrl}, {Delete} ... are special keys' name in SpecialKeyNames.\nlib.send_keys('{Ctrl}a{Delete}{Ctrl}v{Ctrl}s{Ctrl}{Shift}s{Win}e{PageDown}') #press Ctrl+a, Delete, Ctrl+v, Ctrl+s, Ctrl+Shift+s, Win+e, PageDown\nlib.send_keys('{Ctrl}(AB)({Shift}(123))') #press Ctrl+A+B, type '(', press Shift+1+2+3, type ')', if '()' follows a hold key, hold key won't release util ')'\nlib.send_keys('{Ctrl}{a 3}') #press Ctrl+a at the same time, release Ctrl+a, then type 'a' 2 times\nlib.send_keys('{a 3}{B 5}') #type 'a' 3 times, type 'B' 5 times\nlib.send_keys('{{}Hello{}}abc {a}{b}{c} test{} 3}{!}{a} (){(}{)}') #type: '{Hello}abc abc test}}}!a ()()'\nlib.send_keys('0123456789{Enter}')\nlib.send_keys('ABCDEFGHIJKLMNOPQRSTUVWXYZ{Enter}')\nlib.send_keys('abcdefghijklmnopqrstuvwxyz{Enter}')\nlib.send_keys('`~!@#$%^&*()-_=+{Enter}')\nlib.send_keys('[]{{}{}}\\|;:'",<.>/?{Enter}')\n
\n

Using access key of the element (element property -> AccessKey 'alt+s').\nThe (+s) means that previous special key is kept down until closing parenthesis is reached.

\n

On the below example this means that 'ALT' key is pressed down, then '+' and 's' keys are pressed\ndown before they are all released up.

\n
\nSend Keys   keys={Alt}(+s)\n
\n

Mouse clicks can be executed with keywords specific for a type of a click, e.g. Click (normal click),\nDouble Click and Right Click.

\n

How to inspect

\n

Most common, and recommended by Microsoft, inspector tool for Windows is Accessibility Insights that\ncan be installed separately. Other options are tools Inspect Object and UI Automation Verify, which\ncan be accessed by installing Windows SDK.

\n

A more programmatic approach is to run Print Tree    log_as_warnings=${True}\nkeyword and then observe in the logs the found elements structure starting from\nDesktop (or the currently set anchor / active window) as root. (refer to keyword's\ndocumentation\nfor more details)

\n

Recording

\n

The package provides some rudimentary inspecting and recording via the\nwindows-record script, which can be started through the command line (in an\nenvironment containing the rpaframework-windows installation).

\n

Recording inspects elements on mouse click and can be stopped by pressing the\nESC key. Expected console output:

\n
\nC:\\Users\\User\\robots\\> windows-record -v  # or > python -m RPA.Windows -v\nMouse recording started. Use ESC to stop recording.\n\n--------------------------------------------------------------------------------\nCopy-paste the code below into your *** Tasks *** or *** Keywords ***\n--------------------------------------------------------------------------------\n\nControl Window    name:Calculator and type:WindowControl and class:ApplicationFrameWindow  # handle:9569486\nClick    name:Calculator and id:TitleBar and type:WindowControl and class:ApplicationFrameTitleBarWindow and path:1\nClick    name:"Display is 0" and id:CalculatorResults and type:TextControl and path:2|3|2|2\nClick    name:Eight and id:num8Button and type:ButtonControl and class:Button and path:2|3|2|8|9\nClick    name:Nine and id:num9Button and type:ButtonControl and class:Button and path:2|3|2|8|10\nClick    name:Clear and id:clearButton and type:ButtonControl and class:Button and path:2|3|2|5|3\n\n--------------------------------------------------------------------------------\n
\n

Check our Portal example in order to learn more abot the path: strategy in\nlocators and how to record elements displaying their paths:\nhttps://robocorp.com/portal/robot/robocorp/example-windows-element-path

\n

Video recorded demo on how to run the recorder script from VSCode:\nhttps://www.loom.com/share/2807372359f34b9cbe1bc2df9194ec68

\n

Caveats

\n
    \n
  • Make sure your display scaling is set to 100%, otherwise you might encounter\nissues when clicking or interacting with elements. (since offsets and coordinates\nget distorted)
  • \n
  • Disturbing the automation (like interacting with your mouse/keyboard) or having\nother apps obstructing the process interacting with your app of interest will\nmost probably affect the expected behaviour. In order to avoid this, try\ncontrolling the app's main window right before sending clicks or keys. And keep\ntargeting elements through string locators, as interacting with Windows\nelement objects previously retrieved will not work as expected in a future\naltered state of the app (changes under the element structure).
  • \n
\n

Example: Robot Framework

\n

The library must be imported first.

\n
\n*** Settings ***\nLibrary    RPA.Windows\n
\n

Windows Calculator automation task

\n
\n*** Tasks ***\nDo some calculations\n    [Setup]  Windows Run   calc.exe\n\n    Control Window    name:Calculator\n    Click    id:clearButton\n    Send Keys   keys=96+4=\n    ${result} =    Get Attribute    id:CalculatorResults    Name\n    Log To Console    ${result}\n\n    @{buttons} =  Get Elements  type:Group and name:"Number pad" > type:Button\n    FOR  ${button}  IN  @{buttons}\n        Log To Console   ${button}\n    END\n\n    [Teardown]   Close Current Window\n
\n

Example: Python

\n
\nfrom RPA.Windows import Windows\n\nlibrary = Windows()\n\ndef test_do_some_calculations():\n    library.windows_run("calc.exe")\n    try:\n        library.control_window("name:Calculator")\n        library.click("id:clearButton")\n        library.send_keys(keys="96+4=")\n        result = library.get_attribute("id:CalculatorResults", "Name")\n        print(result)\n        buttons = library.get_elements(\n            'type:Group and name:"Number pad" > type:Button'\n        )\n        for button in buttons:\n            print(button)\n    finally:\n        library.close_current_window()\n
\n
\n", "version": "", - "generated": "2024-04-03 09:43:55", + "generated": "2024-04-03 09:45:11", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -82356,10 +82356,10 @@ "typedocs": { "None": "None" }, - "defaultValue": "", + "defaultValue": "", "kind": "POSITIONAL_OR_NAMED", "required": false, - "repr": "validator: Callable | None = " + "repr": "validator: Callable | None = " } ], "doc": "
\n

Set value of the element defined by the locator.

\n

Note: An anchor will work only on element structures where you can\nrely on the stability of that root/child element tree, as remaining the same.\nUsually these kind of structures are tables. (but not restricted to)

\n

Note: It is important to set append=${True} if you want to keep the\ncurrent text in the element. Other option is to read the current text into a\nvariable, then modify that value as you wish and pass it to the Set Value\nkeyword for a complete text replacement. (without setting the append flag)

\n

The following exceptions may be raised:

\n
\n
    \n
  • ActionNotPossible if the element does not allow the SetValue action\nto be run on it nor having send_keys_fallback=${True}.
  • \n
  • ValueError if the new value to be set can't be set correctly.
  • \n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
param locator:String locator or element object.
param value:String value to be set.
param append:False for setting the value, True for appending it. (OFF by\ndefault)
param enter:Set it to True to press the Enter key at the end of the\ninput. (nothing is pressed by default)
param newline:Set it to True to add a new line at the end of the value. (no\nEOL included by default; this won't work with send_keys_fallback enabled)
param send_keys_fallback:
 Tries to set the value by sending it through keys\nif the main way of setting it fails. (enabled by default)
param validator:
 Function receiving two parameters post-setting, the expected\nand the current value, which returns True if the two values match. (by\ndefault, the keyword will raise if the values are different, set this to\nNone to disable validation or pass your custom function instead)
returns:The element object identified through the passed locator.
\n

Example: Robot Framework

\n
\n*** Tasks ***\nSet Values In Notepad\n    Set Value   type:DataItem name:column1   ab c  # Set value to "ab c"\n    # Press ENTER after setting the value.\n    Set Value    type:Edit name:"File name:"    console.txt   enter=${True}\n\n    # Add newline (manually) at the end of the string. (Notepad example)\n    Set Value    name:"Text Editor"  abc\\n\n    # Add newline with parameter.\n    Set Value    name:"Text Editor"  abc   newline=${True}\n\n    # Clear Notepad window and start appending text.\n    Set Anchor  name:"Text Editor"\n    # All the following keyword calls will use the anchor element as a\n    #  starting point, UNLESS they specify a locator explicitly or\n    #  Clear Anchor is used.\n    ${time} =    Get Time\n    # Clears with append=${False}. (default)\n    Set Value    value=The time now is ${time}\n    # Append text and add a newline at the end.\n    Set Value    value= and it's the task run time.   append=${True}\n    ...    newline=${True}\n    # Continue appending and ensure a new line at the end by pressing\n    #  the Enter key this time.\n    Set Value    value=But this will appear on the 2nd line now.\n    ...    append=${True}   enter=${True}   validator=${None}\n
\n

Example: Python

\n
\nfrom RPA.Windows import Windows\n\nlib_win = Windows()\nlocator = "Document - WordPad > Rich Text Window"\nelem = lib_win.set_value(locator, value="My text", send_keys_fallback=True)\ntext = lib_win.get_value(elem)\nprint(text)\n
\n
\n", @@ -82616,7 +82616,7 @@ "name": "RPA.Word.Application", "doc": "
\n

Word.Application is a library for controlling the Word application.

\n

Examples

\n

Robot Framework

\n
\n*** Settings ***\nLibrary                 RPA.Word.Application\nTask Setup              Open Application\nSuite Teardown          Quit Application\n\n*** Tasks ***\nOpen existing file\n    Open File           old.docx\n    Write Text          Extra Line Text\n    Write Text          Another Extra Line of Text\n    Save Document AS    ${CURDIR}${/}new.docx\n    ${texts}=           Get all Texts\n    Close Document\n
\n

Python

\n
\nfrom RPA.Word.Application import Application\n\napp = Application()\napp.open_application()\napp.open_file('old.docx')\napp.write_text('Extra Line Text')\napp.save_document_as('new.docx')\napp.quit_application()\n
\n

Caveats

\n

This library works on a Windows operating system with UI enabled only, and you must\nensure that you open the app first with Open Application before running any\nother relevant keyword which requires to operate on an open app. The application is\nautomatically closed at the end of the task execution, so this can be changed by\nimporting the library with the autoexit=${False} setting.

\n
\n*** Settings ***\nLibrary     RPA.Excel|Outlook|Word.Application    autoexit=${False}\n
\n

If you're running the Process by Control Room through a custom self-hosted Worker\nservice, then please make sure that you enable an RDP session by ticking "Use\nDesktop Connection" under the Step configuration.

\n

If you still encounter issues with opening a document, please ensure that file can\nbe opened first manually and dismiss any alert potentially blocking the process.

\n

Check the documentation below for more info:

\n\n
\n", "version": "", - "generated": "2024-04-03 09:43:55", + "generated": "2024-04-03 09:45:12", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", @@ -83353,7 +83353,7 @@ "name": "RPA.version", "doc": "

Documentation for library RPA.version.

", "version": "28.4.2", - "generated": "2024-04-03 09:43:55", + "generated": "2024-04-03 09:45:12", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", diff --git a/libdoc/RPA_Archive.html b/libdoc/RPA_Archive.html index b1b2233ac9..f8e933724a 100644 --- a/libdoc/RPA_Archive.html +++ b/libdoc/RPA_Archive.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Assistant.html b/libdoc/RPA_Assistant.html index df9a21a17e..d8c914b8b5 100644 --- a/libdoc/RPA_Assistant.html +++ b/libdoc/RPA_Assistant.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Browser.html b/libdoc/RPA_Browser.html index 23852388e8..06c0723876 100644 --- a/libdoc/RPA_Browser.html +++ b/libdoc/RPA_Browser.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Browser_Playwright.html b/libdoc/RPA_Browser_Playwright.html index 09f62f389e..c2d90b29b6 100644 --- a/libdoc/RPA_Browser_Playwright.html +++ b/libdoc/RPA_Browser_Playwright.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Browser_Selenium.html b/libdoc/RPA_Browser_Selenium.html index d13f81222a..d9ebfbb3bd 100644 --- a/libdoc/RPA_Browser_Selenium.html +++ b/libdoc/RPA_Browser_Selenium.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Browser_common.html b/libdoc/RPA_Browser_common.html index 1c9de72d90..8b2060e8d2 100644 --- a/libdoc/RPA_Browser_common.html +++ b/libdoc/RPA_Browser_common.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Calendar.html b/libdoc/RPA_Calendar.html index 6d8c0ab7eb..8a8ff5e781 100644 --- a/libdoc/RPA_Calendar.html +++ b/libdoc/RPA_Calendar.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Cloud_AWS.html b/libdoc/RPA_Cloud_AWS.html index 14c7159ded..5b0db6359a 100644 --- a/libdoc/RPA_Cloud_AWS.html +++ b/libdoc/RPA_Cloud_AWS.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Cloud_Azure.html b/libdoc/RPA_Cloud_Azure.html index 26fa8866bc..68a5720336 100644 --- a/libdoc/RPA_Cloud_Azure.html +++ b/libdoc/RPA_Cloud_Azure.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Cloud_Google.html b/libdoc/RPA_Cloud_Google.html index c3cfd5ddc7..c6ceeb91e0 100644 --- a/libdoc/RPA_Cloud_Google.html +++ b/libdoc/RPA_Cloud_Google.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Crypto.html b/libdoc/RPA_Crypto.html index f1d316a674..bdfa72ce5a 100644 --- a/libdoc/RPA_Crypto.html +++ b/libdoc/RPA_Crypto.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Database.html b/libdoc/RPA_Database.html index 633df848ad..248f1ffe79 100644 --- a/libdoc/RPA_Database.html +++ b/libdoc/RPA_Database.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Desktop.html b/libdoc/RPA_Desktop.html index 30bb792b75..d5c82abfd6 100644 --- a/libdoc/RPA_Desktop.html +++ b/libdoc/RPA_Desktop.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Desktop_Clipboard.html b/libdoc/RPA_Desktop_Clipboard.html index 92ad3b156b..7512f82ace 100644 --- a/libdoc/RPA_Desktop_Clipboard.html +++ b/libdoc/RPA_Desktop_Clipboard.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Desktop_OperatingSystem.html b/libdoc/RPA_Desktop_OperatingSystem.html index d5ab17bb9b..bb08e5d82e 100644 --- a/libdoc/RPA_Desktop_OperatingSystem.html +++ b/libdoc/RPA_Desktop_OperatingSystem.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Desktop_Windows.html b/libdoc/RPA_Desktop_Windows.html index 19dbea8412..7b0d4e795b 100644 --- a/libdoc/RPA_Desktop_Windows.html +++ b/libdoc/RPA_Desktop_Windows.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_DocumentAI.html b/libdoc/RPA_DocumentAI.html index c7090cb0c9..d010b96ad8 100644 --- a/libdoc/RPA_DocumentAI.html +++ b/libdoc/RPA_DocumentAI.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_DocumentAI_Base64AI.html b/libdoc/RPA_DocumentAI_Base64AI.html index f6e1cca296..dae32f7d57 100644 --- a/libdoc/RPA_DocumentAI_Base64AI.html +++ b/libdoc/RPA_DocumentAI_Base64AI.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_DocumentAI_DocumentAI.html b/libdoc/RPA_DocumentAI_DocumentAI.html index 2b9f336412..f75d0d82d7 100644 --- a/libdoc/RPA_DocumentAI_DocumentAI.html +++ b/libdoc/RPA_DocumentAI_DocumentAI.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_DocumentAI_Nanonets.html b/libdoc/RPA_DocumentAI_Nanonets.html index 7068935fff..1667c878df 100644 --- a/libdoc/RPA_DocumentAI_Nanonets.html +++ b/libdoc/RPA_DocumentAI_Nanonets.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Email_Exchange.html b/libdoc/RPA_Email_Exchange.html index f135565976..430009b282 100644 --- a/libdoc/RPA_Email_Exchange.html +++ b/libdoc/RPA_Email_Exchange.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Email_ImapSmtp.html b/libdoc/RPA_Email_ImapSmtp.html index 4c441136e3..156f148935 100644 --- a/libdoc/RPA_Email_ImapSmtp.html +++ b/libdoc/RPA_Email_ImapSmtp.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Excel_Application.html b/libdoc/RPA_Excel_Application.html index 2deb8b09e2..ed4e391ed2 100644 --- a/libdoc/RPA_Excel_Application.html +++ b/libdoc/RPA_Excel_Application.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Excel_Files.html b/libdoc/RPA_Excel_Files.html index ad56181b9b..a59a579e0a 100644 --- a/libdoc/RPA_Excel_Files.html +++ b/libdoc/RPA_Excel_Files.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_FTP.html b/libdoc/RPA_FTP.html index a7ed509ff7..b03aedb8e9 100644 --- a/libdoc/RPA_FTP.html +++ b/libdoc/RPA_FTP.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_FileSystem.html b/libdoc/RPA_FileSystem.html index a71f434f47..333438c2a5 100644 --- a/libdoc/RPA_FileSystem.html +++ b/libdoc/RPA_FileSystem.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_HTTP.html b/libdoc/RPA_HTTP.html index 96d47c1f04..c9911675e1 100644 --- a/libdoc/RPA_HTTP.html +++ b/libdoc/RPA_HTTP.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Hubspot.html b/libdoc/RPA_Hubspot.html index c415f7146a..b970b7e4f3 100644 --- a/libdoc/RPA_Hubspot.html +++ b/libdoc/RPA_Hubspot.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Images.html b/libdoc/RPA_Images.html index fff837187b..313e9bcc88 100644 --- a/libdoc/RPA_Images.html +++ b/libdoc/RPA_Images.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_JSON.html b/libdoc/RPA_JSON.html index 73099ba9cd..1e26c9ec7c 100644 --- a/libdoc/RPA_JSON.html +++ b/libdoc/RPA_JSON.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_JavaAccessBridge.html b/libdoc/RPA_JavaAccessBridge.html index c37555203e..430542d389 100644 --- a/libdoc/RPA_JavaAccessBridge.html +++ b/libdoc/RPA_JavaAccessBridge.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_MFA.html b/libdoc/RPA_MFA.html index 3aab031f7a..a9ed499242 100644 --- a/libdoc/RPA_MFA.html +++ b/libdoc/RPA_MFA.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_MSGraph.html b/libdoc/RPA_MSGraph.html index c912d93ff2..3b7eed4f73 100644 --- a/libdoc/RPA_MSGraph.html +++ b/libdoc/RPA_MSGraph.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Netsuite.html b/libdoc/RPA_Netsuite.html index b6aeb84bfd..56d9c5ffed 100644 --- a/libdoc/RPA_Netsuite.html +++ b/libdoc/RPA_Netsuite.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Notifier.html b/libdoc/RPA_Notifier.html index d402259e5c..0d08b6e4fe 100644 --- a/libdoc/RPA_Notifier.html +++ b/libdoc/RPA_Notifier.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_OpenAI.html b/libdoc/RPA_OpenAI.html index 447b74c95b..bea192781a 100644 --- a/libdoc/RPA_OpenAI.html +++ b/libdoc/RPA_OpenAI.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Outlook_Application.html b/libdoc/RPA_Outlook_Application.html index ea7cae76d4..f93d9fcd65 100644 --- a/libdoc/RPA_Outlook_Application.html +++ b/libdoc/RPA_Outlook_Application.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_PDF.html b/libdoc/RPA_PDF.html index 486227d419..0d8a6cc9e4 100644 --- a/libdoc/RPA_PDF.html +++ b/libdoc/RPA_PDF.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Robocloud_Items.html b/libdoc/RPA_Robocloud_Items.html index 71d9b5573a..f073ee7b31 100644 --- a/libdoc/RPA_Robocloud_Items.html +++ b/libdoc/RPA_Robocloud_Items.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Robocloud_Secrets.html b/libdoc/RPA_Robocloud_Secrets.html index 89d20dbd9f..5c58b9d088 100644 --- a/libdoc/RPA_Robocloud_Secrets.html +++ b/libdoc/RPA_Robocloud_Secrets.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Robocorp_Process.html b/libdoc/RPA_Robocorp_Process.html index 213886f7e6..83ba299e5e 100644 --- a/libdoc/RPA_Robocorp_Process.html +++ b/libdoc/RPA_Robocorp_Process.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Robocorp_Storage.html b/libdoc/RPA_Robocorp_Storage.html index 31b5e4a5c1..8ac2d48ff3 100644 --- a/libdoc/RPA_Robocorp_Storage.html +++ b/libdoc/RPA_Robocorp_Storage.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Robocorp_Vault.html b/libdoc/RPA_Robocorp_Vault.html index 882fd183b2..a1bb6a011c 100644 --- a/libdoc/RPA_Robocorp_Vault.html +++ b/libdoc/RPA_Robocorp_Vault.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Robocorp_WorkItems.html b/libdoc/RPA_Robocorp_WorkItems.html index f0a39fe78f..2ca56b3fca 100644 --- a/libdoc/RPA_Robocorp_WorkItems.html +++ b/libdoc/RPA_Robocorp_WorkItems.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_RobotLogListener.html b/libdoc/RPA_RobotLogListener.html index 38ca06b449..1fad3ea240 100644 --- a/libdoc/RPA_RobotLogListener.html +++ b/libdoc/RPA_RobotLogListener.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_SAP.html b/libdoc/RPA_SAP.html index 4b4272df39..3b05feb340 100644 --- a/libdoc/RPA_SAP.html +++ b/libdoc/RPA_SAP.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Salesforce.html b/libdoc/RPA_Salesforce.html index d9e9b3a1ef..e0e0c32306 100644 --- a/libdoc/RPA_Salesforce.html +++ b/libdoc/RPA_Salesforce.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Slack.html b/libdoc/RPA_Slack.html index a17a67731c..0ecb2f6b6b 100644 --- a/libdoc/RPA_Slack.html +++ b/libdoc/RPA_Slack.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Smartsheet.html b/libdoc/RPA_Smartsheet.html index bb806009e0..67b3ff837b 100644 --- a/libdoc/RPA_Smartsheet.html +++ b/libdoc/RPA_Smartsheet.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Tables.html b/libdoc/RPA_Tables.html index f359d4b70a..e904009f43 100644 --- a/libdoc/RPA_Tables.html +++ b/libdoc/RPA_Tables.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Tasks.html b/libdoc/RPA_Tasks.html index 71151f47f8..64e9a60e29 100644 --- a/libdoc/RPA_Tasks.html +++ b/libdoc/RPA_Tasks.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Twitter.html b/libdoc/RPA_Twitter.html index cd81c62ebd..e3a1efd5a5 100644 --- a/libdoc/RPA_Twitter.html +++ b/libdoc/RPA_Twitter.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Windows.html b/libdoc/RPA_Windows.html index 22b3337191..dac4ac7a86 100644 --- a/libdoc/RPA_Windows.html +++ b/libdoc/RPA_Windows.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_Word_Application.html b/libdoc/RPA_Word_Application.html index 456827079c..107b6d4aa2 100644 --- a/libdoc/RPA_Word_Application.html +++ b/libdoc/RPA_Word_Application.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libdoc/RPA_version.html b/libdoc/RPA_version.html index 518c680012..0c13342653 100644 --- a/libdoc/RPA_version.html +++ b/libdoc/RPA_version.html @@ -1019,7 +1019,7 @@ //# sourceMappingURL=iframeResizer.contentWindow.map diff --git a/libraries/http/python.html b/libraries/http/python.html index 191e0926fb..0a96fc7468 100644 --- a/libraries/http/python.html +++ b/libraries/http/python.html @@ -171,7 +171,7 @@

HTTP* On Session.

-DEFAULT_RETRY_METHOD_LIST = ['PUT', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'GET']
+DEFAULT_RETRY_METHOD_LIST = ['HEAD', 'OPTIONS', 'TRACE', 'PUT', 'GET', 'DELETE']
@@ -210,7 +210,7 @@

HTTP
-create_client_cert_session(alias, url, headers={}, cookies={}, client_certs=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'GET'])
+create_client_cert_session(alias, url, headers={}, cookies={}, client_certs=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['HEAD', 'OPTIONS', 'TRACE', 'PUT', 'GET', 'DELETE'])

Create Session: create a HTTP session to a server

url Base url of the server

alias Robot Framework alias to identify the session

@@ -248,7 +248,7 @@

HTTP
-create_custom_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'GET'])
+create_custom_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['HEAD', 'OPTIONS', 'TRACE', 'PUT', 'GET', 'DELETE'])

Create Session: create a HTTP session to a server

url Base url of the server

alias Robot Framework alias to identify the session

@@ -289,7 +289,7 @@

HTTP
-create_digest_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'GET'])
+create_digest_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['HEAD', 'OPTIONS', 'TRACE', 'PUT', 'GET', 'DELETE'])

Create Session: create a HTTP session to a server

url Base url of the server

alias Robot Framework alias to identify the session

@@ -327,7 +327,7 @@

HTTP
-create_ntlm_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'GET'])
+create_ntlm_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['HEAD', 'OPTIONS', 'TRACE', 'PUT', 'GET', 'DELETE'])

Create Session: create a HTTP session to a server

url Base url of the server

alias Robot Framework alias to identify the session

@@ -365,7 +365,7 @@

HTTP
-create_session(alias, url, headers={}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'GET'])
+create_session(alias, url, headers={}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['HEAD', 'OPTIONS', 'TRACE', 'PUT', 'GET', 'DELETE'])

Create Session: create a HTTP session to a server

alias Robot Framework alias to identify the session

url Base url of the server

diff --git a/python.json b/python.json index bf12f94dbb..c35ae63063 100644 --- a/python.json +++ b/python.json @@ -89,7 +89,7 @@ }, { "module": "RPA.HTTP.HTTP", - "markdown": "# Python API\n\n## HTTP\n\n### *class* RPA.HTTP.HTTP(\\*args, \\*\\*kwargs)\n\nThe *RPA.HTTP* library extends functionality of the [RequestsLibrary](https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html).\nSee that documentation for several examples of how to issue `GET`\nrequests and utilize the returned `result` objects.\n\nThis extension provides helper keywords to get an HTTP resource on a\nsession. The `HTTP Get` and `Download` keywords will initiate a\nsession if one does not exist for the provided URL, or use an existing\nsession. When using these keywords, you do not need to manage\nsessions with `Create Session`. Session management is still\nrequired if you use the underlying session keywords, e.g.,\n`* On Session`.\n\n#### DEFAULT_RETRY_METHOD_LIST *= ['PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'GET']*\n\n#### ROBOT_LIBRARY_DOC_FORMAT *= 'reST'*\n\n#### ROBOT_LIBRARY_SCOPE *= 'GLOBAL'*\n\n#### check_vulnerabilities()\n\nCheck for possible vulnerabilities in the installed runtime\nenvironment packages.\n\nCurrently will check only for OpenSSL version and outputs warning message on any\ndiscovered vulnerability.\n\n* **Returns:**\n list of all check results\n\n```robotframework\n*** Tasks ***\nVulnerability Check\n ${results}= Check Vulnerabilities\n FOR ${result} IN @{results}\n Log To Console TYPE: ${result}[type]\n Log To Console VULNERABLE: ${result}[vulnerable]\n Log To Console MESSAGE: ${result}[message]\n END\n```\n\n#### create_client_cert_session(alias, url, headers={}, cookies={}, client_certs=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'GET'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`client_certs` [\u2018client certificate\u2019, \u2018client key\u2019] PEM files containing the client key and certificate\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_custom_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'GET'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` A Custom Authentication object to be passed on to the requests library.\n: [http://docs.python-requests.org/en/master/user/advanced/#custom-authentication](http://docs.python-requests.org/en/master/user/advanced/#custom-authentication)\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_digest_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'GET'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` [\u2018DOMAIN\u2019, \u2018username\u2019, \u2018password\u2019] for NTLM Authentication\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_ntlm_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'GET'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` [\u2018DOMAIN\u2019, \u2018username\u2019, \u2018password\u2019] for NTLM Authentication\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_session(alias, url, headers={}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'GET'])\n\nCreate Session: create a HTTP session to a server\n\n`alias` Robot Framework alias to identify the session\n\n`url` Base url of the server\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` List of username & password for HTTP Basic Auth\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### delete_all_sessions()\n\nRemoves all the session objects\n\n#### delete_on_session(\\*\\*kwargs)\n\nSends a DELETE request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### delete_request(alias, uri, data=None, json=None, params=None, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use DELETE On Session instead.\n\nSend a DELETE request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the DELETE request to\n\n`json` a value that will be json encoded\n: and sent as request data if data is not specified\n\n`headers` a dictionary of headers to use with the request\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`timeout` connection timeout\n\n#### download(url: str, target_file: Optional[str] = None, verify: Union[bool, str] = True, force_new_session: bool = False, overwrite: bool = False, stream: bool = False, \\*\\*kwargs)\n\nAn alias for the `HTTP Get` keyword.\n\nThe difference in use is that the URL is always downloaded based on\nthe URL path (even without `target_file`). If there is a filename\nin the path, then that is used as `target_file` to save to. By default,\nthe filename will be \u201cdownloaded.html\u201d.\n\n```robotframework\n*** Settings ***\nLibrary RPA.HTTP\n\n*** Variables ***\n${DOWNLOAD_PATH}= ${OUTPUT DIR}${/}downloads\n${WORD_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc\n${EXCEL_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file_example_XLS_10.xls\n\n*** Tasks ***\nDownload files with reused session with provided file names\n # Starts a new session\n Download ${WORD_EXAMPLE} target_file=${DOWNLOAD_PATH}\n # Uses the previous session\n Download ${EXCEL_EXAMPLE} target_file=${DOWNLOAD_PATH}\n # Above files are downloaded using the same names as they have\n # on the remote server.\n```\n\n* **Parameters:**\n * **url** \u2013 target URL for GET request\n * **target_file** \u2013 filepath to save request content, default `None`\n * **verify** \u2013 if SSL verification should be done, default `True`,\n a CA_BUNDLE path can also be provided\n * **force_new_session** \u2013 if new HTTP session should be created,\n default `False`\n * **overwrite** \u2013 used together with `target_file`, if `True` will overwrite\n the target file, default `False`\n * **stream** \u2013 if `False` the response content will be immediately downloaded\n* **Returns:**\n request response as a dict\n\n#### get_current_session_alias()\n\nGet request session alias that was used with the `HTTP Get` keyword.\n\n* **Returns:**\n name of session alias as a string\n\n#### *static* get_file_for_streaming_upload(path)\n\nOpens and returns a file descriptor of a specified file to be passed as `data` parameter\nto other requests keywords.\n\nThis allows streaming upload of large files without reading them into memory.\n\nFile descriptor is binary mode and read only. Requests keywords will automatically close the file,\nif used outside this library it\u2019s up to the caller to close it.\n\n#### get_on_session(\\*\\*kwargs)\n\nSends a GET request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to retrieve the resource is the `url`, while query\nstring parameters can be passed as string, dictionary (or list of tuples or bytes)\nthrough the `params`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### get_request(alias, uri, headers=None, data=None, json=None, params=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use GET On Session instead.\n\nSend a GET request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the GET request to\n\n`params` url parameters to append to the uri\n\n`headers` a dictionary of headers to use with the request\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as GET data\n or binary data that is sent as the raw body content\n\n`json` a value that will be json encoded\n: and sent as GET data if data is not specified\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`timeout` connection timeout\n\n#### head_on_session(\\*\\*kwargs)\n\nSends a HEAD request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to retrieve the HTTP headers is the `url`.\n\n`allow_redirects` parameter is not provided, it will be set to False (as\nopposed to the default behavior).\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### head_request(alias, uri, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use HEAD On Session instead.\n\nSend a HEAD request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the HEAD request to\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`headers` a dictionary of headers to use with the request\n\n`timeout` connection timeout\n\n#### http_get(url: str, target_file: Optional[str] = None, verify: Union[bool, str] = True, force_new_session: bool = False, overwrite: bool = False, stream: bool = False, \\*\\*kwargs)\n\nA helper method for `Get Request` that will create a session, perform GET\nrequest, and store the target file, if set by the `target_file` parameter.\n\nThe old session will be used if the URL scheme and the host are the same as\npreviously, e.g., \u2018[https://www.google.fi](https://www.google.fi)\u2019 part of the URL.\n\n```robotframework\n*** Settings ***\nLibrary RPA.HTTP\n\n*** Variables ***\n${DOWNLOAD_PATH}= ${OUTPUT DIR}${/}downloads\n${WORD_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc\n${EXCEL_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file_example_XLS_10.xls\n\n*** Tasks ***\nDownload files with reused session\n # Starts a new session\n HTTP Get ${WORD_EXAMPLE} target_file=${DOWNLOAD_PATH}${/}word-example.doc\n # Uses the previous session\n HTTP Get ${EXCEL_EXAMPLE} target_file=${DOWNLOAD_PATH}${/}excel-example.xls\n```\n\n* **Parameters:**\n * **url** \u2013 target URL for GET request\n * **target_file** \u2013 filepath to save request content, default `None`\n * **verify** \u2013 if SSL verification should be done, default `True`,\n a CA_BUNDLE path can also be provided\n * **force_new_session** \u2013 if new HTTP session should be created,\n default `False`\n * **overwrite** \u2013 used together with `target_file`, if `True` will overwrite\n the target file, default `False`\n * **stream** \u2013 if `False`, the response content will be immediately downloaded\n* **Returns:**\n request response as a dict\n\n#### options_on_session(\\*\\*kwargs)\n\nSends a OPTIONS request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to retrieve the resource is the `url`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### options_request(alias, uri, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use OPTIONS On Session instead.\n\nSend an OPTIONS request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the OPTIONS request to\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`headers` a dictionary of headers to use with the request\n\n`timeout` connection timeout\n\n#### patch_on_session(\\*\\*kwargs)\n\nSends a PATCH request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### patch_request(alias, uri, data=None, json=None, params=None, headers=None, files=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use PATCH On Session instead.\n\nSend a PATCH request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the PATCH request to\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as PATCH data\n or binary data that is sent as the raw body content\n or file descriptor retrieved by Get File For Streaming Upload\n\n`json` a value that will be json encoded\n: and sent as PATCH data if data is not specified\n\n`headers` a dictionary of headers to use with the request\n\n`files` a dictionary of file names containing file data to PATCH to the server\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`params` url parameters to append to the uri\n\n`timeout` connection timeout\n\n#### post_on_session(\\*\\*kwargs)\n\nSends a POST request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### post_request(alias, uri, data=None, json=None, params=None, headers=None, files=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use POST On Session instead.\n\nSend a POST request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the POST request to\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as POST data\n or binary data that is sent as the raw body content\n or passed as such for multipart form data if `files` is also defined\n or file descriptor retrieved by Get File For Streaming Upload\n\n`json` a value that will be json encoded\n: and sent as POST data if files or data is not specified\n\n`params` url parameters to append to the uri\n\n`headers` a dictionary of headers to use with the request\n\n`files` a dictionary of file names containing file data to POST to the server\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`timeout` connection timeout\n\n#### put_on_session(\\*\\*kwargs)\n\nSends a PUT request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### put_request(alias, uri, data=None, json=None, params=None, files=None, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use PUT On Session instead.\n\nSend a PUT request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the PUT request to\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as PUT data\n or binary data that is sent as the raw body content\n or file descriptor retrieved by Get File For Streaming Upload\n\n`json` a value that will be json encoded\n: and sent as PUT data if data is not specified\n\n`headers` a dictionary of headers to use with the request\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`params` url parameters to append to the uri\n\n`timeout` connection timeout\n\n#### request_should_be_successful(response=None)\n\nFails if response status code is a client or server error (4xx, 5xx).\n\n`response` is the output of other requests keywords like GET On Session.\nIf omitted the last response will be used.\n\nIn case of failure an HTTPError will be automatically raised.\n\nFor a more versatile assert keyword see Status Should Be.\n\n#### session_exists(alias)\n\nReturn True if the session has been already created\n\n`alias` that has been used to identify the Session object in the cache\n\n#### session_less_delete(\\*\\*kwargs)\n\nSends a DELETE request.\n\nThe endpoint used to send the request is the `url` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_get(\\*\\*kwargs)\n\nSends a GET request.\n\nThe endpoint used to retrieve the resource is the `url`, while query\nstring parameters can be passed as string, dictionary (or list of tuples or bytes)\nthrough the `params`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs` here is a list:\n\n`data` | Dictionary, list of tuples, bytes, or file-like object to send in the body of the request. |\n
\n`json` | A JSON serializable Python object to send in the body of the request. |\n
\n`headers` | Dictionary of HTTP Headers to send with the request. |\n
\n`cookies` | Dict or CookieJar object to send with the request. |\n
\n`files` | Dictionary of file-like-objects (or `{'name': file-tuple}`) for multipart encoding upload. |\n
\n`file-tuple` | can be a 2-tuple `('filename', fileobj)`, 3-tuple `('filename', fileobj, 'content_type')` or a 4-tuple `('filename', fileobj, 'content_type', custom_headers)`, where `'content-type'` is a string defining the content type of the given file and `custom_headers` a dict-like object containing additional headers to add for the file. |\n
\n`auth` | Auth tuple to enable Basic/Digest/Custom HTTP Auth. |\n
\n`timeout` | How many seconds to wait for the server to send data before giving up, as a float, or a `(connect timeout, read timeout)` tuple. |\n
\n`allow_redirects` | Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to `${True}`. |\n
\n`proxies` | Dictionary mapping protocol or protocol and host to the URL of the proxy (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019}) |\n
\n`verify` | Either a boolean, in which case it controls whether we verify the server\u2019s TLS certificate, or a string, in which case it must be a path to a CA bundle to use. Defaults to `${True}`. Warning: if a session has been created with `verify=${False}` any other requests will not verify the SSL certificate. |\n
\n`stream` | if `${False}`, the response content will be immediately downloaded. |\n
\n`cert` | if String, path to ssl client cert file (.pem). If Tuple, (\u2018cert\u2019, \u2018key\u2019) pair. |\n
\n\nFor more updated and complete information verify the official Requests api documentation:\n[https://requests.readthedocs.io/en/latest/api/](https://requests.readthedocs.io/en/latest/api/)\n\n#### session_less_head(\\*\\*kwargs)\n\nSends a HEAD request.\n\nThe endpoint used to retrieve the HTTP headers is the `url`.\n\n`allow_redirects` parameter is not provided, it will be set to False (as\nopposed to the default behavior).\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_options(\\*\\*kwargs)\n\nSends a OPTIONS request.\n\nThe endpoint used to retrieve the resource is the `url`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_patch(\\*\\*kwargs)\n\nSends a PUT request.\n\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_post(\\*\\*kwargs)\n\nSends a POST request.\n\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_put(\\*\\*kwargs)\n\nSends a PUT request.\n\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### status_should_be(expected_status, response=None, msg=None)\n\nFails if response status code is different than the expected.\n\n`expected_status` could be the code number as an integer or as string.\nBut it could also be a named status code like \u2018ok\u2019, \u2018created\u2019, \u2018accepted\u2019 or\n\u2018bad request\u2019, \u2018not found\u2019 etc.\n\n`response` is the output of other requests keywords like GET or GET On Session.\nIf omitted the last response will be used.\n\nIn case of failure an HTTPError will be automatically raised.\nA custom failure message `msg` can be added like in built-in keywords.\n\nNew requests keywords like GET or GET On Session (starting from 0.8 version) already have an implicit assert\nmechanism that, by default, verifies the response status code.\nStatus Should Be keyword can be useful when you disable implicit assert using `expected_status=anything`.\n\nFor example when you have a nested keyword that is used for both OK and ERROR responses:\n\n**\\* Test Cases \\***\n
\n
\nTest Get Request And Make Sure Is A 404 Response\n
\n${resp}= GET Custom Keyword That Returns OK or ERROR Response case=notfound\n
\nStatus Should Be 404 ${resp}\n
\nShould Be Equal As Strings NOT FOUND ${resp.reason}\n
\n
\nTest Get Request And Make Sure Is OK\n
\n${resp}= GET Custom Keyword That Returns OK or ERROR Response case=pass\n
\nStatus Should Be 200 ${resp}\n
\nShould Be Equal As Strings OK ${resp.reason}\n
\n
\n**\\* Keywords \\***\n
\n
\nGET Custom Keyword That Returns OK or ERROR Response\n
\n[Arguments] $case\n
\n[\u2026]\n
\nIF $case == notfound\n
\n$resp= GET [\u2026] expected_status=Anything\n
\n[Return] $resp\n
\nELSE\n
\n[\u2026]\n
\n\n#### to_json(content, pretty_print=False)\n\n*DEPRECATED* Please use ${resp.json()} instead. Have a look at the improved HTML output as pretty printing replacement.\n\nConvert a string to a JSON object\n\n`content` String content to convert into JSON\n\n`pretty_print` If defined, will output JSON is pretty print format\n\n#### update_session(alias, headers=None, cookies=None)\n\nUpdates HTTP Session Headers and Cookies.\n\nSession will be identified using the `alias` name.\nDictionary of `headers` and `cookies` to be updated and merged into session data.\n" + "markdown": "# Python API\n\n## HTTP\n\n### *class* RPA.HTTP.HTTP(\\*args, \\*\\*kwargs)\n\nThe *RPA.HTTP* library extends functionality of the [RequestsLibrary](https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html).\nSee that documentation for several examples of how to issue `GET`\nrequests and utilize the returned `result` objects.\n\nThis extension provides helper keywords to get an HTTP resource on a\nsession. The `HTTP Get` and `Download` keywords will initiate a\nsession if one does not exist for the provided URL, or use an existing\nsession. When using these keywords, you do not need to manage\nsessions with `Create Session`. Session management is still\nrequired if you use the underlying session keywords, e.g.,\n`* On Session`.\n\n#### DEFAULT_RETRY_METHOD_LIST *= ['OPTIONS', 'TRACE', 'GET', 'HEAD', 'PUT', 'DELETE']*\n\n#### ROBOT_LIBRARY_DOC_FORMAT *= 'reST'*\n\n#### ROBOT_LIBRARY_SCOPE *= 'GLOBAL'*\n\n#### check_vulnerabilities()\n\nCheck for possible vulnerabilities in the installed runtime\nenvironment packages.\n\nCurrently will check only for OpenSSL version and outputs warning message on any\ndiscovered vulnerability.\n\n* **Returns:**\n list of all check results\n\n```robotframework\n*** Tasks ***\nVulnerability Check\n ${results}= Check Vulnerabilities\n FOR ${result} IN @{results}\n Log To Console TYPE: ${result}[type]\n Log To Console VULNERABLE: ${result}[vulnerable]\n Log To Console MESSAGE: ${result}[message]\n END\n```\n\n#### create_client_cert_session(alias, url, headers={}, cookies={}, client_certs=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['OPTIONS', 'TRACE', 'GET', 'HEAD', 'PUT', 'DELETE'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`client_certs` [\u2018client certificate\u2019, \u2018client key\u2019] PEM files containing the client key and certificate\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_custom_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['OPTIONS', 'TRACE', 'GET', 'HEAD', 'PUT', 'DELETE'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` A Custom Authentication object to be passed on to the requests library.\n: [http://docs.python-requests.org/en/master/user/advanced/#custom-authentication](http://docs.python-requests.org/en/master/user/advanced/#custom-authentication)\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_digest_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['OPTIONS', 'TRACE', 'GET', 'HEAD', 'PUT', 'DELETE'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` [\u2018DOMAIN\u2019, \u2018username\u2019, \u2018password\u2019] for NTLM Authentication\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_ntlm_session(alias, url, auth, headers={}, cookies={}, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['OPTIONS', 'TRACE', 'GET', 'HEAD', 'PUT', 'DELETE'])\n\nCreate Session: create a HTTP session to a server\n\n`url` Base url of the server\n\n`alias` Robot Framework alias to identify the session\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` [\u2018DOMAIN\u2019, \u2018username\u2019, \u2018password\u2019] for NTLM Authentication\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n: Defaults to False.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### create_session(alias, url, headers={}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0, max_retries=3, backoff_factor=0.1, disable_warnings=0, retry_status_list=[], retry_method_list=['OPTIONS', 'TRACE', 'GET', 'HEAD', 'PUT', 'DELETE'])\n\nCreate Session: create a HTTP session to a server\n\n`alias` Robot Framework alias to identify the session\n\n`url` Base url of the server\n\n`headers` Dictionary of default headers\n\n`cookies` Dictionary of cookies\n\n`auth` List of username & password for HTTP Basic Auth\n\n`timeout` Connection timeout\n\n`proxies` Dictionary mapping protocol or protocol and host to the URL of the proxy\n: (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019})\n\n`verify` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.\n\n`debug` Enable http verbosity option more information\n: [https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel](https://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.set_debuglevel)\n\n`max_retries` Number of maximum retries each connection should attempt.\n: By default it will retry 3 times in case of connection errors only.\n A 0 value will disable any kind of retries regardless of other retry settings.\n In case the number of retries is reached a retry exception is raised.\n\n`disable_warnings` Disable requests warning useful when you have large number of testcases\n\n`backoff_factor` Introduces a delay time between retries that is longer after each retry.\n: eg. if backoff_factor is set to 0.1\n the sleep between attemps will be: 0.0, 0.2, 0.4\n More info here: [https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html)\n\n`retry_method_list` List of uppercased HTTP method verbs where retries are allowed.\n: By default retries are allowed only on HTTP requests methods that are considered to be\n idempotent (multiple requests with the same parameters end with the same state).\n eg. set to [\u2018POST\u2019, \u2018GET\u2019] to retry only those kind of requests.\n\n`retry_status_list` List of integer HTTP status codes that, if returned, a retry is attempted.\n: eg. set to [502, 503] to retry requests if those status are returned.\n Note that max_retries must be greater than 0.\n\n#### delete_all_sessions()\n\nRemoves all the session objects\n\n#### delete_on_session(\\*\\*kwargs)\n\nSends a DELETE request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### delete_request(alias, uri, data=None, json=None, params=None, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use DELETE On Session instead.\n\nSend a DELETE request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the DELETE request to\n\n`json` a value that will be json encoded\n: and sent as request data if data is not specified\n\n`headers` a dictionary of headers to use with the request\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`timeout` connection timeout\n\n#### download(url: str, target_file: Optional[str] = None, verify: Union[bool, str] = True, force_new_session: bool = False, overwrite: bool = False, stream: bool = False, \\*\\*kwargs)\n\nAn alias for the `HTTP Get` keyword.\n\nThe difference in use is that the URL is always downloaded based on\nthe URL path (even without `target_file`). If there is a filename\nin the path, then that is used as `target_file` to save to. By default,\nthe filename will be \u201cdownloaded.html\u201d.\n\n```robotframework\n*** Settings ***\nLibrary RPA.HTTP\n\n*** Variables ***\n${DOWNLOAD_PATH}= ${OUTPUT DIR}${/}downloads\n${WORD_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc\n${EXCEL_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file_example_XLS_10.xls\n\n*** Tasks ***\nDownload files with reused session with provided file names\n # Starts a new session\n Download ${WORD_EXAMPLE} target_file=${DOWNLOAD_PATH}\n # Uses the previous session\n Download ${EXCEL_EXAMPLE} target_file=${DOWNLOAD_PATH}\n # Above files are downloaded using the same names as they have\n # on the remote server.\n```\n\n* **Parameters:**\n * **url** \u2013 target URL for GET request\n * **target_file** \u2013 filepath to save request content, default `None`\n * **verify** \u2013 if SSL verification should be done, default `True`,\n a CA_BUNDLE path can also be provided\n * **force_new_session** \u2013 if new HTTP session should be created,\n default `False`\n * **overwrite** \u2013 used together with `target_file`, if `True` will overwrite\n the target file, default `False`\n * **stream** \u2013 if `False` the response content will be immediately downloaded\n* **Returns:**\n request response as a dict\n\n#### get_current_session_alias()\n\nGet request session alias that was used with the `HTTP Get` keyword.\n\n* **Returns:**\n name of session alias as a string\n\n#### *static* get_file_for_streaming_upload(path)\n\nOpens and returns a file descriptor of a specified file to be passed as `data` parameter\nto other requests keywords.\n\nThis allows streaming upload of large files without reading them into memory.\n\nFile descriptor is binary mode and read only. Requests keywords will automatically close the file,\nif used outside this library it\u2019s up to the caller to close it.\n\n#### get_on_session(\\*\\*kwargs)\n\nSends a GET request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to retrieve the resource is the `url`, while query\nstring parameters can be passed as string, dictionary (or list of tuples or bytes)\nthrough the `params`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### get_request(alias, uri, headers=None, data=None, json=None, params=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use GET On Session instead.\n\nSend a GET request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the GET request to\n\n`params` url parameters to append to the uri\n\n`headers` a dictionary of headers to use with the request\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as GET data\n or binary data that is sent as the raw body content\n\n`json` a value that will be json encoded\n: and sent as GET data if data is not specified\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`timeout` connection timeout\n\n#### head_on_session(\\*\\*kwargs)\n\nSends a HEAD request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to retrieve the HTTP headers is the `url`.\n\n`allow_redirects` parameter is not provided, it will be set to False (as\nopposed to the default behavior).\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### head_request(alias, uri, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use HEAD On Session instead.\n\nSend a HEAD request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the HEAD request to\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`headers` a dictionary of headers to use with the request\n\n`timeout` connection timeout\n\n#### http_get(url: str, target_file: Optional[str] = None, verify: Union[bool, str] = True, force_new_session: bool = False, overwrite: bool = False, stream: bool = False, \\*\\*kwargs)\n\nA helper method for `Get Request` that will create a session, perform GET\nrequest, and store the target file, if set by the `target_file` parameter.\n\nThe old session will be used if the URL scheme and the host are the same as\npreviously, e.g., \u2018[https://www.google.fi](https://www.google.fi)\u2019 part of the URL.\n\n```robotframework\n*** Settings ***\nLibrary RPA.HTTP\n\n*** Variables ***\n${DOWNLOAD_PATH}= ${OUTPUT DIR}${/}downloads\n${WORD_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc\n${EXCEL_EXAMPLE}= https://file-examples.com/wp-content/uploads/2017/02/file_example_XLS_10.xls\n\n*** Tasks ***\nDownload files with reused session\n # Starts a new session\n HTTP Get ${WORD_EXAMPLE} target_file=${DOWNLOAD_PATH}${/}word-example.doc\n # Uses the previous session\n HTTP Get ${EXCEL_EXAMPLE} target_file=${DOWNLOAD_PATH}${/}excel-example.xls\n```\n\n* **Parameters:**\n * **url** \u2013 target URL for GET request\n * **target_file** \u2013 filepath to save request content, default `None`\n * **verify** \u2013 if SSL verification should be done, default `True`,\n a CA_BUNDLE path can also be provided\n * **force_new_session** \u2013 if new HTTP session should be created,\n default `False`\n * **overwrite** \u2013 used together with `target_file`, if `True` will overwrite\n the target file, default `False`\n * **stream** \u2013 if `False`, the response content will be immediately downloaded\n* **Returns:**\n request response as a dict\n\n#### options_on_session(\\*\\*kwargs)\n\nSends a OPTIONS request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to retrieve the resource is the `url`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### options_request(alias, uri, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use OPTIONS On Session instead.\n\nSend an OPTIONS request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the OPTIONS request to\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`headers` a dictionary of headers to use with the request\n\n`timeout` connection timeout\n\n#### patch_on_session(\\*\\*kwargs)\n\nSends a PATCH request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### patch_request(alias, uri, data=None, json=None, params=None, headers=None, files=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use PATCH On Session instead.\n\nSend a PATCH request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the PATCH request to\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as PATCH data\n or binary data that is sent as the raw body content\n or file descriptor retrieved by Get File For Streaming Upload\n\n`json` a value that will be json encoded\n: and sent as PATCH data if data is not specified\n\n`headers` a dictionary of headers to use with the request\n\n`files` a dictionary of file names containing file data to PATCH to the server\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`params` url parameters to append to the uri\n\n`timeout` connection timeout\n\n#### post_on_session(\\*\\*kwargs)\n\nSends a POST request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### post_request(alias, uri, data=None, json=None, params=None, headers=None, files=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use POST On Session instead.\n\nSend a POST request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the POST request to\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as POST data\n or binary data that is sent as the raw body content\n or passed as such for multipart form data if `files` is also defined\n or file descriptor retrieved by Get File For Streaming Upload\n\n`json` a value that will be json encoded\n: and sent as POST data if files or data is not specified\n\n`params` url parameters to append to the uri\n\n`headers` a dictionary of headers to use with the request\n\n`files` a dictionary of file names containing file data to POST to the server\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`timeout` connection timeout\n\n#### put_on_session(\\*\\*kwargs)\n\nSends a PUT request on a previously created HTTP Session.\n\nSession will be identified using the `alias` name.\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### put_request(alias, uri, data=None, json=None, params=None, files=None, headers=None, allow_redirects=None, timeout=None)\n\n*DEPRECATED* Please use PUT On Session instead.\n\nSend a PUT request on the session object found using the\ngiven alias\n\n`alias` that will be used to identify the Session object in the cache\n\n`uri` to send the PUT request to\n\n`data` a dictionary of key-value pairs that will be urlencoded\n: and sent as PUT data\n or binary data that is sent as the raw body content\n or file descriptor retrieved by Get File For Streaming Upload\n\n`json` a value that will be json encoded\n: and sent as PUT data if data is not specified\n\n`headers` a dictionary of headers to use with the request\n\n`allow_redirects` Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.\n\n`params` url parameters to append to the uri\n\n`timeout` connection timeout\n\n#### request_should_be_successful(response=None)\n\nFails if response status code is a client or server error (4xx, 5xx).\n\n`response` is the output of other requests keywords like GET On Session.\nIf omitted the last response will be used.\n\nIn case of failure an HTTPError will be automatically raised.\n\nFor a more versatile assert keyword see Status Should Be.\n\n#### session_exists(alias)\n\nReturn True if the session has been already created\n\n`alias` that has been used to identify the Session object in the cache\n\n#### session_less_delete(\\*\\*kwargs)\n\nSends a DELETE request.\n\nThe endpoint used to send the request is the `url` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_get(\\*\\*kwargs)\n\nSends a GET request.\n\nThe endpoint used to retrieve the resource is the `url`, while query\nstring parameters can be passed as string, dictionary (or list of tuples or bytes)\nthrough the `params`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs` here is a list:\n\n`data` | Dictionary, list of tuples, bytes, or file-like object to send in the body of the request. |\n
\n`json` | A JSON serializable Python object to send in the body of the request. |\n
\n`headers` | Dictionary of HTTP Headers to send with the request. |\n
\n`cookies` | Dict or CookieJar object to send with the request. |\n
\n`files` | Dictionary of file-like-objects (or `{'name': file-tuple}`) for multipart encoding upload. |\n
\n`file-tuple` | can be a 2-tuple `('filename', fileobj)`, 3-tuple `('filename', fileobj, 'content_type')` or a 4-tuple `('filename', fileobj, 'content_type', custom_headers)`, where `'content-type'` is a string defining the content type of the given file and `custom_headers` a dict-like object containing additional headers to add for the file. |\n
\n`auth` | Auth tuple to enable Basic/Digest/Custom HTTP Auth. |\n
\n`timeout` | How many seconds to wait for the server to send data before giving up, as a float, or a `(connect timeout, read timeout)` tuple. |\n
\n`allow_redirects` | Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to `${True}`. |\n
\n`proxies` | Dictionary mapping protocol or protocol and host to the URL of the proxy (e.g. {\u2018http\u2019: \u2018foo.bar:3128\u2019, \u2018http://host.name\u2019: \u2018foo.bar:4012\u2019}) |\n
\n`verify` | Either a boolean, in which case it controls whether we verify the server\u2019s TLS certificate, or a string, in which case it must be a path to a CA bundle to use. Defaults to `${True}`. Warning: if a session has been created with `verify=${False}` any other requests will not verify the SSL certificate. |\n
\n`stream` | if `${False}`, the response content will be immediately downloaded. |\n
\n`cert` | if String, path to ssl client cert file (.pem). If Tuple, (\u2018cert\u2019, \u2018key\u2019) pair. |\n
\n\nFor more updated and complete information verify the official Requests api documentation:\n[https://requests.readthedocs.io/en/latest/api/](https://requests.readthedocs.io/en/latest/api/)\n\n#### session_less_head(\\*\\*kwargs)\n\nSends a HEAD request.\n\nThe endpoint used to retrieve the HTTP headers is the `url`.\n\n`allow_redirects` parameter is not provided, it will be set to False (as\nopposed to the default behavior).\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_options(\\*\\*kwargs)\n\nSends a OPTIONS request.\n\nThe endpoint used to retrieve the resource is the `url`.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_patch(\\*\\*kwargs)\n\nSends a PUT request.\n\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_post(\\*\\*kwargs)\n\nSends a POST request.\n\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### session_less_put(\\*\\*kwargs)\n\nSends a PUT request.\n\nThe endpoint used to send the request is the `url` parameter, while its body\ncan be passed using `data` or `json` parameters.\n\n`data` can be a dictionary, list of tuples, bytes, or file-like object.\nIf you want to pass a json body pass a dictionary as `json` parameter.\n\nBy default this keyword fails if a status code with error values is returned in the response,\nthis behavior can be modified using the `expected_status` and `msg` parameters,\nread more about it in Status Should Be keyword documentation.\nIn order to disable this implicit assert mechanism you can pass as `expected_status` the values `any` or\n`anything`.\n\nOther optional requests arguments can be passed using `**kwargs`\nsee the GET keyword for the complete list.\n\n#### status_should_be(expected_status, response=None, msg=None)\n\nFails if response status code is different than the expected.\n\n`expected_status` could be the code number as an integer or as string.\nBut it could also be a named status code like \u2018ok\u2019, \u2018created\u2019, \u2018accepted\u2019 or\n\u2018bad request\u2019, \u2018not found\u2019 etc.\n\n`response` is the output of other requests keywords like GET or GET On Session.\nIf omitted the last response will be used.\n\nIn case of failure an HTTPError will be automatically raised.\nA custom failure message `msg` can be added like in built-in keywords.\n\nNew requests keywords like GET or GET On Session (starting from 0.8 version) already have an implicit assert\nmechanism that, by default, verifies the response status code.\nStatus Should Be keyword can be useful when you disable implicit assert using `expected_status=anything`.\n\nFor example when you have a nested keyword that is used for both OK and ERROR responses:\n\n**\\* Test Cases \\***\n
\n
\nTest Get Request And Make Sure Is A 404 Response\n
\n${resp}= GET Custom Keyword That Returns OK or ERROR Response case=notfound\n
\nStatus Should Be 404 ${resp}\n
\nShould Be Equal As Strings NOT FOUND ${resp.reason}\n
\n
\nTest Get Request And Make Sure Is OK\n
\n${resp}= GET Custom Keyword That Returns OK or ERROR Response case=pass\n
\nStatus Should Be 200 ${resp}\n
\nShould Be Equal As Strings OK ${resp.reason}\n
\n
\n**\\* Keywords \\***\n
\n
\nGET Custom Keyword That Returns OK or ERROR Response\n
\n[Arguments] $case\n
\n[\u2026]\n
\nIF $case == notfound\n
\n$resp= GET [\u2026] expected_status=Anything\n
\n[Return] $resp\n
\nELSE\n
\n[\u2026]\n
\n\n#### to_json(content, pretty_print=False)\n\n*DEPRECATED* Please use ${resp.json()} instead. Have a look at the improved HTML output as pretty printing replacement.\n\nConvert a string to a JSON object\n\n`content` String content to convert into JSON\n\n`pretty_print` If defined, will output JSON is pretty print format\n\n#### update_session(alias, headers=None, cookies=None)\n\nUpdates HTTP Session Headers and Cookies.\n\nSession will be identified using the `alias` name.\nDictionary of `headers` and `cookies` to be updated and merged into session data.\n" }, { "module": "RPA.Hubspot.Hubspot", diff --git a/releasenotes.html b/releasenotes.html index ef2901bb2b..422febe4e6 100644 --- a/releasenotes.html +++ b/releasenotes.html @@ -194,6 +194,7 @@

03 Apr 2024rpaframework-hubspot 1.0.1

  • package rpaframework-openai 1.3.2

  • package rpaframework-pdf 7.3.2

  • +
  • package rpaframework-recognition 5.2.4

  • package rpaframework-windows 7.5.1