forked from Richaguptatrainer/CRT-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathcommon.robot
More file actions
43 lines (32 loc) · 1.65 KB
/
common.robot
File metadata and controls
43 lines (32 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
*** Settings ***
Library QWeb
Library QForce
Library String
*** Variables ***
${username} YOUR USERNAME HERE
${login_url} https://YOURDOMAIN.my.salesforce.com # Salesforce instance. NOTE: Should be overwritten in CRT variables
${home_url} ${login_url}/lightning/page/home
*** Keywords ***
Setup Browser
Set Library Search Order QWeb QForce
Open Browser about:blank ${BROWSER}
SetConfig LineBreak ${EMPTY} #\ue000
SetConfig DefaultTimeout 20s #sometimes salesforce is slow
End suite
Set Library Search Order QWeb QForce
Close All Browsers
Login
[Documentation] Login to Salesforce instance
Set Library Search Order QWeb QForce
GoTo ${login_url}
TypeText Username ${username} delay=1
TypeText Password ${password}
ClickText Log In
Home
[Documentation] Navigate to homepage, login if needed
Set Library Search Order QWeb QForce
GoTo ${home_url}
${login_status} = IsText To access this page, you have to log in to Salesforce. 2
Run Keyword If ${login_status} Login
ClickText Home
VerifyTitle Home | Salesforce