switchToFrame(driver, frameId, timeopt)
switchToFrame
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
driver |
Object |
webdriver object of web browser. |
|
frameId |
String |
is the id of iFrame whose webElement we want to access. |
|
time |
Number | <optional> |
time is optional.This parameter represent for how much time user want to wait for frameID. After time finish it returns error. |
Example
Examples usage of switchToFrame
switchToFrame(driver).then(() => {
// It will return the current title of page.
}).catch((error) => {
// handle error
});