-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResource.robot
More file actions
68 lines (57 loc) · 2.55 KB
/
Resource.robot
File metadata and controls
68 lines (57 loc) · 2.55 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
*** Settings ***
Documentation A resource file with reusable keywords and variables.
...
... The system specific keywords created here form our own
... domain specific language. They utilize keywords provided
... by the imported SeleniumLibrary.
Library SeleniumLibrary
Library ExcelLibrary
*** Variables ***
${LandingURL} https://opensource-demo.orangehrmlive.com/web/index.php
${LoginURL} https://opensource-demo.orangehrmlive.com/web/index.php/auth/login
${Browser} chrome
${LoginTitle} OrangeHRM
${Timer} 4
${error messsage} Invalid credentials
${VALID USER} Admin
${VALID PASSWORD} admin123
${DASHBOARD URL} https://opensource-demo.orangehrmlive.com/web/index.php/dashboard/index
*** Keywords ***
Open Browser To Login Page
Open Browser ${LandingURL} ${Browser}
Maximize Browser Window
Login Page Should Be Open
Set Browser Implicit Wait ${Timer}
Login Page Should Be Open
Location Should Be ${LoginURL}
Title Should Be ${LoginTitle}
Input Username
[Arguments] ${Username}
Input Text username ${Username}
Input Password
[Arguments] ${Password}
Input Text password ${Password}
Submit Credentials
Click Button //form/div[3]/button
Login With Invalid Credentials Should Fail
[Arguments] ${username} ${password}
Input Username ${username}
Input Password ${password}
Sleep ${Timer}
Submit Credentials
Sleep ${Timer}
Login Should Have Failed
#Login With Invalid Credentials Should Fail
# [Arguments] @{credentials}
# Input Username ${credentials}[0]
# Input Password ${credentials}[1]
Login Should Have Failed
Element Should Contain //div[@class='oxd-alert-content oxd-alert-content--error']/p ${error messsage}
Log Login is failed and error message is displayed
Read Login Data
[Arguments] ${filepath} ${sheetname} ${rownum} ${colnum}
Open Excel Document ${filepath} 1
Get Sheet ${sheetname}
${data} Read Excel Cell ${rownum} ${colnum}
[Return] ${data}
Close Current Excel Document