John.Ji...@gmail.com
unread,Oct 28, 2008, 10:44:45 PM10/28/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tellurium-users
Hi all,
We added the Frame object for Frame or IFrame UI elements. The Frame
object is a container type
and the following DSLs can be applied to the Frame object,
selectFrame UID
selectParentFrameFrom UID
selectTopFrameFrom UID
getWhetherThisFrameMatchFrameExpression UID, target
waitForFrameToLoad timeout
One example UI module is as follows,
ui.Frame(uid: "SubscribeFrame", name: "subscrbe"){
Form(uid: "LoginForm", clocator: [name: "loginForm"]){
InputBox(uid: "UserName", clocator: [id: "username", type:
"text"])
InputBox(uid: "Password", clocator: [id: "password", type:
"password"])
Button(uid: "Login", clocator: [type: "image", class: "login"])
CheckBox(uid: "RememberMe", clocator: [id: "rememberme"])
}
}
The actual script looks as follows,
selectFrame "SubscribeFrame"
uncheck "SubscribeFrame.LoginForm.RememberMe"
keyType "SubscribeFrame.LoginForm.UserName", username
keyType "SubscribeFrame.LoginForm.Password", password
click "SubscribeFrame.LoginForm.Login"
selectTopFrameFrom "SubscribeFrame"
waitForPageToLoad 30000
Also be aware that you should use multiple windows to test IFrame,
i.e., set the useMultiWindows attribute to be true in the
TelluriumConfig.groovy file as follows,
tellurium{
embeddedserver {
......
useMultiWindows = true
......
}
}