1 # CDT Regression Testing # Set the MAINURL via the command line
3 # 1) execute a .profile that sets and exports DEV2 and DEV4
4 # 2) robot --variable MAINURL:$DEV# filename.robot
9 # ${MAINURL} is now set from the command line per above
13 | ${TENMINUTES} | 600s
14 #| ${FFPROFILE_DIR} | /home/dvz/.mozilla/firefox/s87c07vn.AppCZoomed50
15 | ${MAINURL} | https://localhost:8080/index.html
16 | ${USER_ID} | csituser
19 | Setup1 | Open browser | ${MAINURL} | ${BROWSER} | | | | |
22 # Refresh the ${MAINURL} which is used as starting point within each test file
24 | | Go To | ${MAINURL}
25 | | Wait Until Page Contains | WELCOME TO CONTROLLER DESIGN TOOL | ${LONGTIME}
28 # Make sure you can get to APPC server - Wrap in implicit wait then reset
29 # Want to wait a few seconds to see if Server error appears.
30 # Can't add an explicit wait to "Page should not contain"
32 | | [Arguments] | ${WAITTIME}
33 | | Set Selenium Implicit Wait | ${WAITTIME}
34 | | Page Should Not Contain | Error in connecting to APPC Server
35 | | Set Selenium Implicit Wait | 0
38 | ClickButtonByContent
39 | | [Arguments] | ${TEXT}
40 | | ${RETVAL} | Execute Javascript | function clickButtonByTextContent(buttontext) { var buttons = document.querySelectorAll('button'); for (var i=0, l=buttons.length; i<l; i++) { if (buttons[i].firstChild.nodeValue == buttontext) { buttons[i].click(); return 0 } } return 1 }; var retval=clickButtonByTextContent('${TEXT}'); return retval;
41 | | Return From Keyword | ${RETVAL}
43 | ClickButtonByClassName
44 | | [Arguments] | ${TEXT}
45 | | ${RETVAL} | Execute Javascript | function clickButtonByClassName(theclass) { var buttons = document.querySelectorAll('button'); for (var i=0, l=buttons.length; i<l; i++) { if (buttons[i].firstChild.nodeValue == theclass) { buttons[i].click(); return 0 } } return 1 }; var retval=clickButtonByClassName(${TEXT}); return retval;
46 | | Return From Keyword | ${RETVAL}
48 | EnterElementByClassName
49 | | [Arguments] | ${THECLASS} | ${INPUTVALUE}
50 | | ${RETVAL} | Execute Javascript | function enterElementByClassName(theclass,theinput) { var element = document.querySelector('.'+theclass).value = theinput; return 0 }; var retval=enterElementByClassName(${THECLASS},${INPUTVALUE}); return retval;
51 | | Return From Keyword | ${RETVAL}
55 | Library | ExtendedSelenium2Library
56 | Library | OperatingSystem