VBAChromeDevProtocol #232
sagi4601-cloud
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Kenneth J Davis/PerditionC
I'm starting a discussion not in the actual intended repository since no discussion tab avaiable in that project.
I have been using selenium basic for a long time, however i needed recently to inject custom js script before page load entirely, which the basic is cant do it. Need to use CDP for that, selenium wire, selenium 4 give that functionallity however i need it in VBA environment (VBA wrapper). Here your solution came to assist.
How do i inject custom js script before page load entirely according to your classes etc. ?
I figured out clsCDP is the one interacting with the CDP which is equivallent to ExecustScript in S.Basic ?
"To inject a JavaScript script using the Chrome DevTools Protocol (CDP) so it runs before the page loads, you use the Page.addScriptToEvaluateOnNewDocument command. his command ensures the script runs in every frame upon creation, even before the page's own scripts start executing."
cdpPage is used for that ?
Sagi
Beta Was this translation helpful? Give feedback.
All reactions