Robot Framework allows you to create custom keywords that return values.
- [Bryan] In the level one course,…when we were testing things, we pretty much, were…passing information into keywords,…and then relying on some kind of assertion to know…whether the test case passed or failed.…There are times when you'd like for your scripts…to be a little more sophisticated than that.…And, what that means is, a given keyword can call…another keyword to do some work, and then have that…keyword pass information back to the original keyword…that made the call, and that top-level keyword…can make a decision about whether that was a good or bad…thing, and then make an assertion from there.…
So, the way we can return values from keywords,…is simply to declare a local variable,…and assign it's value to a keyword which contains…a return statement.…Then, in that keyword, add another line…with square brackets, and the word return,…and then pass back anything you'd like to return.…And, that could be a string, or an integer,…or even multiple values if the variable you're assigning…is a list.…So, let's take a peek at how to do that.…
Author
Released
12/10/2018- Advanced command-line options
- Forcing and randomizing test execution order
- Making decisions with automatic variables
- Using keywords to return values
- Updating Python and PIP
- Updating your libraries, browsers, and web drivers
- Testing specific elements with web locators
- Conditionals and loops
- Dictionaries
- Data-driven testing
- Testing a multisite from end to end with Robot Framework
Skill Level Intermediate
Duration
Views
Related Courses
-
Java: Testing with JUnit
with Peggy Fisher1h 10m Intermediate -
F#: Automated Testing for Developers
with Kit Eason2h 33m Intermediate -
Effective Android Testing for Mobile Developers
with Chiu-Ki Chan2h 56m Intermediate -
Python Automation and Testing
with Bhoomika Agarwal1h 16m Intermediate -
Robot Framework Test Automation: Level 1 (Selenium)
with Bryan Lamb6h 23m Intermediate
-
Welcome
-
About me43s
-
-
1. Quickly Turbocharge Your Level 1 Skills
-
PyCharm Find Usages feature1m 14s
-
PyCharm TODO feature2m 56s
-
Force test execution order2m 29s
-
Get more detailed logs5m 25s
-
Automatic variables1m 56s
-
Return values from keywords2m 53s
-
2. Keeping Your Tools Up to Date
-
Tools overview1m 56s
-
Updating Python and PIP1m 40s
-
Examine library versions1m 33s
-
Updating your IDE and plugin5m 32s
-
-
3. Web Locators: Preconditions
-
HTML tags7m 22s
-
HTML attributes3m 5s
-
CSS3m 37s
-
Bootstrap8m 59s
-
Summary3m 9s
-
4. Web Locators: Fundamentals
-
Locator selection tool2m 24s
-
Install the tools3m 2s
-
-
5. Web Locators: Advanced
-
Basic XPath and CSS syntax11m 24s
-
Partial locators: ends-with2m 10s
-
6. Script Control Flow
-
IF/ELSE: Making decisions4m 59s
-
Loops12m 54s
-
7. Advanced Data Management
-
Dictionary overview3m 39s
-
-
8. Data-Driven Tests: Overview
-
Overview and demo6m 13s
-
Tour the starter project7m 59s
-
-
9. Data-Driven Tests: Built-In Method
-
Built-in capabilities11m 53s
-
-
10. Data-Driven Tests: CSV (Excel)
-
Overview of the steps1m 59s
-
Create the CSV data file2m 45s
-
Custom CSV parsing library4m 15s
-
Create our data manager3m 3s
-
Call the data manager3m 26s
-
Refactor data entry steps1m 47s
-
Run and debug5m 2s
-
-
11. Multi-App End-to-End Scenario
-
Scenario overview1m 3s
-
Refactor with directories4m 59s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Return values from keywords