Advertisement
edsherwin

React Select Dropdown List Value

Oct 23rd, 2018
3,097
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Robots 1.83 KB | None | 0 0
  1. *** Settings ***
  2. Test Teardown     Close All Browsers
  3.  
  4. *** Test Cases ***
  5. Select React Dropdown List Value
  6.     Set Selenium Speed    1
  7.     Open Browser    http://202.90.154.152:2007/    chrome
  8.     Maximize Browser Window
  9.     Input Text    //input[@id="formUsername"]    superadmin
  10.     Input Text    //input[@id="formPassword"]    password
  11.     Click Element    //button[@id="sign-in"]
  12.     Maximize Browser Window
  13.     Wait Until Keyword Succeeds    10    10    Click Element    //a[@href="#manageLibrariesDropdown"]
  14.     Wait Until Keyword Succeeds    10    10    Click Element    //a[@href="/governmentagency"]
  15.     Wait Until Keyword Succeeds    10    10    Click Element    //button[@id="govAgencyAddNew"]
  16.     Input Text     //div[@id="govAgencyModal"]//input[@id='govAgencyAddAgencyName']    ginagawa mo
  17.     Input Text     //div[@id="govAgencyModal"]//input[@id='govAgencyAddShortName']    nakatulog na ako
  18.     Input Text    //div[@id="govAgencyModal"]//input[@id='react-select-6-input']    Auth
  19.     Press Key    //div[@id="govAgencyModal"]//input[@id='react-select-6-input']    \\13
  20.     Input Text    //div[@id="govAgencyModal"]//input[@id='react-select-8-input']    Cordillera
  21.     Press Key    //div[@id="govAgencyModal"]//input[@id='react-select-8-input']    \\13
  22.     Input Text    //div[@id="govAgencyModal"]//textarea[@id='govAgencyAddDesc']    pano mo nasabi
  23.     Click Element     //div[@id="govAgencyModal"]//button[@id='govAgencyAddSubmit']
  24.  
  25. *** Keywords ***
  26. React Select Should Be
  27.     [Arguments]    ${loc}    ${ExpectedLabel}
  28.     ${SelectedLabel}=    Get Text    ${loc}
  29.     Should Be Equal    ${SelectedLabel}    ${ExpectedLabel}    React select was expected to be "${ExpectedLabel}" but was ${SelectedLabel}
  30.     ${sample}=    FakerLibrary.Random Element    ('Administration','Authority','Board')
  31.     Return From Keyword    ${sample}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement