Skip to content

Commit d9f72ef

Browse files
committed
merge upstream
2 parents cde2ca8 + 860b6e6 commit d9f72ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Selenium2Library/keywords/_element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_webelement(self, locator):
2626
2727
See `introduction` for details about locating elements.
2828
"""
29-
return self.get_webelements(locator)[0]
29+
return self._element_find(locator, True, True)
3030

3131
def get_webelements(self, locator):
3232
"""Returns list of WebElement objects matching locator.

test/acceptance/keywords/elements.robot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Get Elements
77
@{links}= Get WebElements //div[@id="div_id"]/a
88
Length Should Be ${links} 11
99

10-
Get First Matching Element
10+
Get Web Element
1111
@{links}= Get WebElements //div[@id="div_id"]/a
1212
${link}= Get WebElement //div[@id="div_id"]/a
13-
LOG @{links}[0]
14-
LOG ${link}
1513
Should Be Equal @{links}[0] ${link}
14+
Run Keyword and Expect Error ValueError: Element locator 'id=non_existing_elem' did not match any elements.
15+
... Get WebElement id=non_existing_elem
1616

1717
More Get Elements
1818
[Setup] Go To Page "forms/prefilled_email_form.html"

0 commit comments

Comments
 (0)