Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
gresaggr
Posts: 22 Joined: Mon Mar 04, 2019 12:41 pm
Post
by gresaggr » Wed Jul 27, 2022 5:35 pm
Hello.
On my work computer runs fine. On other computers, the click does not work.
Test on Cef 102/97 versions. Windows 10/7
Code: Select all
codeStr :='var aTags = document.getElementsByTagName("span"); var searchText = "Main menu";var found; for (var i = 0; i < aTags.length; i++){if (aTags[i].textContent == searchText) {found = aTags[i];break;}} found.click();';
ChromiumWindow1.ChromiumBrowser.Browser.Mainframe.ExecuteJavaScript(codeStr, 'about:blank', 0);
salvadordf
Posts: 4580 Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:
Post
by salvadordf » Wed Jul 27, 2022 7:51 pm
Open the Console tab in the DevTools to see the JavaScript error.
Chromium updates, fixes or deprecates some JavaScript features in every release. The best way to debug these errors is using the console.
gresaggr
Posts: 22 Joined: Mon Mar 04, 2019 12:41 pm
Post
by gresaggr » Thu Jul 28, 2022 3:53 pm
Try to checking.
Thanks!
gresaggr
Posts: 22 Joined: Mon Mar 04, 2019 12:41 pm
Post
by gresaggr » Mon Nov 14, 2022 1:07 pm
Hello.
On console log error: "File chooser dialog can only be shown with a user activation"
Is it possible to activate dialog for open file?
salvadordf
Posts: 4580 Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:
Post
by salvadordf » Mon Nov 14, 2022 2:05 pm
If you own that web page there seems to be workarounds :
https://codedocu.com/File-chooser-dialog-can-only-be-shown-with-a-user-activation?2821
Search "File chooser dialog can only be shown with a user activation" (with quotes) in Google to see more workarounds.
If you don't control the web page then I would use a browser in OSR mode and then simulate mouse movements and clicks.