TrevorSundberg / puppeteer-in-electron

Use puppeteer to test and control your electron application.
MIT License
342 stars 51 forks source link

support BrowserView #13

Closed musou1500 closed 4 years ago

musou1500 commented 4 years ago

This PR adds support for BrowserView by replacing browserWindow.loadURL by webContents.loadURL. (BrowserView does not have loadURL method)

TrevorSundberg commented 4 years ago

Great PR. I think in the future I might just make it take a WebContents, although that would be a breaking change so maybe all three.

TrevorSundberg commented 4 years ago

I'm deploying v3.0.2 now, should be up in a few minutes.

musou1500 commented 4 years ago

@TrevorSundberg Thank you! I considered about taking WebContents as argument. but I did not it because I thought webContents may not recognized as page by puppeteer. actually, webview(has webContents property) was not recognized as regular pages until puppeteer v3.2.0.