Frame Selector

Frame Attribute

You can use an attribute on the PageObject class to represent iframe elements' content.

This should have a CSS Selector that allows the framework to find the frame, then any control inside this PageObject will be searched inside this frame's body element.

Remember to add the name

Single IFrame

[FrameSelector("[id='frame1']")]
public class framePage : PageObject

Multiple IFrame

// Looking for "frame3", inside "frame2", inside "frame1".
[FrameSelector("[id='frame1']", "#frame2", "[name='frame3']")]
public class framePage : PageObject

Only valid for web technologies.

Last updated