[Fuego] [PATCH 07/16] Add Back() Selenium Command

Guilherme Campos Camargo guicc at profusion.mobi
Thu Mar 29 00:08:23 UTC 2018


That will go one level back in the browser history.

Signed-off-by: Guilherme Campos Camargo <guicc at profusion.mobi>
---
 engine/tests/Functional.fuegotest/test_run.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/engine/tests/Functional.fuegotest/test_run.py b/engine/tests/Functional.fuegotest/test_run.py
index fa68858..851074f 100755
--- a/engine/tests/Functional.fuegotest/test_run.py
+++ b/engine/tests/Functional.fuegotest/test_run.py
@@ -97,6 +97,16 @@ class CheckText(SeleniumCommand):
         return result == self.expected_result
 
 
+class Back(SeleniumCommand):
+    def exec(self, selenium_ctx):
+        super().exec(selenium_ctx)
+
+        LOGGER.debug('  Going back')
+        self.driver.back()
+
+        return True
+
+
 class ShExpect():
     BASH_PATTERN = 'test_run_pr1:#'
     COMMAND_RESULT_PATTERN = re.compile('^([0-9]+)', re.M)
-- 
2.16.2



More information about the Fuego mailing list