-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettingsUserInfo.robot
76 lines (61 loc) · 2.81 KB
/
SettingsUserInfo.robot
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
69
70
71
72
73
74
75
76
*** Settings ***
Library SeleniumLibrary
*** Variables ***
${FIRST_NAME_LOCATOR} css:input#mat-input-3
${URL_FIELD_LOCATOR} css:input#mat-input-8
${MIDDLE_NAME_LOCATOR} css:input#mat-input-4
${LAST_NAME_LOCATOR} css:input#mat-input-5
${BIOGRAPHY_LOCATOR} css:textarea#mat-input-10
*** Keywords ***
Enter First Name
[Arguments] ${first_name}
Wait Until Element Is Enabled ${FIRST_NAME_LOCATOR}
Input Text ${FIRST_NAME_LOCATOR} ${first_name}
Enter Last Name
[Arguments] ${last_name}
# Wait Until Element Is Enabled css:input#mat-input-5
Input Text ${LAST_NAME_LOCATOR} ${last_name}
Enter Middle Name
[Arguments] ${middle_name}
# Wait Until Element Is Enabled css:input#mat-input-5S
Input Text ${MIDDLE_NAME_LOCATOR} ${middle_name}
Enter URL
[Arguments] ${url}
Input Text ${URL_FIELD_LOCATOR} ${url}
Enter Company
[Arguments] ${company_name}
Input Text css:input#mat-input-9 ${company_name}
Enter Biography
[Arguments] ${biography}
Input Text ${BIOGRAPHY_LOCATOR} ${biography}
Update User Profile
Click Element css:form button
Wait Until Page Contains Element css: form button[disabled='true']
# Sleep 5s
# ASSERTIONS
Company Name Should Be
[Arguments] ${company_name}
Wait Until Element is Visible css:input#mat-input-9
# ${tmp}= Execute Javascript return document.querySelector('#mat-input-9').value
Wait For Condition return document.querySelector('#mat-input-9').value == '${company_name}';
# Element Should Contain css:input#mat-input-9 Co_${RANDOM_MARKER_STRING}
First Name Should Be
[Arguments] ${first_name}
Wait Until Element is Visible ${FIRST_NAME_LOCATOR}
Wait For Condition return document.querySelector('${FIRST_NAME_LOCATOR.replace('css:' , '' , 1)}').value == '${first_name}';
URL Should Be
[Arguments] ${url}
Wait Until Element is Visible ${URL_FIELD_LOCATOR}
Wait For Condition return document.querySelector('${URL_FIELD_LOCATOR.replace('css:' , '' , 1)}').value == '${url}';
Middle Name Should Be
[Arguments] ${middle_name}
Wait Until Element is Visible ${MIDDLE_NAME_LOCATOR}
Wait For Condition return document.querySelector('${MIDDLE_NAME_LOCATOR.replace('css:' , '' , 1)}').value == '${middle_name}';
Last Name Should Be
[Arguments] ${last_name}
Wait Until Element is Visible ${LAST_NAME_LOCATOR}
Wait For Condition return document.querySelector('${LAST_NAME_LOCATOR.replace('css:' , '' , 1)}').value == '${last_name}';
Biography Should Be
[Arguments] ${biography}
Wait Until Element is Visible ${BIOGRAPHY_LOCATOR}
Wait For Condition return document.querySelector('${BIOGRAPHY_LOCATOR.replace('css:' , '' , 1)}').value == '${biography}';