You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added GlossaryTerm components to chapter-05 overview, advanced variables, and control structures
- No section renumbering or LO changes
- Glossary linker correctly skips learning_objectives.md
Copy file name to clipboardExpand all lines: website/docs/chapter-05/00_overview.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,4 @@
3
3
This chapter introduces more advanced constructs of Robot Framework.
4
4
These topics are often not needed for simple automation cases but can be very useful in more complex situations.
5
5
Although it is not expected that Robot Framework Certified Professionals will be able to use them, it is important to be aware of the possibilities and to understand the basic concepts.
Copy file name to clipboardExpand all lines: website/docs/chapter-05/01_advanced_variables.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,11 +305,11 @@ As long as a value is iterable, it can be assigned to a list variable using the
305
305
306
306
**Note**: Strings are iterable in Python; however, they are explicitly **NOT** converted to a list when assigned to a list variable to prevent mistakes.
307
307
308
-
### 5.1.3.1 Accessing List Variables
308
+
### 5.1.4.2 Accessing List Variables
309
309
310
310
::::lo[Learning Objectives]
311
311
312
-
:::K1[LO-5.1.3.1]
312
+
:::K1[LO-5.1.4.2]
313
313
314
314
Recall that `@{list}` unpacks the values of a list variable when accessed
315
315
@@ -343,17 +343,17 @@ This is particularly needed when using FOR-Loops. See [5.2.4 FOR Loops](chapter-
343
343
344
344
345
345
346
-
## 5.1.4 Dict-Like
346
+
## 5.1.5 Dict-Like
347
347
348
348
As explained in the `*** Variables ***` section under [3.2.2.4 Dictionary Variable Definition](chapter-03/02_variables.md#3224-dictionary-variable-definition), Robot Framework natively supports creating dictionaries.
349
349
However, the ampersand-syntax `&{var}` has different meanings when assigning values and when accessing values.
350
350
351
351
352
-
### 5.1.4.1 Assigning Dictionary Variables
352
+
### 5.1.5.1 Assigning Dictionary Variables
353
353
354
354
::::lo[Learning Objectives]
355
355
356
-
:::K1[LO-5.1.4.1]
356
+
:::K1[LO-5.1.5.1]
357
357
358
358
Recall that assignments to `&{dict}` variables automatically convert values to Robot Framework Dictionaries and enable dot-access
359
359
@@ -375,11 +375,11 @@ Test Dictionary Variables
375
375
In the following example, the first assignment to `&{participant}` causes an automatic conversion to a Robot Framework Dictionary, also known as DotDict. These special dictionary types can be accessed using dot-access like `${participant.name}` or `${participant.age}`, instead of the usual dictionary access like `${trainer}[name]` or `${trainer}[age]`.
376
376
377
377
378
-
### 5.1.4.2 Accessing Dictionary Variables
378
+
### 5.1.5.2 Accessing Dictionary Variables
379
379
380
380
::::lo[Learning Objectives]
381
381
382
-
:::K1[LO-5.1.4.2]
382
+
:::K1[LO-5.1.5.2]
383
383
384
384
Recall that `&{dict}` unpacks to multiple key=value pairs when accessed
385
385
@@ -417,11 +417,11 @@ The dictionary keys act as the argument names and the values as the argument val
417
417
418
418
419
419
420
-
## 5.1.5 Built-In Variables
420
+
## 5.1.6 Built-In Variables
421
421
422
422
::::lo[Learning Objectives]
423
423
424
-
:::K1[LO-5.1.5]
424
+
:::K1[LO-5.1.6]
425
425
426
426
Recall that Robot Framework provides access to execution information via Built-In variables
Copy file name to clipboardExpand all lines: website/docs/chapter-05/02_control_structures.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ import GlossaryTerm from '@site/src/components/Glossary/GlossaryTerm';
4
4
# 5.2 Control Structures
5
5
6
6
Robot Framework is a Turing-complete language and supports all common <GlossaryTerm term={"Control Structure"}>control structures</GlossaryTerm>, including IF-Statements, FOR-Loops, WHILE-Loops and more.
7
-
While it is not expected that RFCPs can write complex control structures, they should understand their purpose.
7
+
While it is not expected that RFCPs can write complex <GlossaryTerm term={"Control Structure"}>control structures</GlossaryTerm>, they should understand their purpose.
8
8
9
9
In some cases, it is necessary to use control structures to handle different cases, iterate over a list of values, or execute an action until a condition is met.
10
10
@@ -24,9 +24,9 @@ Understand the purpose and basic concept of IF-Statements
24
24
The `IF` / `ELSE IF` / `ELSE` syntax in Robot Framework is used to control the flow of <GlossaryTerm term={"Test Case"}>test</GlossaryTerm>|<GlossaryTerm term={"Task"}>task</GlossaryTerm> execution by allowing certain <GlossaryTerm term={"Keyword"}>keywords</GlossaryTerm> to run only when specific conditions are met.
25
25
This is achieved by evaluating conditions written as Python expressions, enabling dynamic decision-making within your tests|<GlossaryTerm term={"Task"}>tasks</GlossaryTerm>.
26
26
27
-
The `IF` statement begins with the `IF` token and ends with an `END`, enclosing the keywords executed when the condition is true.
27
+
The `IF` statement begins with the `IF` token and ends with an `END`, enclosing the <GlossaryTerm term={"Keyword"}>keywords</GlossaryTerm> executed when the condition is true.
28
28
An optional `ELSE` or `ELSE IF` can specify alternative actions when the initial condition is false.
29
-
This structure enhances the flexibility and responsiveness of your tests|tasks, allowing them to adapt based on <GlossaryTerm term={"Variable"}>variables</GlossaryTerm> and outcomes encountered during execution.
29
+
This structure enhances the flexibility and responsiveness of your tests|<GlossaryTerm term={"Task"}>tasks</GlossaryTerm>, allowing them to adapt based on <GlossaryTerm term={"Variable"}>variables</GlossaryTerm> and outcomes encountered during execution.
30
30
31
31
32
32
### 5.2.1.1 Basic IF Syntax
@@ -90,9 +90,9 @@ Quick Check
90
90
IF $user == 'Admin' Log Admin access granted.
91
91
```
92
92
93
-
Executes the `Log` keyword if `${user}` equals to the string `'Admin'`.
93
+
Executes the `Log`<GlossaryTerm term={"Keyword"}>keyword</GlossaryTerm> if `${user}` equals to the string `'Admin'`.
94
94
95
-
No `END` is needed for inline IF.
95
+
No `END` is needed for <GlossaryTerm term={"Inline IF"}>inline IF</GlossaryTerm>.
96
96
97
97
## 5.2.4 FOR Loops
98
98
@@ -117,7 +117,7 @@ The other types are `FOR-IN-RANGE`, `FOR-IN-ENUMERATE`, and `FOR-IN-ZIP`, which
117
117
-`FOR-IN-ENUMERATE` iterates over a list of values and their indexes.
118
118
-`FOR-IN-ZIP` iterates over multiple lists simultaneously.
119
119
120
-
The `FOR` loop begins with the `FOR` token, followed by a loop <GlossaryTerm term={"Variable"}>variable</GlossaryTerm>, the `IN` token, and the iterable variable or list of values.
120
+
The `FOR` loop begins with the `FOR` token, followed by a loop <GlossaryTerm term={"Variable"}>variable</GlossaryTerm>, the `IN` token, and the iterable <GlossaryTerm term={"Variable"}>variable</GlossaryTerm> or list of values.
121
121
The loop variable takes on each value in the sequence one at a time, executing the enclosed keywords for each value.
122
122
123
123
@@ -216,7 +216,7 @@ Scroll Down Until Element Visible
216
216
```
217
217
218
218
`WHILE` loops have a configurable iteration limit in Robot Framework.
219
-
When the maximum number of iterations is reached, the loop exits with a failure, causing the test|task or keyword to fail.
219
+
When the maximum number of iterations is reached, the loop exits with a failure, causing the <GlossaryTerm term={"Test Case"}>test</GlossaryTerm>|<GlossaryTerm term={"Task"}>task</GlossaryTerm> or keyword to fail.
220
220
This prevents infinite loops and ensures that tests|tasks do not hang indefinitely.
0 commit comments