From a09a565aead2f691ef2928a135e3a83c9020c6c7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 15 Nov 2016 19:43:03 +0100 Subject: [PATCH] Improve :click-element error message --- qutebrowser/browser/commands.py | 2 +- tests/end2end/features/misc.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 6820cb3dc..f4b90b8e5 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1572,7 +1572,7 @@ class CommandDispatcher: def single_cb(elem): """Click a single element.""" if elem is None: - message.error("No element found!") + message.error("No element found with id {}!".format(value)) return try: elem.click(target) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index b4ba55fc3..6d3862713 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -566,7 +566,7 @@ Feature: Various utility commands. Scenario: Clicking an element with unknown ID When I open data/click_element.html 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 When I open data/click_element.html