Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Selenium2Library/keywords/_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def _frame_contains(self, locator, text):
return found

def _get_text(self, locator):
element = self._element_find(locator, True, False)
element = self._element_find(locator, True, True)
if element is not None:
return element.text
return None
Expand Down
2 changes: 2 additions & 0 deletions test/acceptance/keywords/content_assertions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Page Should Not Contain Element With Disabling Source Logging
Element Should Contain
Element Should Contain some_id This text is inside an identified element
Run Keyword And Expect Error Element 'some_id' should have contained text 'non existing text' but its text was 'This text is inside an identified element'. Element Should Contain some_id non existing text
Run Keyword And Expect Error ValueError: Element locator 'missing_id' did not match any elements. Element Should Contain missing_id This should report missing element.

Element Text Should Be
Element Text Should Be some_id This text is inside an identified element
Expand All @@ -89,6 +90,7 @@ Element Text Should Be
Get Text
${str} = Get Text some_id
Should Match ${str} This text is inside an identified element
Run Keyword And Expect Error ValueError: Element locator 'missing_id' did not match any elements. Get Text missing_id

Element Should Be Visible
[Setup] Go To Page "visibility.html"
Expand Down