From 670d0503804fcdd2f85264b79497e22b845a3094 Mon Sep 17 00:00:00 2001 From: zephraph Date: Tue, 28 Apr 2015 12:25:49 -0500 Subject: [PATCH 1/2] Fix for #372 --- src/Selenium2Library/keywords/_formelement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Selenium2Library/keywords/_formelement.py b/src/Selenium2Library/keywords/_formelement.py index 1bc567a53..22065b393 100644 --- a/src/Selenium2Library/keywords/_formelement.py +++ b/src/Selenium2Library/keywords/_formelement.py @@ -175,7 +175,7 @@ def choose_file(self, locator, file_path): | Choose File | my_upload_field | /home/user/files/trades.csv | """ if not os.path.isfile(file_path): - self._info("File '%s' does not exist on the local file system" + raise AssertionError("File '%s' does not exist on the local file system" % file_path) self._element_find(locator, True, True).send_keys(file_path) From b735f28f80e26434b8f82499e0fe2ece11c12686 Mon Sep 17 00:00:00 2001 From: zephraph Date: Tue, 28 Apr 2015 17:59:06 -0500 Subject: [PATCH 2/2] Fixed test, updated changelog --- CHANGES.rst | 3 ++- test/acceptance/keywords/forms_and_buttons.txt | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9e7ffd8b2..3bfa40f43 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,7 +20,8 @@ Release Notes known browser and python version noncritical. Also added a noncritical case to the travis config for situations where testing is failing on travis for an unknown reason. - 'Capture Screenshot' now attempts to create its containing directory if the directory - specified in the filename does not exist. + specified in the filename does not exist. +- 'Choose File' now fails if the file doesn't exist [zephraph] - Added 'Get Window Position' and 'Set Window Position' keywords matching the diff --git a/test/acceptance/keywords/forms_and_buttons.txt b/test/acceptance/keywords/forms_and_buttons.txt index 3a3fdfb59..f615a6d7c 100644 --- a/test/acceptance/keywords/forms_and_buttons.txt +++ b/test/acceptance/keywords/forms_and_buttons.txt @@ -53,10 +53,10 @@ Click button created with