Selenium webDriver: switching between <webview> tags


#1

I use Selenium webDriver (groovy) for testing Electron app with multiple “webview” tags included.

For navigation between “webview” instances I use the following code:
browser.driver.switchTo().window(
browser.driver.getWindowHandles()[requiredPage + 1])

Java side “webview” handles look like:
CDwindow-581F9CBE-70B3-4629-AC78-3E00DDBE02A8
CDwindow-D6FF8381-E902-482B-AB34-59202BEF5A55
CDwindow-1BC2C907-9EAA-4770-BCDD-43352C9CF35B
CDwindow-02413329-46FF-4256-95B2-F4ADF86E23E8

But Electron side “webview” IDs look like: 8,12,16,18

Question: how can I find out a Big webview’s identifier on Electron side?
I need to communicate with Groovy which pages are active now.