summaryrefslogtreecommitdiffstats
path: root/services/frontend/fe_general.py
diff options
context:
space:
mode:
authorEdan Binshtok <eb578m@intl.att.com>2017-10-18 07:56:58 +0300
committerEdan Binshtok <eb578m@intl.att.com>2017-10-18 07:56:58 +0300
commit433a8256e31f755f5e236491bbe39d3db24d6d6d (patch)
tree45f483eab1ea1654ee21a3b51c5b8bf1a8ebaffa /services/frontend/fe_general.py
parentf8907f0c4fc0ba4bb97a1d636a50c5b40c2642f2 (diff)
Align CI test test and JJB
Add vendor agnostic CI test to align Add Tox and maven docker Issue Id: VVP-15 Change-Id: I69f0c1036e6f72b62bddc822544c55200af7b37d Signed-off-by: Edan Binshtok <eb578m@intl.att.com>
Diffstat (limited to 'services/frontend/fe_general.py')
-rw-r--r--services/frontend/fe_general.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/services/frontend/fe_general.py b/services/frontend/fe_general.py
index c6832cb..b3f97b4 100644
--- a/services/frontend/fe_general.py
+++ b/services/frontend/fe_general.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -54,6 +54,7 @@ from services.session import session
logger = LoggingServiceFactory.get_logger()
+
class FEGeneral(Helper):
@staticmethod
@@ -103,16 +104,32 @@ class FEGeneral(Helper):
@staticmethod
def refresh():
- try: # Click on element in UI, by CSS locator.
+ try:
session.ice_driver.refresh()
Wait.page_has_loaded()
- # If failed - count the failure and add the error to list of errors.
except Exception as e:
errorMsg = "Could not refresh the page."
logger.error(errorMsg)
raise Exception(errorMsg, e)
@staticmethod
+ def smart_refresh():
+ session.ice_driver.refresh()
+ i = 0
+ success = False
+ while not success and i < 2:
+ try:
+ Wait.page_has_loaded()
+ success = True
+ break
+ except:
+ i += 1
+ time.sleep(1)
+ pass
+ if not success:
+ raise Exception("Failed to wait for refresh")
+
+ @staticmethod
def select_vendor_from_list(vendor):
Wait.name(Constants.Signup.Company.NAME)
Select(session.ice_driver.find_element_by_name(