frame method

Class: CheckSettingsPlatform: Selenium 4Language: JavaScript SDK:

Select a frame that is a direct descendent of a frame selected previously in the chain.

Syntax

eyes.check(Target.frame(frame).frame(context));
eyes.check(Target.frame(frame).frame(frame_ele, scrollRootElement_ele));
eyes.check(Target.frame(frame).frame(frame_ele));
eyes.check(Target.frame(frame).frame(frame_ele, scrollRootElement_sel));

eyes.check(Target.frame(frame).frame(frame_sel, scrollRootElement_ele));
eyes.check(Target.frame(frame).frame(frame_sel));
eyes.check(Target.frame(frame).frame(frame_sel, scrollRootElement_sel));

eyes.check(Target.frame(frame).frame(frame_str, scrollRootElement_ele));
eyes.check(Target.frame(frame).frame(frame_str));
eyes.check(Target.frame(frame).frame(frame_str, scrollRootElement_sel));

eyes.check(Target.frame(frame).frame(frame_num, scrollRootElement_ele));
eyes.check(Target.frame(frame).frame(frame_num));
eyes.check(Target.frame(frame).frame(frame_num, scrollRootElement_sel));

Parameters

context
Type:
{
  frame: WebElement | Selector | string | number;
  scrollRootElement?: WebElement | Selector;
};
{
  frame: WebElement | Selector | string | number;
  scrollRootElement?: WebElement | Selector;
};

Type definitions

Selector
Used to identify an HTML element defined as |import('selenium-webdriver').Locator|{using:string;value:string}|string|{selector:string;type:string}.
Selector
Used to identify an HTML element defined as |import('selenium-webdriver').Locator|{using:string;value:string}|string|{selector:string;type:string}.
frame_ele
Type:WebElement

A descriptor for the frame.

An element the contains the frame.

scrollRootElement_ele
Type:WebElement [Optional ]

The element or a selector that should be scrolled to access the frame.

An element that should be scrolled to access the frame. The element or a selector that should be scrolled to access the frame.

scrollRootElement_sel
Type:Selector [Optional ]

The element or a selector that should be scrolled to access the frame.

A selector to an element that should be scrolled to access the frame. The element or a selector that should be scrolled to access the frame.

Type definitions

Selector
Used to identify an HTML element defined as |import('selenium-webdriver').Locator|{using:string;value:string}|string|{selector:string;type:string}.
frame_sel
Type:Selector

A descriptor for the frame.

A selector the selects the frame.

Type definitions

Selector
Used to identify an HTML element defined as |import('selenium-webdriver').Locator|{using:string;value:string}|string|{selector:string;type:string}.
frame_str
Type:string

A descriptor for the frame.

The name attribute of the frame.

frame_num
Type:number

A descriptor for the frame.

The index of the frame element as defined by Selenium.

Return value

Type: CheckSettings
The value returned is the object that called the method. You can use it to call other methods supported by the object class.

Remarks

You may only use this method in the chain if the first method in the chain is frame. You may not call it if the first method in the chain is window or region. Call this method multiple times to descend a hierarchy of embedded frames.