PerditionC / VBAChromeDevProtocol

VBA (Excel) based wrapper for Chrome Developer Protocol (CDP) - sorta a VBA version of Puppeteer/Selenium
https://PerditionC.github.io/VBAChromeDevProtocol/
MIT License
60 stars 11 forks source link

Can't make it work. cldCDP.launch() - Error. #2

Closed XaverKupfer closed 2 years ago

XaverKupfer commented 2 years ago

Haven't been able to make any of the examples of Examples.xlsm work.

Using Windows 10 and 64-bit Excel.

Any of them finish with this immediate window message:


Failed to write CDP message! {"method":"Target.setDiscoverTargets","params":{"discover":true}, "id":2}

cldCDP.launch() - Error: Error defined by application or object

When all browsers are closed, nothing happens (only the mentioned immediate window message). When only Chrome or only Edge is running, no other browser starts and only the mentioned immediate window message appears. When Chrome and Edge are running, FireFox starts and finally the mentioned immediate window message appears.

PerditionC commented 2 years ago

What is the full path to the browser? My guess is the hard coded paths aren't correct. Additional debug messages may need to be added, but let me know so we can check the easy possible cause first.

XaverKupfer commented 2 years ago

You found it!

CDP Addin.xlam _ browsers module :

Private Const pathEdge As String = "C:\Program Files(x86)\Microsoft\Edge\Application\" Private Const pathChrome As String = "C:\Program Files(x86)\Google\Chrome\Application\" Private Const pathFirefox As String = "C:\Program Files\Mozilla Firefox\"

I changed them to the actual paths and everything looks to work like a charm!.

Thank you!