Projekt

Obecné

Profil

Stáhnout (1.26 KB) Statistiky
| Větev: | Tag: | Revize:
1 50b2342e Stanislav Král
*** Settings ***
2
Library   Browser
3
4
*** Variables ***
5
${url}  http://localhost:5000
6
${common_name}  Foo Bar CA
7
${common_name_field}    xpath=//input[@id='subject_CN']
8
${created_certificate_link}    xpath=//table//td[1]/a
9
${delete_button}    xpath=//button[contains(@class, 'certificate-control') and text()="Delete"]
10
${delete_button_modal}    xpath=//div[@id="deleteModal"]//button[text()="Delete"]
11
${table_rows}   xpath=//div[@id="certificateListingPage"]//table/tbody/tr
12
13
14
*** Test Cases ***
15
Example Test
16
    Setup Homepage
17
    Get Text    h1    contains    Certificate Listing
18 c1a7a041 Stanislav Král
    Certificate Table Is Empty
19 50b2342e Stanislav Král
    Click   "Create certificate"
20
    Get Text    h1    contains    Create Certificate
21
    Fill Text   ${common_name_field}    ${common_name}
22
    Click   "Create certificate"
23
    Get Text    h1    contains    Certificate Listing
24
    Get Element Count     ${table_rows}   ==  1
25
    Get Text    ${created_certificate_link}  ==     ${common_name}
26
    Click   ${created_certificate_link}
27
    Click   ${delete_button}
28
    Click   ${delete_button_modal}
29
    Get Text    h1    contains    Certificate Listing
30
    Get Element Count     ${table_rows}   ==  0
31
32
33
*** Keywords ***
34
Setup Homepage
35 c1a7a041 Stanislav Král
    New Page    ${url}
36
37
Certificate Table Is Empty
38
    Get Element Count     ${table_rows}   ==  0