MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / getNewWindowHandle

Function getNewWindowHandle

javascript/selenium-webdriver/test/window_test.js:166–173  ·  view source on GitHub ↗
(originalHandles)

Source from the content-addressed store, hash-verified

164 }
165
166 function getNewWindowHandle(originalHandles) {
167 // Note: this assumes there's just one new window.
168 return driver.getAllWindowHandles().then(function (currentHandles) {
169 return currentHandles.filter(function (i) {
170 return originalHandles.indexOf(i) < 0
171 })[0]
172 })
173 }
174})

Callers 1

window_test.jsFile · 0.85

Calls 2

filterMethod · 0.80
getAllWindowHandlesMethod · 0.45

Tested by

no test coverage detected