From 9abb61ca2cea1907cab2cec312d6dca6e53a93cd Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Thu, 27 Sep 2018 10:38:50 -0700 Subject: Move CSIT to integration/csit repo To facilite branching of CSIT tests, all CSIT test code and scripts are relocated to the integration/csit repo. Change-Id: I1e4c0eff44691f73f8098b3c52764107f6b8b8df Issue-ID: INT-671 Signed-off-by: Gary Wu --- tests/appc/cdt/common.robot | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 tests/appc/cdt/common.robot (limited to 'tests/appc/cdt/common.robot') diff --git a/tests/appc/cdt/common.robot b/tests/appc/cdt/common.robot new file mode 100644 index 00000000..3492924f --- /dev/null +++ b/tests/appc/cdt/common.robot @@ -0,0 +1,60 @@ +# CDT Regression Testing # Set the MAINURL via the command line +# run as: +# 1) execute a .profile that sets and exports DEV2 and DEV4 +# 2) robot --variable MAINURL:$DEV# filename.robot + + +*** Variables *** + +# ${MAINURL} is now set from the command line per above +| ${BROWSER} | chrome +| ${SHORTTIME} | 5s +| ${LONGTIME} | 90s +| ${TENMINUTES} | 600s +#| ${FFPROFILE_DIR} | /home/dvz/.mozilla/firefox/s87c07vn.AppCZoomed50 +| ${MAINURL} | http://localhost:8080/index.html +| ${USER_ID} | csituser + +*** Keywords *** +| Setup1 | Open browser | ${MAINURL} | ${BROWSER} | | | | | +| Setup2 | SLEEP | 2s + +# Refresh the ${MAINURL} which is used as starting point within each test file +| RefreshMainURL +| | Go To | ${MAINURL} +| | Wait Until Page Contains | WELCOME TO CONTROLLER DESIGN TOOL | ${LONGTIME} + + +# Make sure you can get to APPC server - Wrap in implicit wait then reset +# Want to wait a few seconds to see if Server error appears. +# Can't add an explicit wait to "Page should not contain" +| CheckForServerError +| | [Arguments] | ${WAITTIME} +| | Set Selenium Implicit Wait | ${WAITTIME} +| | Page Should Not Contain | Error in connecting to APPC Server +| | Set Selenium Implicit Wait | 0 + + +| ClickButtonByContent +| | [Arguments] | ${TEXT} +| | ${RETVAL} | Execute Javascript | function clickButtonByTextContent(buttontext) { var buttons = document.querySelectorAll('button'); for (var i=0, l=buttons.length; i