* Changes the focus of all future commands to another frame on the page. The * target frame may be specified as one of the following: * * - A number that specifies a (zero-based) index into [window.frames]( * https://developer.mozilla.org/en-US/docs/Web/API/Window.frames). * - A {@l
(id)
| 2546 | * when the driver has changed focus to the specified frame. |
| 2547 | */ |
| 2548 | frame(id) { |
| 2549 | let frameReference = id |
| 2550 | if (typeof id === 'string') { |
| 2551 | frameReference = this.driver_.findElement({ id }).catch((_) => this.driver_.findElement({ name: id })) |
| 2552 | } |
| 2553 | |
| 2554 | return this.driver_.execute(new command.Command(command.Name.SWITCH_TO_FRAME).setParameter('id', frameReference)) |
| 2555 | } |
| 2556 | |
| 2557 | /** |
| 2558 | * Changes the focus of all future commands to the parent frame of the |
nothing calls this directly
no test coverage detected