robocorp.com Open in urlscan Pro
2606:4700:10::ac43:799  Public Scan

Submitted URL: https://d152q-04.na1.hubspotlinks.com/Ctc/V+113/d152Q-04/VWV8dJ4bSsY7VMtLD329YxnHW7Wb0M159y4lkN2L_pzT3qn9gW7Y8-PT6lZ3pwN5mLVzqFR2Q2W8s...
Effective URL: https://robocorp.com/docs-robot-framework/switch?utm_campaign=Newsletter&utm_medium=email&_hsmi=294260393&_hsenc=p2AN...
Submission: On February 15 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

/

DocumentationPortalAPI ReMark πŸ’¬βœ¨Control Room


Get started

Quickstart
Understanding the Robot Structure
Courses
Glossary
Switching from Robot Framework to Python

Build

Robot Framework libraries
Python framework
Development guide
Gen1 Bot Conversion

Products

Control Room
Developer tools

Automation Toolchain

RCC
Automation libraries
Languages & Frameworks
Security
Troubleshooting
FAQ
Releases / Changelog
Note: You are looking at a static snapshot of documentation related to Robot
Framework automations. The most recent documentation is at
https://robocorp.com/docs


SWITCHING FROM ROBOT FRAMEWORK TO PYTHON

This page outlines the tasks to follow when switching from Robot Framework to
Python in writing your automations, as well as tips and links to relevant
resources. If you are at all familiar with Python, the change is simple!

 * Complete the Python automation certification courses to gain an overview of
   the platform.
 * Update to the latest version of the Robocorp Code extension, and familiarise
   yourself with the new browser and Windows inspector tooling. Start e.g. with
   the videos on Browser Inspector and Windows Inspector.
 * Adopt the Python project templates instead of Robot Framework templates.
 * The project structure remains unchanged, just that instead of .robot files,
   you'll only have .py files.
 * There are no changes in Control Room, or in how you are managing your
   automation workflows or their outputs.

Here are some pointers for the biggest differences:

πŸ‘‰ When configuring tasks in robot.yaml the tasks commands are slightly
different but simpler. For example this would run all tasks from tasks.py file:

tasks:
Run all my tasks:
shell: python -m robocorp.tasks run tasks.py

πŸ‘‰ Add robocorp library to the dependencies in conda.yaml to leverage all the
functionality of our platform in Python. For example, this will bring the loved
Task logging to Python automations.

πŸ‘‰ Inside your Python file use @task -decorator to declare your tasks. This also
adds the logging so you'll get a comprehensive log.html report, just like in
Robot Framework. So for everything you had under *** Tasks *** in your Robot
Framework bots, you'll need a @task in Python. Control Room treats these two
things alike, so no changes are needed on that side.

πŸ‘‰ For those accustomed to the keyword syntax of Robot Framework, we have good
news! They all work the same way, just with a bit of changes in the names. All
the keywords of RPA Framework libraries work the same way, just with this small
difference: If you had Read Worksheet As Table before, in Python it will be
read_worksheet_as_table. For defining custom keywords the same logic applies!
Instead of under *** Keywords *** creating a keyword Fill and submit the form,
you now just create Python method for example like this: def
fill_and_submit_form(row):.

πŸ‘‰ The basic control structures and variable references of Robot Framework are
all available in Python, and should not be a problem for anyone with a little
bit of background in Python. In all fairness, getting the string conditiionals
right with Python is so much easier than it used to be! 😎

πŸ‘‰ For the core functionality of Robocorp platform (Vault, Asset Storage, Work
Items), we've introduced Python-only libraries under robocorp namespace. We
recommend using them, as the developer experience in Python is much smoother!
Check out the example bots in Portal for reference.

πŸ‘‰ Check the recommendations for automation library usage and the library
mappings table below on which libraries to use for your use cases. We keep on
updating the table, so refer back often.

πŸ‘‰ Use ReMark to help! Remember to describe your desired outputs in detail, and
give small enough snippets to ocnvert at once.


DEVELOPMENT RECOMMENDATION

The following table lists all current RPA Framework and commonly used Robot
Framework capabilities and our current recommendation on what to use for
building new automation workflows on Python.

Follow this general practice, and look at the details from the table below:

 * Robot Framework libraries are largely obsolete, as their functionality is
   covered by Python language's basic structures or very commonly used libraries
   like DateTime and os.
 * RPA Framework libraries dealing with Robocorp platform are replaced by
   equivalent libs in the robocorp namespace.
 * RPA Framework libraries that have been thin wrappers for a Python package
   will be deprecated over time. These deprecations will be notified separately
   at a later stage. Look for the table, and adopt the equivalent Python package
   at your convenience.
 * For any browser automation, we recommend starting to use robocorp.browser
   instead of RPA.Browser.Selenium or RPA.Browser.Playwright. We realise the
   effort required to migrate old Selenium automations to the new way – thus, we
   will keep supporting the old library in Python for now.
 * Windows automation is now best done with the new robocorp.windows. We
   recommend using it instead of RPA.Windows.
 * For all the rest, keep on using RPA Framework in Python.


LIBRARY MAPPINGS

SourceLibrary todayWhat to useNotesRobot FrameworkBuiltInPython default
syntaxContains Robot Framework's basic control structures, type conversions
etcRobot FrameworkStringPython default syntaxLibrary for manipulating strings
and verifying their contents.Robot FrameworkCollectionsPython default
syntaxContains keywords for handling lists and dictionaries.Robot
FrameworkDateTimeBuilt-in datetime or pendulumCreating and verifying date and
time values as well as calculations between themRobot
FrameworkOperatingSystemBuilt-in os and/or psutilEnables performing various
operating system-related tasks.RPA
FrameworkRPA.Robocorp.WorkItemsrobocorp-workitemsRPA
FrameworkRPA.Robocorp.Vaultrobocorp-vaultRPA
FrameworkRPA.Robocorp.Storagerobocorp-storageRPA
FrameworkRPA.Robocorp.ProcessContinue using in PythonNOTE: robocorp-controlroom
library will be added later.RPA
FrameworkRPA.Browser.Playwrightrobocorp-browserWrapper for Playwright with
quality of life improvements. Refer to Playwright docs for details of usage.RPA
FrameworkRPA.Windowsrobocorp-windowsRPA FrameworkRPA.Browser.SeleniumContinue
using in PythonSelenium library is one of the most used RPAFW libs. While we
recommend using robocorp.browser for new automations, support for this library
continues.RPA FrameworkRPA.JSONBuilt-in jsonRPA FrameworkRPA.HTTPrequestsRPA
FrameworkRPA.Tablespandas, numpyHandling tabular data.RPA
FrameworkRPA.FileSystemPython default syntaxRPA
FrameworkRPA.Desktop.OperatingSystemBuilt-in os and/or psutilRPA
FrameworkRPA.DatabaseContinue using, or choose a Database specific Python
libraryRPA FrameworkRPA.Cloud.AWSboto3Amazon AWS Python SDKRPA
FrameworkRPA.Cloud.GoogleGoogle Python Client LibrariesAll Google Cloud Python
libraries.RPA FrameworkRPA.Cloud.AzureAzure Python librariesMicrosoft Azure
Python libraries.RPA FrameworkRPA.NotifiernotifiersRPA
FrameworkRPA.Salesforcesimple-salesforceRPA FrameworkRPA.FTPBuilt-in ftplibRPA
FrameworkRPA.Archivezipfile / tarfileRPA FrameworkRPA.Calendarpendulum or
holidaysRPA FrameworkRPA.DocumentAI.*Use provider's own Python clientRPA
FrameworkRPA.SAPContinue using in Python, or migrate to SapGuiLibraryRPA
FrameworkRPA.Slackslack-sdkRPA FrameworkRPA.CryptocryptographyRPA
FrameworkRPA.MSGraphO365RPA FrameworkRPA.ImagespillowRPA
FrameworkRPA.NetsuitenetsuitesdkRPA FrameworkRPA.OpenAIopenaiRPA
FrameworkRPA.Smartsheetsmartsheet-python-sdkRPA
FrameworkRPA.Hubspothubspot-api-clientRPA FrameworkRPA.TwittertweepyRPA
FrameworkRPA.Excel.FilesContinue using in PythonRPA FrameworkRPA.MFAContinue
using in PythonRPA FrameworkRPA.PDFContinue using in PythonRPA
FrameworkRPA.Email.ExchangeContinue using in PythonRPA
FrameworkRPA.DesktopContinue using in PythonRPA
FrameworkRPA.Email.ImapSmtpContinue using in PythonRPA
FrameworkRPA.JavaAccessBridgeContinue using in PythonRPA
FrameworkRPA.AssistantContinue using in PythonRPA
FrameworkRPA.Outlook.ApplicationContinue using in PythonRPA
FrameworkRPA.Excel.ApplicationContinue using in PythonRPA
FrameworkRPA.Word.ApplicationContinue using in Python

Last edit: February 13, 2024

Follow us

Github Twitter Linkedin Youtube

Products

Products overviewControl RoomDeveloper tools

Resources

BlogCase StudiesWebinarsPublications

Company

About UsPartnersCareersContact Us
©️ 2024 Robocorp
Privacy Β· Terms