longvh211 / Chromium-Automation-with-CDP-for-VBA

A method to directly automate Chromium-based web browsers, such as Chrome, Edge, and Firefox, using VBA for Office applications by following the Chrome DevTools Protocol framework.
MIT License
44 stars 4 forks source link

Issue with Javascript Click interaction #28

Open Tryingmyverybest opened 3 months ago

Tryingmyverybest commented 3 months ago

Hi Longvh211

First of all, would like thank you so much for your work here so far. My org has decided that usage of selenium must cease and hence i have explored alternatives to scripts written using selenium to automate certain web applications in microsoft edge

So far I am able to navigate, get innertext/values etc from the codes you have written. However, when it comes to clicking certain buttons on the webpage, the script recognizes the element but the click failed to occur. This seems to work for some and not others.

I am wondering if you can propose an alternative using Input.dispatchMouseEvent as described in the chrome devtools protocol site? I read that this was done instead of the javascript click method currently used? This was explored in other projects as an alternative but I am unable to adapt them together with the scripts you have written, which is working fantastic so far.

Thank you! Regards GL

longvh211 commented 3 months ago

Hi! Thanks for the comment. I myself have been using it in my organization totally replacing Selenium without facing this kind of problem. I am very interested in learning more about your case as it seems there is something unique about that button element that I have not covered in the framework.

That said, would you be able to reproduce the issue somewhere so I can test and figure out?