diff --git a/src/Base/EPTF_CLL_Base_Dep.grp b/src/Base/EPTF_CLL_Base_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Buffer/EPTF_CLL_Buffer_Dep.grp b/src/Buffer/EPTF_CLL_Buffer_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/CentralScheduling/EPTF_CLL_CentralSchedulingUIHandler_Dep.grp b/src/CentralScheduling/EPTF_CLL_CentralSchedulingUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/CentralScheduling/EPTF_CLL_CentralScheduling_Dep.grp b/src/CentralScheduling/EPTF_CLL_CentralScheduling_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/CommandLineInterface/EPTF_CLL_CommandLineInterface_Dep.grp b/src/CommandLineInterface/EPTF_CLL_CommandLineInterface_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Common/EPTF_CLL_Common_Dep.grp b/src/Common/EPTF_CLL_Common_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/DataSource/EPTF_CLL_DataSource_Dep.grp b/src/DataSource/EPTF_CLL_DataSource_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/ExecCtrl/EPTF_CLL_ExecCtrlUIHandler_Dep.grp b/src/ExecCtrl/EPTF_CLL_ExecCtrlUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/ExecCtrl/EPTF_CLL_ExecCtrl_Dep.grp b/src/ExecCtrl/EPTF_CLL_ExecCtrl_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/FreeBusyQueue/EPTF_CLL_FreeBusyQueue_Dep.grp b/src/FreeBusyQueue/EPTF_CLL_FreeBusyQueue_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/HashMap/EPTF_CLL_HashMap_Dep.grp b/src/HashMap/EPTF_CLL_HashMap_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/HostAdmin/EPTF_CLL_HostAdminUIHandler_Dep.grp b/src/HostAdmin/EPTF_CLL_HostAdminUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/HostAdmin/EPTF_CLL_HostAdmin_Dep.grp b/src/HostAdmin/EPTF_CLL_HostAdmin_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/LGenBase/EPTF_CLL_LGenBaseUIHandler_Dep.grp b/src/LGenBase/EPTF_CLL_LGenBaseUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/LGenBase/EPTF_CLL_LGenBase_Dep.grp b/src/LGenBase/EPTF_CLL_LGenBase_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/LoadRegulator/EPTF_CLL_LoadRegulatorUIHandler_Dep.grp b/src/LoadRegulator/EPTF_CLL_LoadRegulatorUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/LoadRegulator/EPTF_CLL_LoadRegulator_Dep.grp b/src/LoadRegulator/EPTF_CLL_LoadRegulator_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Logging/EPTF_CLL_LoggingCS_Dep.grp b/src/Logging/EPTF_CLL_LoggingCS_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Logging/EPTF_CLL_LoggingUIHandler_Dep.grp b/src/Logging/EPTF_CLL_LoggingUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Logging/EPTF_CLL_Logging_Dep.grp b/src/Logging/EPTF_CLL_Logging_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/NameService/EPTF_CLL_NameService_Dep.grp b/src/NameService/EPTF_CLL_NameService_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/PTCDeployment/EPTF_CLL_PTCDeployment_Dep.grp b/src/PTCDeployment/EPTF_CLL_PTCDeployment_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/RandomNArray/EPTF_CLL_RandomNArray_Dep.grp b/src/RandomNArray/EPTF_CLL_RandomNArray_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/RedBlackTree/EPTF_CLL_RedBlackTree_Dep.grp b/src/RedBlackTree/EPTF_CLL_RedBlackTree_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Rendezvous/EPTF_CLL_Rendezvous_Dep.grp b/src/Rendezvous/EPTF_CLL_Rendezvous_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/RingBuffer/EPTF_CLL_RingBuffer_Dep.grp b/src/RingBuffer/EPTF_CLL_RingBuffer_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/SMacro/EPTF_CLL_SMacro_Dep.grp b/src/SMacro/EPTF_CLL_SMacro_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Scheduler/EPTF_CLL_Scheduler_Dep.grp b/src/Scheduler/EPTF_CLL_Scheduler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Semaphore/EPTF_CLL_Semaphore_Dep.grp b/src/Semaphore/EPTF_CLL_Semaphore_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatCapture/EPTF_CLL_StatCaptureUIHandler_Dep.grp b/src/StatCapture/EPTF_CLL_StatCaptureUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatCapture/EPTF_CLL_StatCapture_Dep.grp b/src/StatCapture/EPTF_CLL_StatCapture_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatHandler/EPTF_CLL_StatHandlerUIHandler_Dep.grp b/src/StatHandler/EPTF_CLL_StatHandlerUIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatHandler/EPTF_CLL_StatHandler_Dep.grp b/src/StatHandler/EPTF_CLL_StatHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatManager/EPTF_CLL_StatManager_Dep.grp b/src/StatManager/EPTF_CLL_StatManager_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatMeasure/EPTF_CLL_StatMeasure_Dep.grp b/src/StatMeasure/EPTF_CLL_StatMeasure_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/StatMeasure/UsefulFunctions.grp b/src/StatMeasure/UsefulFunctions.grp
old mode 100755
new mode 100644
diff --git a/src/StatReplay/EPTF_CLL_StatReplay_Dep.grp b/src/StatReplay/EPTF_CLL_StatReplay_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/TimeProfileEditor/EPTF_CLL_TimeProfileEditor_Dep.grp b/src/TimeProfileEditor/EPTF_CLL_TimeProfileEditor_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/Transport/EPTF_CLL_Transport_Dep.grp b/src/Transport/EPTF_CLL_Transport_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/UIHandler/EPTF_CLL_UIHandler_Base_Dep.grp b/src/UIHandler/EPTF_CLL_UIHandler_Base_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/UIHandler/EPTF_CLL_UIHandler_Browser.grp b/src/UIHandler/EPTF_CLL_UIHandler_Browser.grp
old mode 100755
new mode 100644
diff --git a/src/UIHandler/EPTF_CLL_UIHandler_Dep.grp b/src/UIHandler/EPTF_CLL_UIHandler_Dep.grp
old mode 100755
new mode 100644
diff --git a/src/UIHandler/XTDPasp.grp b/src/UIHandler/XTDPasp.grp
old mode 100755
new mode 100644
diff --git a/src/Variable/EPTF_CLL_Variable_Dep.grp b/src/Variable/EPTF_CLL_Variable_Dep.grp
old mode 100755
new mode 100644
diff --git a/test/WebGUI/Selenium/BaseTestCase.py b/test/WebGUI/Selenium/BaseTestCase.py
index f9eaca2a8554436afc544023459348651ceddee6..4b718a424fec3c2c7f8bb888a0092f879a206883 100755
--- a/test/WebGUI/Selenium/BaseTestCase.py
+++ b/test/WebGUI/Selenium/BaseTestCase.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -14,14 +14,16 @@ import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
+from selenium.webdriver.firefox.service import Service
class BaseTestCase(unittest.TestCase):
# yes... a \ has to be escaped even in a raw string, and a string can not end with \, so we have to create a string that does not end with a \ and get the \ character from its index...
- HTML_FILE = ("file:///" + os.path.abspath("../Test.html").replace(r"\\ "[0], r"/"))
+ HTML_FILE = ("file:///" + os.path.abspath("../WebGUI/htdocs/Test.html").replace(r"\\ "[0], r"/"))
def setUp(self):
- self.driver = webdriver.Firefox()
+ service = Service(executable_path="/usr/local/bin/geckodriver")
+ self.driver = webdriver.Firefox(service=service)
self.driver.maximize_window()
self.driver.implicitly_wait(3)
# these are not built in members, but no one said we could not add them
@@ -43,4 +45,4 @@ class BaseTestCase(unittest.TestCase):
self.driver.quit()
if __name__ == "__main__":
- unittest.main(catchbreak=True)
\ No newline at end of file
+ unittest.main(catchbreak=True, verbosity=2)
diff --git a/test/WebGUI/Selenium/Framework_CommonFunctions.py b/test/WebGUI/Selenium/Framework_CommonFunctions.py
index 8637a891e869a6eab332b9e4c1b33c577142af1b..ea29b1af4d894faef14d1470cac7c375ae016de1 100644
--- a/test/WebGUI/Selenium/Framework_CommonFunctions.py
+++ b/test/WebGUI/Selenium/Framework_CommonFunctions.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -40,7 +40,7 @@ def browserCompatibilityCheck(driver):
driver.applicationStarted = True
time.sleep(1)
try:
- div = driver.find_element_by_id('UnsupportedBrowser').find_element_by_tag_name('button').click()
+ div = driver.find_element(By.ID,'UnsupportedBrowser').find_element(By.TAG_NAME,'button').click()
time.sleep(1)
except NoSuchElementException as e:
- pass
\ No newline at end of file
+ pass
diff --git a/test/WebGUI/Selenium/Framework_LoadingWebApps.py b/test/WebGUI/Selenium/Framework_LoadingWebApps.py
index fd060dfa7b848f424da630207d3e1f13c5d857ea..248d6897582c35a54a984675025c7e6d8ac4a2de 100755
--- a/test/WebGUI/Selenium/Framework_LoadingWebApps.py
+++ b/test/WebGUI/Selenium/Framework_LoadingWebApps.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -43,7 +43,7 @@ class Framework_LoadingWebApps(BaseTestCase):
def checkApplicationStart(self, element_id):
try:
- element = self.driver.find_element_by_id(element_id)
+ element = self.driver.find_element(By.ID, element_id)
except NoSuchElementException as e:
self.fail("element by id " + element_id + " not found after starting application")
@@ -66,7 +66,7 @@ class Framework_LoadingWebApps(BaseTestCase):
def checkApplicationSwitch(self, element_id1, element_id2):
try:
- self.driver.find_element_by_id(element_id1)
+ self.driver.find_element(By.ID, element_id1)
self.fail("element by id " + element_id + " found, but it should not exist after switching applications")
except NoSuchElementException as e:
pass
@@ -90,4 +90,4 @@ class Framework_LoadingWebApps(BaseTestCase):
self.checkApplicationSwitch("RequestConsole_MainView", "customAppMainview")
if __name__ == "__main__":
- unittest.main(catchbreak=True)
\ No newline at end of file
+ unittest.main(catchbreak=True, verbosity=2)
diff --git a/test/WebGUI/Selenium/GuiEditor_CommonFunctions.py b/test/WebGUI/Selenium/GuiEditor_CommonFunctions.py
index 179390caa4ec23ca141a5007624e67e4d5ed2036..fb1c9135eef58e11d195b53375082b9f83697a5b 100644
--- a/test/WebGUI/Selenium/GuiEditor_CommonFunctions.py
+++ b/test/WebGUI/Selenium/GuiEditor_CommonFunctions.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -28,7 +28,7 @@ def loadSetup(driver, setupName):
radioId = "GuiEditor_Dialog_LoadSetup_RadioButton_" + setupName
loadButton = driver.wait.until(EC.element_to_be_clickable((By.ID, 'GuiEditor_Button_Load')))
loadButton.click()
- radioButton = driver.find_element_by_id(radioId)
+ radioButton = driver.find_element(By.ID, radioId)
radioButton.click()
dialogClickOk(driver, "LoadSetup")
time.sleep(1)
@@ -40,17 +40,17 @@ def saveSetup(driver):
def saveSetupAs(driver, setupName, exists = False, overwrite = False):
button = driver.wait.until(EC.element_to_be_clickable((By.ID, 'GuiEditor_Button_SaveAs')))
button.click()
- editBox = driver.find_element_by_id("GuiEditor_Dialog_SaveSetupAs_Field")
+ editBox = driver.find_element(By.ID, "GuiEditor_Dialog_SaveSetupAs_Field")
ActionChains(driver).move_to_element(editBox).send_keys(Keys.HOME).perform()
ActionChains(driver).key_down(Keys.SHIFT).send_keys(Keys.END).key_up(Keys.SHIFT).send_keys(Keys.DELETE).perform()
ActionChains(driver).send_keys(setupName).perform()
dialogClickOk(driver, "SaveSetupAs")
try:
- driver.find_element_by_id("GuiEditor_Dialog_OverWrite")
+ driver.find_element(By.ID, "GuiEditor_Dialog_OverWrite")
if overwrite:
dialogClickOk(driver, "OverWrite")
else:
- closeButton = driver.find_element_by_class_name("ui-dialog-titlebar").find_element_by_class_name("ui-dialog-titlebar-close")
+ closeButton = driver.find_element(By.CLASS_NAME, "ui-dialog-titlebar").find_element(By.CLASS_NAME, "ui-dialog-titlebar-close")
closeButton.click()
return exists
except NoSuchElementException as e:
@@ -75,14 +75,14 @@ def addEmptyRequest(driver):
# ---------- Editor manipulating functions ----------
def rightClickLabel(driver, editorId):
- element = driver.find_element_by_id(editorId + "_Header")
+ element = driver.find_element(By.ID, editorId + "_Header")
actions = ActionChains(driver)
actions.context_click(element)
actions.perform()
time.sleep(0.25)
def clickInContextMenu(driver, text):
- listElements = driver.find_elements_by_css_selector("#GuiEditor_ContextMenu > li")
+ listElements = driver.find_element(By.CSS_SELECTOR, "#GuiEditor_ContextMenu > li")
for element in listElements:
if element.text == text:
element.click()
@@ -103,12 +103,12 @@ def closeCustomDataEditor(driver):
# ---------- Connection creation ----------
def getNodeFromTreeByElements(driver, treeId, elements):
- children = driver.find_elements_by_css_selector("#" + treeId + " > ul > li")
+ children = driver.find_element(By.CSS_SELECTOR, "#" + treeId + " > ul > li")
nodeToReturn = None
for i in range(len(elements)):
missing = True
for node in children:
- nodeText = node.find_element_by_class_name("jstree-anchor").text
+ nodeText = node.find_element(By.CLASS_NAME, "jstree-anchor").text
if nodeText == elements[i]:
nodeToReturn = node
missing = False
@@ -116,33 +116,33 @@ def getNodeFromTreeByElements(driver, treeId, elements):
if missing: return None
if i < len(elements) - 1:
if "jstree-closed" in nodeToReturn.get_attribute("class"):
- nodeToReturn.find_element_by_class_name("jstree-icon").click()
+ nodeToReturn.find_element(By.CLASS_NAME, "jstree-icon").click()
time.sleep(0.25)
- children = nodeToReturn.find_elements_by_css_selector("ul > li")
+ children = nodeToReturn.find_element(By.CSS_SELECTOR, "ul > li")
return nodeToReturn
def getNodeFromTreeByPath(driver, treeId, path):
- children = driver.find_elements_by_css_selector("#" + treeId + " > ul > li")
+ children = driver.find_element(By.CSS_SELECTOR, "#" + treeId + " > ul > li")
nodeToReturn = None
for i in range(len(path)):
if not path[i] < len(children): return None
nodeToReturn = children[path[i]]
if i < len(path) - 1:
if "jstree-closed" in nodeToReturn.get_attribute("class"):
- nodeToReturn.find_element_by_class_name("jstree-icon").click()
+ nodeToReturn.find_element(By.CLASS_NAME, "jstree-icon").click()
time.sleep(0.25)
- children = nodeToReturn.find_elements_by_css_selector("ul > li")
+ children = nodeToReturn.find_element(By.CSS_SELECTOR, "ul > li")
return nodeToReturn
def clickInTreeContextMenu(driver, node, menuText):
- anchor = node.find_element_by_class_name("jstree-anchor")
+ anchor = node.find_element(By.CLASS_NAME, "jstree-anchor")
actions = ActionChains(driver)
actions.context_click(anchor)
actions.perform()
time.sleep(0.5)
- contextMenu = driver.find_element_by_class_name("jstree-contextmenu")
- items = contextMenu.find_elements_by_tag_name("li")
+ contextMenu = driver.find_element(By.CLASS_NAME, "jstree-default-contextmenu")
+ items = contextMenu.find_element(By.TAG_NAME, "li")
for element in items:
if menuText in element.text:
element.click()
@@ -156,8 +156,8 @@ def pressDeleteOnNode(driver, node):
time.sleep(0.25)
def dragAndDrop(driver, fromId, toId):
- source = driver.find_element_by_id(fromId)
- target = driver.find_element_by_id(toId)
+ source = driver.find_element(By.ID, fromId)
+ target = driver.find_element(By.ID, toId)
target.location_once_scrolled_into_view
action_chains = ActionChains(driver)
@@ -169,7 +169,7 @@ def dragAndDrop(driver, fromId, toId):
def addEditor(driver, className, radioButtonToSelect, buttonSuffix):
existingEditorIds = set()
- existingEditors = driver.find_elements_by_class_name(className)
+ existingEditors = driver.find_element(By.CLASS_NAME, className)
for editor in existingEditors:
editorId = editor.get_attribute("id")
existingEditorIds.add(editorId)
@@ -181,7 +181,7 @@ def addEditor(driver, className, radioButtonToSelect, buttonSuffix):
time.sleep(0.25)
newEditorId = None
- existingEditors = driver.find_elements_by_class_name(className)
+ existingEditors = driver.find_element(By.CLASS_NAME, className)
for editor in existingEditors:
editorId = editor.get_attribute("id")
if editorId not in existingEditorIds:
@@ -190,8 +190,8 @@ def addEditor(driver, className, radioButtonToSelect, buttonSuffix):
return newEditorId
def selectRadioButtonInDialog(driver, dialogName, className):
- dialog = driver.find_element_by_id("GuiEditor_Dialog_" + dialogName)
- radio_button = dialog.find_element_by_id("GuiEditor_Dialog_" + dialogName + "_RadioButton_" + className)
+ dialog = driver.find_element(By.ID, "GuiEditor_Dialog_" + dialogName)
+ radio_button = dialog.find_element(By.ID, "GuiEditor_Dialog_" + dialogName + "_RadioButton_" + className)
radio_button.click()
def dialogClickOk(driver, name):
@@ -200,20 +200,20 @@ def dialogClickOk(driver, name):
button.click()
def getSetupName(driver):
- label = driver.find_element_by_id("GuiEditor_SetupNameLabel")
+ label = driver.find_element(By.ID, "GuiEditor_SetupNameLabel")
return label.text
def treeExists(driver, id):
try:
- div = driver.find_element_by_id(id)
- div.find_element_by_class_name("jstree-node")
+ div = driver.find_element(By.ID, id)
+ div.find_element(By.CLASS_NAME, "jstree-node")
return True
except NoSuchElementException as e:
return False
def editorTypeExists(driver, className):
try:
- driver.find_element_by_class_name(className)
+ driver.find_element(By.CLASS_NAME, className)
return True
except NoSuchElementException as e:
return False
@@ -221,11 +221,11 @@ def editorTypeExists(driver, className):
def dialogExists(driver, name):
dialogId = "GuiEditor_Dialog_" + name
try:
- driver.find_element_by_id(dialogId)
+ driver.find_element(By.ID, dialogId)
return True
except NoSuchElementException as e:
return False
def pressDelete(driver):
actions = ActionChains(driver)
- actions.send_keys(Keys.DELETE).perform()
\ No newline at end of file
+ actions.send_keys(Keys.DELETE).perform()
diff --git a/test/WebGUI/Selenium/GuiEditor_EditorTests.py b/test/WebGUI/Selenium/GuiEditor_EditorTests.py
index cd45a3d48c90c0ae9ff5f1b67eb7aa776f9af919..6a91079f4df7f4cc5ccabe1d3bcca91db08a70e6 100644
--- a/test/WebGUI/Selenium/GuiEditor_EditorTests.py
+++ b/test/WebGUI/Selenium/GuiEditor_EditorTests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -96,7 +96,7 @@ class GuiEditor_EditorTests(BaseTestCase):
script = "a = '" + customData + "';" + "view_editor = $('#GuiEditor_CustomDataEditor .CodeMirror')[0].CodeMirror; view_editor.setValue(a);"
self.driver.execute_script(script)
- editorHeader = self.driver.find_element_by_id("GuiEditor_CustomDataEditor_Header")
+ editorHeader = self.driver.find_element(By.ID, "GuiEditor_CustomDataEditor_Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#ff0000', str(Color.from_string(editorHeaderColor).hex), 'Custom data editor header should be red, it is ' + editorHeaderColor)
@@ -123,4 +123,4 @@ class GuiEditor_EditorTests(BaseTestCase):
self.assertFalse(editorTypeExists(self.driver, "GuiEditor_ViewEditor"), "ViewEditor element found after it was deleted")
if __name__ == "__main__":
- unittest.main(catchbreak=True)
\ No newline at end of file
+ unittest.main(catchbreak=True, verbosity=2)
diff --git a/test/WebGUI/Selenium/GuiEditor_SetupHandlingTests.py b/test/WebGUI/Selenium/GuiEditor_SetupHandlingTests.py
index b2cbac6e825d87112fb43416c22bd2e748927165..8fa34a08c65ea8ad428b47f36fb66b8f674c44e8 100755
--- a/test/WebGUI/Selenium/GuiEditor_SetupHandlingTests.py
+++ b/test/WebGUI/Selenium/GuiEditor_SetupHandlingTests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -68,7 +68,7 @@ class GuiEditor_SetupHandlingTests(BaseTestCase):
self.driver.get(self.HTML_FILE)
startGuiEditor(self.driver)
setupName = getSetupName(self.driver)
- viewmodelEditor = self.driver.find_element_by_id("GuiEditor_ViewmodelEditor_0")
+ viewmodelEditor = self.driver.find_element(By.ID, "GuiEditor_ViewmodelEditor_0")
time.sleep(0.5)
rightClickLabel(self.driver, "GuiEditor_ViewmodelEditor_0")
@@ -82,7 +82,7 @@ class GuiEditor_SetupHandlingTests(BaseTestCase):
loadSetup(self.driver, setupName)
try:
- viewmodelEditor = self.driver.find_element_by_id("GuiEditor_ViewmodelEditor_0")
+ viewmodelEditor = self.driver.find_element(By.ID, "GuiEditor_ViewmodelEditor_0")
self.fail("Deleted ViewModel Editor is still present in the saved setup")
except NoSuchElementException as e:
pass
@@ -115,4 +115,4 @@ class GuiEditor_SetupHandlingTests(BaseTestCase):
self.assertTrue(saveSetupAs(self.driver, "Test2", True, False), "SaveAs overwrite checking is not ok")
if __name__ == "__main__":
- unittest.main(catchbreak=True)
\ No newline at end of file
+ unittest.main(catchbreak=True, verbosity=2)
diff --git a/test/WebGUI/Selenium/RequestConsole_Tests.py b/test/WebGUI/Selenium/RequestConsole_Tests.py
index fbc202534f8762db80e76c6457f606de64ae9ad0..ec7872741597260dae2f8f70af2ec4b42166f9bc 100755
--- a/test/WebGUI/Selenium/RequestConsole_Tests.py
+++ b/test/WebGUI/Selenium/RequestConsole_Tests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -23,7 +23,7 @@ def loadSetup(driver, setupName):
radioId = "RequestConsole_Dialog_LoadSetup_RadioButton_" + setupName
loadButton = driver.wait.until(EC.element_to_be_clickable((By.ID, 'RequestConsole_Button_Load')))
loadButton.click()
- radioButton = driver.find_element_by_id(radioId)
+ radioButton = driver.find_element(By.ID, radioId)
radioButton.click()
dialogClickOk(driver, "LoadSetup")
time.sleep(1)
@@ -34,13 +34,13 @@ def dialogClickOk(driver, name):
button.click()
def getSetupName(driver):
- label = driver.find_element_by_id("RequestConsole_SetupNameLabel")
+ label = driver.find_element(By.ID, "RequestConsole_SetupNameLabel")
return label.text
def treeExists(driver, id):
try:
- div = driver.find_element_by_id(id)
- div.find_element_by_class_name("jstree-node")
+ div = driver.find_element(By.ID, id)
+ div.find_element(By.CLASS_NAME, "jstree-node")
return True
except NoSuchElementException as e:
return False
@@ -62,7 +62,7 @@ def sendRequest(driver):
def editorTypeExists(driver, className):
try:
- driver.find_element_by_class_name(className)
+ driver.find_element(By.CLASS_NAME, className)
return True
except NoSuchElementException as e:
return False
@@ -104,7 +104,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
def test_requestEditorTree_dragAtomicRequestWithinTheRequestObject(self):
init(self.driver, self.HTML_FILE)
- treeElements = self.driver.find_elements_by_xpath("//*[contains(@id, '_anchor')]") #for elem in treeElements: print elem.get_attribute('innerHTML')
+ treeElements = self.driver.find_element(By.XPATH, "//*[contains(@id, '_anchor')]") #for elem in treeElements: print elem.get_attribute('innerHTML')
ActionChains(self.driver).drag_and_drop(treeElements[7], treeElements[8]).perform()
script = "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; return code_editor.getValue();"
textInEditor = self.driver.execute_script(script)
@@ -153,11 +153,11 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
def test_requestEditorTree_dragRequestFromHelpTree(self):
init(self.driver, self.HTML_FILE)
- treeElements = self.driver.find_elements_by_xpath("//*[contains(@id, '_anchor')]")
+ treeElements = self.driver.find_element(By.XPATH, "//*[contains(@id, '_anchor')]")
ActionChains(self.driver).double_click(treeElements[0]).perform()
- treeElementsAfterExpand = self.driver.find_elements_by_xpath("//*[contains(@id, '_anchor')]")
+ treeElementsAfterExpand = self.driver.find_element(By.XPATH, "//*[contains(@id, '_anchor')]")
ActionChains(self.driver).drag_and_drop(treeElementsAfterExpand[1], treeElements[8]).perform()
script = "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; return code_editor.getValue();"
@@ -234,7 +234,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
newSetup(self.driver);
addEmptyRequest(self.driver);
- editorHeader = self.driver.find_element_by_id("RequestConsole_CodeEditor__Header")
+ editorHeader = self.driver.find_element(By.ID, "RequestConsole_CodeEditor__Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'RequestEditor\'s header should be black, it is ' + str(Color.from_string(editorHeaderColor).hex))
@@ -245,7 +245,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
script = "a = '" + request + "';" + "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; code_editor.setValue(a);"
self.driver.execute_script(script)
- editorHeader = self.driver.find_element_by_id("RequestConsole_CodeEditor__Header")
+ editorHeader = self.driver.find_element(By.ID, "RequestConsole_CodeEditor__Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'RequestEditor header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex))
@@ -256,7 +256,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
script = "a = '" + request + "';" + "code_editor = $('#RequestConsole_CodeEditor .CodeMirror')[0].CodeMirror; code_editor.setValue(a);"
self.driver.execute_script(script)
- editorHeader = self.driver.find_element_by_id("RequestConsole_CodeEditor__Header")
+ editorHeader = self.driver.find_element(By.ID, "RequestConsole_CodeEditor__Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#ff0000', str(Color.from_string(editorHeaderColor).hex), 'RequestEditor\'s header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex))
@@ -273,7 +273,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
textInEditor = re.sub(r"\s", "", textInEditor)
self.assertEqual(request, textInEditor, "Response editor content can't be set")
- editorHeader = self.driver.find_element_by_id("RequestConsole_ResponseDisplay__Header")
+ editorHeader = self.driver.find_element(By.ID, "RequestConsole_ResponseDisplay__Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'ResponseDisplay header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex))
@@ -284,7 +284,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
script = "a = '" + request + "';" + "code_editor = $('#RequestConsole_ResponseDisplay .CodeMirror')[0].CodeMirror; code_editor.setValue(a);"
self.driver.execute_script(script)
- editorHeader = self.driver.find_element_by_id("RequestConsole_ResponseDisplay__Header")
+ editorHeader = self.driver.find_element(By.ID, "RequestConsole_ResponseDisplay__Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#ff0000', str(Color.from_string(editorHeaderColor).hex), 'ResponseDisplay header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex))
@@ -293,7 +293,7 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
sendRequest(self.driver);
- editorHeader = self.driver.find_element_by_id("RequestConsole_ResponseDisplay__Header")
+ editorHeader = self.driver.find_element(By.ID, "RequestConsole_ResponseDisplay__Header")
editorHeaderColor = editorHeader.value_of_css_property("color")
self.assertEqual('#000000', str(Color.from_string(editorHeaderColor).hex), 'ResponseDisplay header should be red, it is ' + str(Color.from_string(editorHeaderColor).hex))
@@ -346,4 +346,4 @@ class RequestConsole_SetupHandlingTests(BaseTestCase):
self.assertEqual(expectedResponse, textInEditor, "sendData is not returning the expexted result")
if __name__ == "__main__":
- unittest.main(catchbreak=True)
\ No newline at end of file
+ unittest.main(catchbreak=True, verbosity=2)
diff --git a/test/WebGUI/Selenium/runTests.py b/test/WebGUI/Selenium/runTests.py
index 37cb73016250eb1461ecdd8bdf7c8bb325e58921..02739b9293370f5b936ce50ac8dbf8c3abe6ccb5 100644
--- a/test/WebGUI/Selenium/runTests.py
+++ b/test/WebGUI/Selenium/runTests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -16,4 +16,4 @@ from GuiEditor_ConnectionTests import *
from RequestConsole_Tests import *
if __name__ == "__main__":
- unittest.main(catchbreak=True)
\ No newline at end of file
+ unittest.main(catchbreak=True, verbosity=2)
\ No newline at end of file
diff --git a/test/WebGUI/Selenium/runTestsWithXvfb.sh b/test/WebGUI/Selenium/runTestsWithXvfb.sh
index c914627f68f473f5176819e76944c912a3a4365f..0cd0662d040405b5e6bceab6f1c6ca138cf37922 100755
--- a/test/WebGUI/Selenium/runTestsWithXvfb.sh
+++ b/test/WebGUI/Selenium/runTestsWithXvfb.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#///////////////////////////////////////////////////////////////////////////////
-#// Copyright (c) 2000-2023 Ericsson Telecom AB //
+#// Copyright (c) 2000-2023 Ericsson Telecom AB Telecom AB //
#// //
#// All rights reserved. This program and the accompanying materials //
#// are made available under the terms of the Eclipse Public License v2.0 //
@@ -8,18 +8,26 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
+#set -e
+
echo "Checking if Xvfb is running..."
XVFB_PID=`pgrep Xvfb`
if [ "$?" == "0" ]; then
-
+
echo "Xvfb is running, finding display port..."
DISPLAY=`ps --format command --no-headers -ww --pid $XVFB_PID | grep -o ':[0-9]*'`
echo "Found display port: "$DISPLAY
export DISPLAY=$DISPLAY.0
chmod u+x runTests.py
- ./runTests.py
+
+ echo "INFO: Running the tests"
+ python3 runTests.py
+ if [ "$?" == "0" ]; then
+ echo "ERROR: Running of the tests failed"
+ exit 1
+ fi
exit 0
@@ -41,7 +49,11 @@ else
export DISPLAY=:999.0
chmod u+x runTests.py
- ./runTests.py
+ result=$(python3 runTests.py)
+ if [ "$result" == "0" ]; then
+ echo "ERROR: Running of the tests failed. Exit status: $result"
+ exit 1
+ fi
killXvfb_trap
diff --git a/test/WebGUI/TestContent/GuiEditor/AppConfigSchema.json b/test/WebGUI/TestContent/GuiEditor/AppConfigSchema.json
index 7fd5a5197ac2ad9a0e4f41193436ccbc03cd3fd6..fbaddecd9bf88f7fe2372d65598fb3e7dd106450 120000
--- a/test/WebGUI/TestContent/GuiEditor/AppConfigSchema.json
+++ b/test/WebGUI/TestContent/GuiEditor/AppConfigSchema.json
@@ -1 +1 @@
-../../../../src/WebGUI/htdocs/CustomizableContent/GuiEditor/AppConfigSchema.json
\ No newline at end of file
+../../../../../EPTF_Web_GUI_CNL113864/htdocs/CustomizableContent/GuiEditor/AppConfigSchema.json
\ No newline at end of file
diff --git a/test/WebGUI/createOfflineWebGUI.sh b/test/WebGUI/createOfflineWebGUI.sh
index a058d2ce865ff6d45216ee3efa7451ca6ceca223..73aab2c6ff975032d67c31836ac76eeb3ac206cf 100755
--- a/test/WebGUI/createOfflineWebGUI.sh
+++ b/test/WebGUI/createOfflineWebGUI.sh
@@ -8,8 +8,10 @@
#// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
#///////////////////////////////////////////////////////////////////////////////
+set -e
+
CURRENT_DIR=`pwd`
-COPY_TO="."
+COPY_TO="./WebGUI"
CLL_DIR=`readlink -f $0 | sed 's/\/test.*//g'`
WEBGUI_DIR="$CLL_DIR/../EPTF_Web_GUI_CNL113864"
DO_ZIP=0
@@ -34,7 +36,7 @@ do
esac
done
-WEBGUI_SRC=$WEBGUI_DIR/src/WebGUI
+WEBGUI_SRC=$WEBGUI_DIR/htdocs
API_DIR=$CLL_DIR/src/DsRestAPI/Api/Js
CUST_DIR=$CLL_DIR/test/WebGUI/TestContent
TESTCASES_DIR=$CLL_DIR/test/DsRestAPI/JSON_reqResp
@@ -44,14 +46,16 @@ MOCKTEST_DIR=$CLL_DIR/test/WebGUI/MockTest
MOCKTEST_DSSERVERDESCRIPTOR=$CLL_DIR/test/DsRestAPI/DsRestAPITestConfig.json
SELENIUM_DIR=$CLL_DIR/test/WebGUI/Selenium
-API_LOC=$COPY_TO/WebGUI/htdocs/Utils/DsRestAPI
-CUST_LOC=$COPY_TO/WebGUI/htdocs/CustomizableContent
-WEBAPP_LOC=$COPY_TO/WebGUI/htdocs/WebApplications
+API_LOC=$COPY_TO/htdocs/Utils/DsRestAPI
+CUST_LOC=$COPY_TO/htdocs/CustomizableContent
+WEBAPP_LOC=$COPY_TO/htdocs/WebApplications
TESTCASES_LOC=$WEBAPP_LOC/MockTest/Testcases
-SELENIUM_LOC=$COPY_TO/WebGUI/htdocs/Selenium
+SELENIUM_LOC=$COPY_TO/htdocs/Selenium
+
+MAIN_HTML=$COPY_TO/htdocs/Main.html
+TEST_HETML=$COPY_TO/htdocs/Test.html
-MAIN_HTML=$COPY_TO/WebGUI/htdocs/Main.html
-TEST_HETML=$COPY_TO/WebGUI/htdocs/Test.html
+echo "INFO: Preparation: deleting old files and copying"
# create target directory if it does not exist
if [ ! -d $COPY_TO ]; then
@@ -74,10 +78,10 @@ fi
cp -arL $API_DIR $API_LOC
# check if the directory exsits (it usually does, not only when the server is running) and delete it
-if [ -e $COPY_TO/WebGUI/htdocs/CustomizableContent ]; then
- rm -rf $COPY_TO/WebGUI/htdocs/CustomizableContent
+if [ -e $COPY_TO/htdocs/CustomizableContent ]; then
+ rm -rf $COPY_TO/htdocs/CustomizableContent
fi
-cp -arL $CUST_DIR $CUST_LOC
+cp -arLP $CUST_DIR $CUST_LOC
cp -arL $MOCK_SERVER_DIR $API_LOC
cp -arL $MOCKTEST_DIR $WEBAPP_LOC
@@ -88,6 +92,8 @@ cp -arL $TESTCASES_DIR/* $TESTCASES_LOC
cp -arL $MOCKTEST_DSSERVERDESCRIPTOR $WEBAPP_LOC/MockTest/DsRestAPITestConfig.js
+echo "INFO: Creating Test.html file"
+
awk '{
if ($0 ~ /FileHandler.js/) {
sub("FileHandler.js", "DsRestAPI/MockedServer/FileHandler.js");
@@ -97,7 +103,7 @@ awk '{
}
}' $MAIN_HTML > $TEST_HETML
-cd $COPY_TO/WebGUI/htdocs
+cd $COPY_TO/htdocs
listOfFiles=`find | cut -b3- | awk '{if(NR>1){if(NR!=2){print ", "}print "\""$0"\""}}'`
# this will replace \n-s with spaces, so sed will work
listOfFiles=`echo $listOfFiles`
@@ -107,12 +113,12 @@ sed -i "s|REPLACETHIS|$listOfFiles|g" $API_LOC/MockedServer/FileHandler.js
if [ $DO_ZIP == 1 ]; then
cd $COPY_TO
- tar -czvf WebGUI.tgz WebGUI >> /dev/null
+ tar -czvf WebGUI.tgz htdocs >> /dev/null
rm -rf WebGUI
cd $CURRENT_DIR
fi
cd $CURRENT_DIR
-echo "rm -rf WebGUI; rm -f WebGUI.tgz; rm -f deleteOfflineWebGUI.sh" > $COPY_TO/deleteOfflineWebGUI.sh
+echo "rm -rf htdocs; rm -f WebGUI.tgz; rm -f deleteOfflineWebGUI.sh" > $COPY_TO/deleteOfflineWebGUI.sh
chmod u+x $COPY_TO/deleteOfflineWebGUI.sh