*** Settings ***
Library                            SeleniumLibrary


*** Variables ***
${ADDCUSTOMER_HEADER_LABEL}=                        Add Customer
${ADDCUSTOMER_SUBMIT_BUTTON}=                       Submit
${ADDCUSTOMER_EMAILADDRESS}=                        id=EmailAddress
${ADDCUSTOMER_FIRSTNAME}=                           id=FirstName
${ADDCUSTOMER_LASTNAME}=                            id=LastName
${ADDCUSTOMER_CITY}=                                id=City
${ADDCUSTOMER_REGION}=                              id=StateOrRegion
${ADDCUSTOMER_GENDER}=                              gender
${SELECT_CHECK_BOX}=                                promos-name
${VALID_LOGIN_EMAIL}=                               contact@gmail.com
${VALID_LOGIN_PASSWORD}=                            password12345
${INPUT_EMAILADDRESS}=                              jane.doe@gmail.com
${INPUT_FIRSTNAME}=                                 Jane
${INPUT_LASTNAME}=                                  Doe
${INPUT_CITY}=                                      Marseille
${INPUT_REGION}=                                    TX
${INPUT_GENDER}=                                    female

*** Keywords ***
Verify Page Loaded
    Wait Until Page Contains                        ${ADDCUSTOMER_HEADER_LABEL}

Add New Customer
    Fill Custumer Fields
    Click Submit Button

Fill Custumer Fields
    input text                                      ${ADDCUSTOMER_EMAILADDRESS}     ${INPUT_EMAILADDRESS}
    input text                                      ${ADDCUSTOMER_FIRSTNAME}        ${INPUT_FIRSTNAME}
    input text                                      ${ADDCUSTOMER_LASTNAME}         ${INPUT_LASTNAME}
    input text                                      ${ADDCUSTOMER_CITY}             ${INPUT_CITY}
    select from list by value                       ${ADDCUSTOMER_REGION}           ${INPUT_REGION}
    select radio button                             ${ADDCUSTOMER_GENDER}           ${INPUT_GENDER}
    select checkbox                                 ${SELECT_CHECK_BOX}

Click Submit Button
    click button                                    ${ADDCUSTOMER_SUBMIT_BUTTON}