Created
December 27, 2011 18:16
-
-
Save yusuiked/1524671 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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