Skip to content

Instantly share code, notes, and snippets.

@nickrobinson
Created June 6, 2014 14:21
Show Gist options
  • Save nickrobinson/090c4081d53c523d430c to your computer and use it in GitHub Desktop.
Save nickrobinson/090c4081d53c523d430c to your computer and use it in GitHub Desktop.
ExtJS_Resource
*** Settings ***
*** Variables ***
${currentWindow} ${EMPTY}
*** Keywords ***
Click Item By Text
[Arguments] ${text} ${windowName}=${currentWindow}
Click Element //div[@id = '${windowName}']//div[contains(text(),'${text}')]
Click Button by Label
[Arguments] ${label} ${windowName}=${currentWindow}
Click Element //div[@id = '${windowName}']//span[contains(text(),'${label}')]
Click Arrow
[Arguments] ${direction} ${windowName}=${currentWindow}
[Documentation] Direction should be left, right, up, or down
Click Element //div[@id = '${windowName}']//span[contains(@class, \ 'icon-arrow-${direction}')]
Click Button and Check for Error
[Arguments] ${label} ${windowName}=${currentWindow}
Click Element //div[@id = '${windowName}']//span[contains(text(),'${label}')]
Run Keyword And Expect Error Successful Save Wait Until Page Contains Element //div[contains(@class, \ 'x-form-invalid-icon')] 3 Successful Save
Click Checkbox by Label
[Arguments] ${label} ${windowName}=${currentWindow}
Click Element //div[@id = '${windowName}']//input[contains(@class, \ 'x-form-checkbox')]
Set Active Window
[Arguments] ${currentWindowName}
${currentWindow}= ${currentWindowName}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment