(expectedId)
| 72 | const ELEMENT_INDEX = 1234 |
| 73 | |
| 74 | function onSwitchFrame(expectedId) { |
| 75 | if (typeof expectedId === 'string') { |
| 76 | expectedId = WebElement.buildId(expectedId) |
| 77 | } else { |
| 78 | assert.strictEqual(typeof expectedId, 'number', 'must be string or number') |
| 79 | } |
| 80 | return (cmd) => { |
| 81 | assert.deepStrictEqual(cmd.getParameter('id'), expectedId, 'frame ID not specified') |
| 82 | return true |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | it('byIndex', function () { |
| 87 | executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_INDEX)) |
no test coverage detected