MCPcopy
hub / github.com/SeleniumHQ/selenium / onSwitchFrame

Function onSwitchFrame

javascript/selenium-webdriver/test/lib/until_test.js:74–84  ·  view source on GitHub ↗
(expectedId)

Source from the content-addressed store, hash-verified

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))

Callers 1

until_test.jsFile · 0.85

Calls 2

buildIdMethod · 0.80
getParameterMethod · 0.45

Tested by

no test coverage detected