blob: 00714024f9a24c7cbafbc5d50c195ecb18786ce9 [file] [log] [blame]
kishore0fdcc612017-10-09 08:19:36 -05001*** Settings ***
2Documentation This is RobotFrame work script
3Library ExtendedSelenium2Library
4Library OperatingSystem
5Library XvfbRobot
6
7
8*** Variables ***
CHINTAMANI68e98362018-04-10 18:56:38 -04009${PORTAL_URL} http://portal.api.simpledemo.onap.org:8990
10${PORTAL_ENV} /ONAPPORTALSDK
kishore0fdcc612017-10-09 08:19:36 -050011${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
CHINTAMANI68e98362018-04-10 18:56:38 -040012${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/welcome
kishore0fdcc612017-10-09 08:19:36 -050013${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
CHINTAMANI68e98362018-04-10 18:56:38 -040017${GLOBAL_PORTAL_ADMIN_PWD} demo
kishore0fdcc612017-10-09 08:19:36 -050018${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
29Portal admin Login To Portal GUI
30 [Documentation] Logs into Portal GUI
kishore0fdcc612017-10-09 08:19:36 -050031# 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}
CHINTAMANI68e98362018-04-10 18:56:38 -040039 # Handle Proxy Warning
kishore0fdcc612017-10-09 08:19:36 -050040 Title Should Be Login
CHINTAMANI68e98362018-04-10 18:56:38 -040041 Input Text xpath=//input[@id='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
42 Input Password xpath=//input[@id='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
43 Click Element //*[@id="loginBtn"]
44 Wait Until Page Contains Element xpath=//img[@src='app/fusionapp/icons/logo_onap_transbg.png'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore0fdcc612017-10-09 08:19:36 -050045 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
46
CHINTAMANI68e98362018-04-10 18:56:38 -040047SDKPortalAdmin Navigation Application Link Tab
48 [Documentation] Logs into Portal GUI as Portal admin
49 Comment Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
50 Comment Go To ${PORTAL_HOME_PAGE}
51 Comment Dismiss Alert accept=false
52 #Scroll Element Into View xpath=//span[@id='tab-Home']
53 #Click Element xpath=//span[@id='tab-Home']
kishoref3bb7142017-10-31 13:56:36 -050054 #Click Element xpath=(//span[@id='tab-xDemo-App']/following::i[@class='ion-close-round'])[1]
CHINTAMANI68e98362018-04-10 18:56:38 -040055 Comment Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
56
57Validate SDK Sub Menu
58 [Documentation] Logs into SDK GUI as Portal admin
59 Page Should Contain Home
60 Page Should Contain Sample Pages
61 Page Should Contain Reports
62 Page Should Contain Profile
63 Page Should Contain Admin
64
65#Click Sample Pages and validate sub Menu
66 #[Documentation] Click Sample Pages
67 #Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
68 #Click Link xpath=//a[@id='parent-item-Sample-Pages']
69 #Element Text Should Be xpath=//a[@title='Collaboration'] Collaboration
70 #Element Text Should Be xpath=//a[@title='Notebook'] Notebook
71 #Click Link xpath=//a[contains(@title,'Collaboration')]
72 #Page Should Contain User List
73 #Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
74 #Click Link xpath=//a[@id='parent-item-Sample-Pages']
75 #Click Link xpath=//a[contains(@title,'Notebook')]
76 #Element Text Should Be xpath=//h1[contains(.,'Notebook')] Notebook
77
78Click Reports and validate sub Menu
79 [Documentation] Click Reports Tab
kishore0fdcc612017-10-09 08:19:36 -050080 #Select frame xpath=.//*[@id='tabframe-xDemo-App']
CHINTAMANI68e98362018-04-10 18:56:38 -040081 Click Link xpath=//a[@id='parent-item-Reports']
82 Element Text Should Be xpath=//a[@title='All Reports'] All Reports
83 Element Text Should Be xpath=//a[@title='Create Reports'] Create Reports
84 Click Link xpath=//a[contains(@title,'All Reports')]
85 Page Should Contain Report search
86 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
87 Click Link xpath=//a[@id='parent-item-Reports']
88 Click Link xpath=//a[contains(@title,'Create Reports')]
89 Page Should Contain Report Wizard
kishore0fdcc612017-10-09 08:19:36 -050090
CHINTAMANI68e98362018-04-10 18:56:38 -040091Click Profile and validate sub Menu
92 [Documentation] Click Profile Tab
93 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
94 Click Link xpath=//a[@id='parent-item-Profile']
95 Element Text Should Be xpath=//a[@title='Search'] Search
96 Element Text Should Be xpath=//a[@title='Self'] Self
97 Click Link xpath=//a[contains(@title,'Search')]
98 Page Should Contain Profile Search
99 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
100 Click Link xpath=//a[@id='parent-item-Profile']
101 Click Link xpath=//a[contains(@title,'Self')]
102 Page Should Contain Self Profile Detail
kishore0fdcc612017-10-09 08:19:36 -0500103
CHINTAMANI68e98362018-04-10 18:56:38 -0400104Click Admin and validate sub Menu
105 [Documentation] Click Admin Tab
106 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
107 Click Link xpath=//a[@id='parent-item-Admin']
108 Element Text Should Be xpath=//a[@title='Roles'] Roles
109 Element Text Should Be xpath=//a[@title='Role Functions'] Role Functions
110 Element Text Should Be xpath=//a[@title='Cache Admin'] Cache Admin
111 Element Text Should Be xpath=//a[@title='Menus'] Menus
112 Element Text Should Be xpath=//a[@title='Usage'] Usage
113 Click Link xpath=//a[contains(@title,'Roles')]
114 Page Should Contain Roles
115 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
116 Click Link xpath=//a[@id='parent-item-Admin']
117 Click Link xpath=//a[contains(@title,'Role Function')]
118 Page Should Contain Role Function
119 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
120 Click Link xpath=.//a[@id='parent-item-Admin']
121 #Select frame xpath=.//*[@id='tabframe-xDemo-App']
122 Click Link xpath=//a[@id='parent-item-Admin']
123 Click Link xpath=//a[contains(@title,'Cache Admin')]
124 Page Should Contain Cache Regions
125 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
126 Click Link xpath=.//a[@id='parent-item-Admin']
127 Click Link xpath=//a[@id='parent-item-Admin']
128 Click Link xpath=//a[contains(@title,'Menus')]
129 Page Should Contain Admin Menu Items
130 Comment Select frame xpath=.//*[@id='tabframe-xDemo-App']
131 Click Link xpath=//a[@id='parent-item-Admin']
132 Click Link xpath=//a[@id='parent-item-Admin']
133 Click Link xpath=//a[contains(@title,'Usage')]
134 Page Should Contain Current Usage
135
136Teardown
137 [Documentation] Close All Open browsers
138 Close All Browsers
kishore0fdcc612017-10-09 08:19:36 -0500139
140*** Keywords ***