Go to my profile page thru the user actions menu.
Click link First Last
Click link My profile
Location should be ${APP_URL}/#me
Check if page contains user info.
Page should contain element link=name@domain.com
Page should contain element link=example
Page should contain Mobile phone: +000 (00) 000-0000
Page should contain Home phone: +000 (00) 000-0001
Page should contain Fax phone: +000 (00) 000-0002
Page should contain Office phone: +000 (00) 000-0003
Page should contain Time zone: Europe/Kiev
Click on link in state block.
${text}${state}
Click on ${text} in ${state} state and wait effect
Check if link is visible.
${name}
Element Should Be Visible link=${name}
Check if link is not visible.
${name}
Element Should Not Be Visible link=${name}
Go to application login page.
Reload Page Until Location should contain login
Page should contain BB
Title should be BB
Check if heading contain text.
${heading}
Page should contain element xpath=//h1[contains(text(),${heading})]
Waiting for loading data from server.
Wait Until Keyword Succeeds 10 sec 0.1 sec Element Should Not Be Visible css=.alert
Switch state filter, wait, click on link in state block and wait.
${text}${state}
Click link ${state}
Wait Until Keyword Succeeds 5 sec 0.1 sec Element Should Be Visible xpath=//*[@id="projects_${state}"]//a[contains(text(),${text})]
Click element xpath=//*[@id="projects_${state}"]//a[contains(text(),${text})]
Wait Until Keyword Succeeds 5 sec 0.1 sec Element Should Be Visible xpath=//*[@id="projects_${state}"]//*[@id="projects_${state}_${text[-2]}"]//a
Start application.
${PRO_TEST} = Get Environment Variable PRO_TEST False
Run Keyword If '${PRO_TEST}' != 'True' Start Process bin/dev_appserver app --skip_sdk_update_check ELSE Start Process bin/dev_appserver app --skip_sdk_update_check --auth_domain=Production
Close browser and report test status.
Close All Browsers
Report test status
Stop application.
Run pkill -f dev_appserver
${out} = Read Process Output
Append to file app.log ${out}
Stop All Processes
Reload page 10 times until condition wil be true.
: FOR ${try} IN RANGE 10
\ ${status}= Run Keyword And Ignore Error @{condition}
\ ${raise error}= Set Variable If ${status}[0]=='PASS' 'False' 'True'
\ Run Keyword If ${status}[0]=='PASS' Exit For Loop
\ Sleep 1
\ Reload Page
Run Keyword If ${raise error}=="True" Fail "${condition}"
Login by test user.
Reload Page Until Location should contain login
Input Text name=subdomain test
Input Text name=username test
Input Password name=password test
Click button Log in
Sleep 2
Wait Until Page Contains First Last 15 sec
Prepare environment and start browser.
${BROWSER} = Get Environment Variable ROBOT_BROWSER Firefox
${REMOTE_URL} = Get Environment Variable ROBOT_REMOTE_URL ${REMOTE_URL}
${BUILD_MANUAL} = Evaluate random.randint(0,10**6) random
${BUILD_NUMBER} = Get Environment Variable ROBOT_BUILD_NUMBER manual-${BUILD_MANUAL}
${DESIRED_CAPABILITIES} = Get Environment Variable ROBOT_DESIRED_CAPABILITIES platform:Linux
${BUILD_TAGS} = Evaluate " ".join(${TEST_TAGS})
${BUILD_INFO} = Set variable build:${BUILD_NUMBER},name:${TEST_NAME},tags:${BUILD_TAGS},public:public
Open browser ${APP_URL} ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES},${BUILD_INFO}
Run keyword unless '${REMOTE_URL}' == '' Run keyword and ignore error Set session id
Get session id and set variable.
Keyword should exist Get session id
${SESSION_ID} = Get session id
Set test variable ${SESSION_ID} ${SESSION_ID}
Report test status to saucelabs.
Run keyword unless '${SESSION_ID}' == '' Report sauce status ${SESSION_ID} ${TEST_STATUS}
Given an bb-classic app
When click on "Time" link in navbar
Then wait for data loading
Given an bb-classic app
When click link Name of #0
And click on "Time" in projectnav
Then wait for data loading
user can add time entry
Wait Until Page Contains Element css=tr.addtime button.add
Input Text css=tr.addtime [name="description"] added description
Click Button css=tr.addtime button.add
added item should be present
Wait Until Page Contains added description
user can edit time entry
Wait Until Page Contains Element css=tr[data-id="0"] button.edit
Click Button css=tr[data-id="0"] button.edit
Wait Until Page Contains Element css=tr.edittime[data-id="0"] [name="description"]
Input Text css=tr.edittime[data-id="0"] [name="description"] edited description
Click Button css=tr[data-id="0"] button.save
edited item should be present
Wait Until Page Contains edited description
user can delete time entry
Wait Until Page Contains Element css=tr[data-id="0"] button.remove
Click Button css=tr[data-id="0"] button.remove
deleted item should not be present
Page should not contain edited description
sort time entries by date
Click Element xpath=//table/thead/tr/th[contains(text(), "date")]
time entries must be sorted
Page should contain 2012-12-24
Page should not contain 2001-01-01
Given an bb-classic app
When click on "To-Dos" link in navbar
Then wait for data loading
And heading should be "My to-dos"
Given an bb-classic app
When click link Name of #0
And click on "To-Dos" in projectnav
Then wait for data loading
user can add todo list
Click button Add an item
Input Text todoName added todo list
Input Text todoDescription added descrition
Click Button css=button.add
added item should be present
Wait Until Page Contains added todo list
Wait Until Page Contains added descrition
user can edit todo list
Click Element css=.todolist.edititem[data-id="30"]
Input Text todoName30 edited todo list
Input Text todoDescription30 edited descrition
Click Button css=button.save
edited item should be present
Wait Until Page Contains edited todo list
Wait Until Page Contains edited descrition
user can delete todo list
Click Element css=.todolist.removeitem[data-id="30"]
deleted item should not be present
Page should not contain edited todo list
Page should not contain edited description
user can add todo item
Click button Add an item
Input Text todoContent added todo item
Click Button css=button.add
added item should be present
Wait Until Page Contains added todo item
user can edit todo item
Click Element css=.todo.edititem[data-id="30"]
Input Text todoContent30 edited todo item
Click Button css=button.save
edited item should be present
Wait Until Page Contains edited todo item
deleted item should not be present
Page should not contain edited todo item
Given an bb-classic app
When click link Name of #0
And click on "Calendar" in projectnav
Then wait for data loading
user can edit calendar entry
Wait Until Page Contains Element css=.edititem[data-id="0"]
Click Element css=.edititem[data-id="0"]
Wait Until Page Contains Element css=.editcalendar[data-id="0"] [name="title"]
Input Text css=.editcalendar[data-id="0"] [name="title"] edited title
Click Button css=[data-id="0"] button.save
edited item should be present
Wait Until Page Contains edited title
user can delete calendar entry
Wait Until Page Contains Element css=.removeitem[data-id="0"]
Click Element css=.removeitem[data-id="0"]
deleted item should not be present
Page should not contain edited title
Calculate the exact difference between two images.
Parameters: |
|
---|
Example:
Compare screenshot to base base_screenshot.jpg
Get session id
Returns: | session id |
---|---|
Return type: | string |
Example:
${SESSION_ID} = Get Session Id
Report test status to Sauce service
Parameters: |
|
---|---|
Returns: | request status code |
Return type: | int or string |
Example:
Report sauce status ${SESSION_ID} ${TEST_STATUS}