summaryrefslogtreecommitdiffstats
path: root/services/frontend/base_actions/get.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/base_actions/get.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/base_actions/get.py')
-rw-r--r--services/frontend/base_actions/get.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/services/frontend/base_actions/get.py b/services/frontend/base_actions/get.py
index 8735c1b..5fb801a 100644
--- a/services/frontend/base_actions/get.py
+++ b/services/frontend/base_actions/get.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,6 +37,7 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
from services.frontend.base_actions.wait import Wait
+from services.helper import Helper
from services.session import session
@@ -98,8 +99,10 @@ class Get:
raise Exception(errorMsg, attr_name_value)
@staticmethod
- def value_by_name(attr_name_value):
+ def value_by_name(attr_name_value, wait_for_page=False):
try:
+ if wait_for_page:
+ Wait.page_has_loaded()
Wait.name(attr_name_value)
return session.ice_driver.find_element_by_name(attr_name_value).get_attribute("value")
except Exception as e:
@@ -125,3 +128,16 @@ class Get:
except Exception as e:
errorMsg = "Failed to get if it's selected by id:" + attr_id_value
raise Exception(errorMsg, attr_id_value)
+
+ @staticmethod
+ def is_checkbox_selected_by_id(attr_id_value, wait_for_page=False):
+ try:
+ if wait_for_page:
+ Wait.page_has_loaded()
+ Wait.id(attr_id_value)
+ return Helper.internal_assert_boolean_true_false(
+ session.ice_driver.find_element_by_id(
+ attr_id_value).get_attribute("value"), "on")
+ except Exception as e:
+ errorMsg = "Failed to get if it's selected by id:" + attr_id_value
+ raise Exception(errorMsg, attr_id_value)