Skip to content

Instantly share code, notes, and snippets.

@yusuiked
Created December 27, 2011 18:16
Show Gist options
  • Save yusuiked/1524671 to your computer and use it in GitHub Desktop.
Save yusuiked/1524671 to your computer and use it in GitHub Desktop.
package module
import org.telluriumsource.dsl.DslContext
class NewUIModule extends DslContext {
public void defineUi() {
ui.Form(uid: "TelluriumDownload", clocator: [tag: "form", method: "GET", action: "list"], group: "true"){
Selector(uid: "DownloadType", clocator: [tag: "select", direct: "true", name: "can", id: "can"])
InputBox(uid: "input", clocator: [tag: "input", type: "text", name: "q", id: "searchq"])
SubmitButton(uid: "Search", clocator: [tag: "input", direct: "true", type: "submit", value: "Search"])
}
}
//Add your methods here
public void searchDownload(String keyword) {
keyType "TelluriumDownload.input", keyword
click "TelluriumDownload.Search"
waitForPageToLoad 30000
}
public String[] getAllDownloadTypes() {
return getSelectOptions("TelluriumDownload.DownloadType")
}
public void selectDownloadType(String type) {
selectByLabel "TelluriumDownload.DownloadType", type
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment