Skip to content

Commit 9186c8c

Browse files
author
solomon.legodi
committed
Add glossary links to Chapter 5 files
- 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
1 parent c973203 commit 9186c8c

3 files changed

Lines changed: 18 additions & 16 deletions

File tree

website/docs/chapter-05/00_overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
This chapter introduces more advanced constructs of Robot Framework.
44
These topics are often not needed for simple automation cases but can be very useful in more complex situations.
55
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.
6+

website/docs/chapter-05/01_advanced_variables.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ As long as a value is iterable, it can be assigned to a list variable using the
305305

306306
**Note**: Strings are iterable in Python; however, they are explicitly **NOT** converted to a list when assigned to a list variable to prevent mistakes.
307307

308-
### 5.1.3.1 Accessing List Variables
308+
### 5.1.4.2 Accessing List Variables
309309

310310
::::lo[Learning Objectives]
311311

312-
:::K1[LO-5.1.3.1]
312+
:::K1[LO-5.1.4.2]
313313

314314
Recall that `@{list}` unpacks the values of a list variable when accessed
315315

@@ -343,17 +343,17 @@ This is particularly needed when using FOR-Loops. See [5.2.4 FOR Loops](chapter-
343343

344344

345345

346-
## 5.1.4 Dict-Like
346+
## 5.1.5 Dict-Like
347347

348348
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.
349349
However, the ampersand-syntax `&{var}` has different meanings when assigning values and when accessing values.
350350

351351

352-
### 5.1.4.1 Assigning Dictionary Variables
352+
### 5.1.5.1 Assigning Dictionary Variables
353353

354354
::::lo[Learning Objectives]
355355

356-
:::K1[LO-5.1.4.1]
356+
:::K1[LO-5.1.5.1]
357357

358358
Recall that assignments to `&{dict}` variables automatically convert values to Robot Framework Dictionaries and enable dot-access
359359

@@ -375,11 +375,11 @@ Test Dictionary Variables
375375
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]`.
376376

377377

378-
### 5.1.4.2 Accessing Dictionary Variables
378+
### 5.1.5.2 Accessing Dictionary Variables
379379

380380
::::lo[Learning Objectives]
381381

382-
:::K1[LO-5.1.4.2]
382+
:::K1[LO-5.1.5.2]
383383

384384
Recall that `&{dict}` unpacks to multiple key=value pairs when accessed
385385

@@ -417,11 +417,11 @@ The dictionary keys act as the argument names and the values as the argument val
417417

418418

419419

420-
## 5.1.5 Built-In Variables
420+
## 5.1.6 Built-In Variables
421421

422422
::::lo[Learning Objectives]
423423

424-
:::K1[LO-5.1.5]
424+
:::K1[LO-5.1.6]
425425

426426
Recall that Robot Framework provides access to execution information via Built-In variables
427427

website/docs/chapter-05/02_control_structures.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import GlossaryTerm from '@site/src/components/Glossary/GlossaryTerm';
44
# 5.2 Control Structures
55

66
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.
88

99
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.
1010

@@ -24,9 +24,9 @@ Understand the purpose and basic concept of IF-Statements
2424
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.
2525
This is achieved by evaluating conditions written as Python expressions, enabling dynamic decision-making within your tests|<GlossaryTerm term={"Task"}>tasks</GlossaryTerm>.
2626

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.
2828
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.
3030

3131

3232
### 5.2.1.1 Basic IF Syntax
@@ -90,9 +90,9 @@ Quick Check
9090
IF $user == 'Admin' Log Admin access granted.
9191
```
9292

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'`.
9494

95-
No `END` is needed for inline IF.
95+
No `END` is needed for <GlossaryTerm term={"Inline IF"}>inline IF</GlossaryTerm>.
9696

9797
## 5.2.4 FOR Loops
9898

@@ -117,7 +117,7 @@ The other types are `FOR-IN-RANGE`, `FOR-IN-ENUMERATE`, and `FOR-IN-ZIP`, which
117117
- `FOR-IN-ENUMERATE` iterates over a list of values and their indexes.
118118
- `FOR-IN-ZIP` iterates over multiple lists simultaneously.
119119

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.
121121
The loop variable takes on each value in the sequence one at a time, executing the enclosed keywords for each value.
122122

123123

@@ -216,7 +216,7 @@ Scroll Down Until Element Visible
216216
```
217217

218218
`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.
220220
This prevents infinite loops and ensures that tests|tasks do not hang indefinitely.
221221

222222

@@ -301,3 +301,4 @@ Get Older Participants
301301
RETURN ${older_participants}
302302
```
303303

304+

0 commit comments

Comments
 (0)