Hello Jian, it works well. Thanks.
I think that both methods (selectParentFrameFrom and selectTopFrameFrom) should be posted in the Tellurium APIs (Tellurium User Guide), because there's written: "Tellurium APIs include all methods defined in DslContext". Greetz Thomas On Feb 11, 3:34 pm, [email protected] wrote: > Hi Thomas, > > The Tellurium Frame object provides two methods: > > void selectParentFrame(Closure c){ > c("relative=parent") > } > > void selectTopFrame(Closure c){ > c("relative=top") > } > > That is to say, Tellurium uses selectParentFrame to go back to the > parent frame > and selectTopFrame to go back to the top frame. In DslContext, the > methods that users > should use are as follows, > > def selectParentFrameFrom(String uid) { > WorkflowContext context = WorkflowContext.getDefaultContext() > ui.walkTo(context, uid)?.selectParentFrame() {String loc -> > eventHandler.selectFrame(loc) > } > } > > def selectTopFrameFrom(String uid) { > WorkflowContext context = WorkflowContext.getDefaultContext() > ui.walkTo(context, uid)?.selectTopFrame() {String loc -> > eventHandler.selectFrame(loc) > } > } > > i.e., you should use "selectParentFrameFrom frame_name" and > "selectTopFrameFrom frame_name" > in your UI module. > > Have you tried them? > > Thanks, > > Jian > > On Feb 11, 7:49 am, Thomas Roßberg <[email protected]> wrote: > > > Hello, > > > do you imagine the followed description: Frame A ist the topframe of > > any page. There are two child frames in this frame (Frame A), called > > Frame B and Frame C. The frame, Frame C, has got a inline frame > > (iframe) with its name "centerFrame". I want to test through the > > frames. All Frames are defined in UI module, e.g.: > > > ui.Frame(uid: "Frame A, name: "Frame A) > > ... > > > Steps: > > 1. open any page > > 2. select Frame A (selectFrame "Frame A") > > 3. do any test > > 4. select Frame C (selectFrame "Frame C") > > 5. do any test > > 6. select inline frame (selectFrame "centerFrame") > > 7. do any test > > 8. I want go back to Frame C. The fittest locator is "relative=up" or > > "relative=parent". But Tellurium threw an error: "Error: cannot find > > the top object relative=up" > > > Greetz > > > Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en -~----------~----~----~----~------~----~------~--~---
