From f9ff99cb963e0c62d95452d9c134031d522eaee2 Mon Sep 17 00:00:00 2001 From: Andreas Date: Tue, 21 Mar 2017 14:54:56 +0200 Subject: [PATCH] A General Module that contains different methods This is a General Helper that may contains methods that are useful across our tests. For now it contains one method with name getBaseUrlName. With this method we can retrieve the base url we set in the configuration of Webdriver. This is very useful for example if we use the seeLink() method. This method reads the link we may have in an element. But it reads only absolute links. So if the link contain the base url of the test site (which is a variable actually) we cannot have a proper test for checking links. With gerBaseUrlName we can retrieve the base URL and create the absolute link for the element. --- src/GeneralHelpers.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/GeneralHelpers.php diff --git a/src/GeneralHelpers.php b/src/GeneralHelpers.php new file mode 100644 index 0000000..ec6212a --- /dev/null +++ b/src/GeneralHelpers.php @@ -0,0 +1,12 @@ +getModule('WebDriver')->_getUrl(); + + } +} \ No newline at end of file