Classes
Methods
(async) toFrame(id)
Switches to a frame identified by its ID.
Parameters:
Name | Type | Description |
---|---|---|
id | string | | The ID of the frame. |
Throws:
- Throws an error if switching to the frame fails.
- Type
- Error
(async) toFrameBySelector(selector)
Switches to a frame identified by a CSS selector.
Parameters:
Name | Type | Description |
---|---|---|
selector | string | The CSS selector of the frame element. |
Throws:
- Throws an error if the frame is not found or switching fails.
- Type
- Error
(async) toFrameByXpath(xpath)
Switches to a frame identified by an XPath.
Parameters:
Name | Type | Description |
---|---|---|
xpath | string | The XPath of the frame element. |
Throws:
- Throws an error if the frame is not found or switching fails.
- Type
- Error
(async) toNewTab(urlopt)
Opens a new tab and optionally navigates to a URL.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url | string | <optional> | Optional URL to navigate to in the new tab. |
Throws:
- Throws an error if opening a new tab fails.
- Type
- Error
(async) toNewWindow(urlopt)
Opens a new window and optionally navigates to a URL.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url | string | <optional> | Optional URL to navigate to in the new window. |
Throws:
- Throws an error if opening a new window fails.
- Type
- Error
(async) toParentFrame()
Switches to the parent frame of the current frame.
Throws:
- Throws an error if switching to the parent frame fails.
- Type
- Error
(async) toWindow(name)
Switches to a window identified by its name.
Parameters:
Name | Type | Description |
---|---|---|
name | string | The name of the window. |
Throws:
- Throws an error if switching to the window fails.
- Type
- Error