kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This is RobotFrame work script |
| 3 | Library ExtendedSelenium2Library |
| 4 | Library OperatingSystem |
| 5 | Library XvfbRobot |
| 6 | |
| 7 | |
| 8 | *** Variables *** |
kishore | 7a1888f | 2017-10-19 08:11:06 -0500 | [diff] [blame] | 9 | ${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989 |
| 10 | ${PORTAL_ENV} /ONAPPORTAL |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 11 | ${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm |
| 12 | ${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome |
| 13 | ${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets |
| 14 | ${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome |
| 15 | ${GLOBAL_APPLICATION_ID} robot-functional |
| 16 | ${GLOBAL_PORTAL_ADMIN_USER} demo |
| 17 | ${GLOBAL_PORTAL_ADMIN_PWD} demo123456! |
| 18 | ${GLOBAL_SELENIUM_BROWSER} chrome |
| 19 | ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary |
| 20 | ${GLOBAL_SELENIUM_DELAY} 0 |
| 21 | ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5 |
| 22 | ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15 |
| 23 | ${GLOBAL_BUILD_NUMBER} 0 |
| 24 | ${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt |
| 25 | |
| 26 | |
| 27 | *** Test Cases *** |
| 28 | |
| 29 | Portal admin Login To Portal GUI |
| 30 | [Documentation] Logs into Portal GUI |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 31 | # Setup Browser |
| 32 | Start Virtual Display 1920 1080 |
| 33 | Open Browser ${PORTAL_LOGIN_URL} chrome |
| 34 | # Go To ${PORTAL_LOGIN_URL} |
| 35 | Maximize Browser Window |
| 36 | Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} |
| 37 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
| 38 | Log Logging in to ${PORTAL_URL}${PORTAL_ENV} |
| 39 | # Handle Proxy Warning |
| 40 | Title Should Be Login |
| 41 | Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER} |
| 42 | Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} |
| 43 | Click Link xpath=//a[@id='loginBtn'] |
| 44 | Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} |
| 45 | Log Logged in to ${PORTAL_URL}${PORTAL_ENV} |
| 46 | |
| 47 | |
| 48 | Portal Admin Navigation Application Link Tab |
| 49 | [Documentation] Logs into Portal GUI as Portal admin |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 50 | Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1] |
kishore | f3bb714 | 2017-10-31 13:56:36 -0500 | [diff] [blame] | 51 | Go To ${PORTAL_HOME_PAGE} |
| 52 | Dismiss Alert accept=false |
| 53 | #Scroll Element Into View xpath=//span[@id='tab-Home'] |
| 54 | #Click Element xpath=//span[@id='tab-Home'] |
| 55 | #Click Element xpath=(//span[@id='tab-xDemo-App']/following::i[@class='ion-close-round'])[1] |
| 56 | Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1] |
| 57 | |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 58 | |
| 59 | |
| 60 | Validate SDK Sub Menu |
| 61 | [Documentation] Logs into SDK GUI as Portal admin |
| 62 | Page Should Contain Home |
| 63 | Page Should Contain Sample Pages |
| 64 | Page Should Contain Reports |
| 65 | Page Should Contain Profile |
| 66 | Page Should Contain Admin |
kishore | 7a1888f | 2017-10-19 08:11:06 -0500 | [diff] [blame] | 67 | |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 68 | Click Sample Pages and validate sub Menu |
| 69 | [Documentation] Click Sample Pages |
| 70 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 71 | Click Link xpath=//a[@id='parent-item-Sample-Pages'] |
| 72 | Element Text Should Be xpath=//a[@title='Collaboration'] Collaboration |
| 73 | Element Text Should Be xpath=//a[@title='Notebook'] Notebook |
| 74 | Click Link xpath=//a[contains(@title,'Collaboration')] |
| 75 | Page Should Contain User List |
| 76 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 77 | Click Link xpath=//a[@id='parent-item-Sample-Pages'] |
| 78 | Click Link xpath=//a[contains(@title,'Notebook')] |
| 79 | Element Text Should Be xpath=//h1[contains(.,'Notebook')] Notebook |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 80 | |
| 81 | Click Reports and validate sub Menu |
| 82 | [Documentation] Click Reports Tab |
| 83 | #Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 84 | Click Link xpath=//a[@id='parent-item-Reports'] |
| 85 | Element Text Should Be xpath=//a[@title='All Reports'] All Reports |
| 86 | Element Text Should Be xpath=//a[@title='Create Reports'] Create Reports |
| 87 | Click Link xpath=//a[contains(@title,'All Reports')] |
| 88 | Page Should Contain Report search |
| 89 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 90 | Click Link xpath=//a[@id='parent-item-Reports'] |
| 91 | Click Link xpath=//a[contains(@title,'Create Reports')] |
| 92 | Page Should Contain Report Wizard |
| 93 | |
| 94 | Click Profile and validate sub Menu |
| 95 | [Documentation] Click Profile Tab |
| 96 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 97 | Click Link xpath=//a[@id='parent-item-Profile'] |
| 98 | Element Text Should Be xpath=//a[@title='Search'] Search |
| 99 | Element Text Should Be xpath=//a[@title='Self'] Self |
| 100 | Click Link xpath=//a[contains(@title,'Search')] |
| 101 | Page Should Contain Profile Search |
| 102 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 103 | Click Link xpath=//a[@id='parent-item-Profile'] |
| 104 | Click Link xpath=//a[contains(@title,'Self')] |
| 105 | Page Should Contain Self Profile Detail |
| 106 | |
| 107 | |
| 108 | Click Admin and validate sub Menu |
| 109 | [Documentation] Click Admin Tab |
| 110 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 111 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 112 | Element Text Should Be xpath=//a[@title='Roles'] Roles |
| 113 | Element Text Should Be xpath=//a[@title='Role Functions'] Role Functions |
| 114 | Element Text Should Be xpath=//a[@title='Cache Admin'] Cache Admin |
| 115 | Element Text Should Be xpath=//a[@title='Menus'] Menus |
| 116 | Element Text Should Be xpath=//a[@title='Usage'] Usage |
| 117 | Click Link xpath=//a[contains(@title,'Roles')] |
| 118 | Page Should Contain Roles |
| 119 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 120 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 121 | Click Link xpath=//a[contains(@title,'Role Function')] |
| 122 | Page Should Contain Role Function |
| 123 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 124 | Click Link xpath=.//a[@id='parent-item-Admin'] |
| 125 | #Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 126 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 127 | Click Link xpath=//a[contains(@title,'Cache Admin')] |
| 128 | Page Should Contain Cache Regions |
| 129 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 130 | Click Link xpath=.//a[@id='parent-item-Admin'] |
| 131 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 132 | Click Link xpath=//a[contains(@title,'Menus')] |
| 133 | Page Should Contain Admin Menu Items |
| 134 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 135 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 136 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 137 | Click Link xpath=//a[contains(@title,'Usage')] |
| 138 | Page Should Contain Current Usage |
| 139 | |
| 140 | |
| 141 | Teardown |
| 142 | [Documentation] Close All Open browsers |
| 143 | Close All Browsers |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | *** Keywords *** |