Skip to content

Commit 93a282a

Browse files
committed
Merge pull request #472 from rtomac/fix-webelement-header
Fixed some of the intro documentation
2 parents 465610b + 4983242 commit 93a282a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/Selenium2Library/__init__.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class Selenium2Library(
3333
imported into your Robot test suite (see `importing` section), and the
3434
`Open Browser` keyword must be used to open a browser to the desired location.
3535
36-
**--- Note important change starting with Version 1.7.0 release ---**
36+
37+
*--- Note important change starting with Version 1.7.0 release ---*
3738
= Locating or specifying elements =
3839
3940
All keywords in Selenium2Library that need to find an element on the page
@@ -42,14 +43,14 @@ class Selenium2Library(
4243
specifying different location strategies. `webelement` is a variable that
4344
holds a WebElement instance, which is a representation of the element.
4445
45-
Using 'locator'
46+
*Using locators*
4647
---------------
4748
By default, when a locator value is provided, it is matched against the
4849
key attributes of the particular element type. For example, `id` and
4950
`name` are key attributes to all elements, and locating elements is easy
50-
using just the `id` as a `locator`. For example::
51+
using just the `id` as a `locator`. For example:
5152
52-
Click Element my_element
53+
| Click Element my_element
5354
5455
It is also possible to specify the approach Selenium2Library should take
5556
to find an element by specifying a lookup strategy with a locator
@@ -76,22 +77,22 @@ class Selenium2Library(
7677
This can be fixed by changing the locator to:
7778
| Click Link default=page?a=b
7879
79-
Using 'webelement'
80+
*Using webelements*
8081
------------------
8182
Starting with version 1.7 of the Selenium2Library, one can pass an argument
8283
that contains a WebElement instead of a string locator. To get a WebElement,
8384
use the new `Get WebElements` keyword. For example:
8485
85-
| ${elem} = | Get WebElements | id=my_element |
86-
| Click Element | ${elem} | |
86+
| ${elem} = | Get WebElement | id=my_element |
87+
| Click Element | ${elem} | |
8788
8889
Locating Tables, Table Rows, Columns, etc.
8990
------------------------------------------
9091
Table related keywords, such as `Table Should Contain`, work differently.
9192
By default, when a table locator value is provided, it will search for
9293
a table with the specified `id` attribute. For example:
9394
94-
Table Should Contain my_table text
95+
| Table Should Contain my_table text
9596
9697
More complex table lookup strategies are also supported:
9798
@@ -113,7 +114,7 @@ class Selenium2Library(
113114
to the WebDriver instance and `${criteria}` is the text of the locator (i.e. everything that comes after the = sign).
114115
To use this locator it must first be registered with `Add Location Strategy`.
115116
116-
Add Location Strategy custom Custom Locator Strategy
117+
| Add Location Strategy custom Custom Locator Strategy
117118
118119
The first argument of `Add Location Strategy` specifies the name of the lookup strategy (which must be unique). After
119120
registration of the lookup strategy, the usage is the same as other locators. See `Add Location Strategy` for more details.

0 commit comments

Comments
 (0)