Improve :click-element error message

This commit is contained in:
Florian Bruhin 2016-11-15 19:43:03 +01:00
parent 456ab18f24
commit a09a565aea
2 changed files with 2 additions and 2 deletions

View File

@ -1572,7 +1572,7 @@ class CommandDispatcher:
def single_cb(elem): def single_cb(elem):
"""Click a single element.""" """Click a single element."""
if elem is None: if elem is None:
message.error("No element found!") message.error("No element found with id {}!".format(value))
return return
try: try:
elem.click(target) elem.click(target)

View File

@ -566,7 +566,7 @@ Feature: Various utility commands.
Scenario: Clicking an element with unknown ID Scenario: Clicking an element with unknown ID
When I open data/click_element.html When I open data/click_element.html
And I run :click-element id blah And I run :click-element id blah
Then the error "No element found!" should be shown Then the error "No element found with id blah!" should be shown
Scenario: Clicking an element by ID Scenario: Clicking an element by ID
When I open data/click_element.html When I open data/click_element.html