Jump to content

Chrome UDF


seangriffin
 Share

Recommended Posts

  • Developers
9 hours ago, raycred said:

Thats not work with windows 10 :(

mmm  First post in the forum telling that something isn't working.
Welcome and in case you have a question we're happy to help but statements like these aren't very helpfull.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

So... if i dont research before post its a problem, if i research is a problem also... :(

Well, i used this udf in windows server 2012, windows 7, with the same script, also with your examples... But when i try in windows 10 doesnt work... maybe because autoit_chrome_native_messaging_host_install.exe... i dont know why but i tried in two different Windows 10 and doesnt work.

 

 

Link to comment
Share on other sites

Just now, raycred said:

So... if i dont research before post its a problem, if i research is a problem also... :(

Well, i used this udf in windows server 2012, windows 7, with the same script, also with your examples... But when i try in windows 10 doesnt work... maybe because autoit_chrome_native_messaging_host_install.exe... i dont know why but i tried in two different Windows 10 and doesnt work.

 

 

With the examples* provided in the first post.

Link to comment
Share on other sites

  • 2 weeks later...

I can't get the Chrome UDF working. I have Windows 7 with Google Chrome up to date : Version 65.0.3325.181 (Build officiel) (32 bits)

Installation on Autoit Extention in developer Mode is ok (screenshot here).

These 3 functions are working :

  • _ChromeShutdown
  • _ChromeStartup
  • _ChromeDocWaitForExistenceByTitle  (or due to timeout ?)

 

Other functions are not working, for example :

  • _ChromeEval("alert('hello world');")

 

_ChromeEval("document.getElementById('content_reflink').innerHTML;")

returns @error:2 --> "there was no response from Chrome"

 

Any ideas how to make this work ?

 
 

Capture.JPG

Link to comment
Share on other sites

  • 3 weeks later...

The alternatives are in faq 31 described. Either uiautomation or webdriver can automate chrome.

A trick to get alert javascript or any other information is to do a sendkeys javascript:.... to the addressbar with that approach the sky is more or less the limit on automation.

 

Link to comment
Share on other sites

  • 1 month later...

I have the same problem - Win7 64, Chrome UDF does not work.
I looked for a problem with Chrome Native Messaging Host
In file  ..User\AppData\Roaming\AutoIt3\Chrome Native Messaging Host\manifest.json
It is necessary to specify the extension id "
AutoIT for Google Chrome" in "allowed_origins"

  "allowed_origins": [
    "chrome-extension://leakmpklghcpopcfgkkjjfhmlkhocjlj/"
  ]

In windows 7 it is not enough, perhaps, security updates lock operation .
But In Windows XP it was launched

2018-06-04 15_55_40-Расширения.png

Link to comment
Share on other sites

autoit-chrome-native-messaging-host.exe does not return any values in the output.txt file. Chrome version: Version 67.0.3396.79 (Official Build) (64-bit)

The Extension which has been provided does not install in the Chrome. Error: Apps, Extensions, and user scripts cannot be added from this website.

Please help...

ChromeExtension.PNG

Link to comment
Share on other sites

I think the best way to interact with the latest version of Chrome is now the WebDriver UDF:

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 1 month later...
On 4/5/2018 at 6:58 AM, sieurcoug said:

I can't get the Chrome UDF working. I have Windows 7 with Google Chrome up to date : Version 65.0.3325.181 (Build officiel) (32 bits)

Installation on Autoit Extention in developer Mode is ok (screenshot here).

These 3 functions are working :

  • _ChromeShutdown
  • _ChromeStartup
  • _ChromeDocWaitForExistenceByTitle  (or due to timeout ?)

 

Other functions are not working, for example :

  • _ChromeEval("alert('hello world');")

 

_ChromeEval("document.getElementById('content_reflink').innerHTML;")

returns @error:2 --> "there was no response from Chrome"

 

Any ideas how to make this work ?

 
 

Capture.JPG

 

The problem appears to be that the installer for the native messaging host is not registering the manifest file in the registry properly.

see: https://developer.chrome.com/extensions/nativeMessaging#native-messaging-host-location

Manually creating the registry entry fixed the problem for me.

# from a cmd prompt or Run command

REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.sean.consoleread" /ve /t REG_SZ /d "C:\Users\<username>\AppData\Roaming\AutoIt3\Chrome Native Messaging Host\manifest.json" /f

 

Link to comment
Share on other sites

  • 7 months later...

IE is no longer supported by the website I need to automate. Some controls (buttons, checkboxes, etc.) are already not functioning properly. I'm mentally preparing myself to rewrite my scripts for another browser.

How is this UDF holding up..?

Link to comment
Share on other sites

On 3/13/2019 at 7:47 PM, XinYoung said:

IE is no longer supported by the website I need to automate. Some controls (buttons, checkboxes, etc.) are already not functioning properly. I'm mentally preparing myself to rewrite my scripts for another browser.

How is this UDF holding up..?

Search For Webdriver Udf

It will accomodate all browsers(probably) (Chrome+FF+Opera+Safari) and no  more rewrite of scripts

Link to comment
Share on other sites

  • 3 weeks later...

Hola!

Currently I have Windows 10, version 1809,  I'm also running Chrome version 73.0.3683.86 and work correctly by only ensuring that after installing "autoit_chrome_native_messaging_host_install" and have the correct id of the Chrome extension to be used in the manifest file:

😄 \ Users \ <User> \ AppData \ Roaming \ AutoIt3 \ Chrome Native Messaging Host \ manifest.json

"allowed_origins": [

    "chrome-extension://leakmpklghcpopcfgkkjjfhmlkhocjlj/"

  ]

To know your extension id you must enable the developer mode and it immediately appears, after that you update the manifest and everything will work fine.

I hope it helps, greetings.

Link to comment
Share on other sites

Hi Seangriffin,

I am using your "Chrome UDF for AutoIT 1.0" to try to automate a daily process on Chrome which the vendor website is stick to.

I made a very good progress. THANK YOU!

Now I have some challenges: 

1.  Cannot actually change the value of DatePicker on the web page even though the text is changed correctly. I used _ChromeObjSetValueByName("EndDate", "1/3/2019")

2. One checkbox on the web page only has ID but no name. I need to check it. There is function called _ChromeInputSetCheckedWithValueByName() but no _ChromeInputSetCheckedWithValueById().

3. How to click on a specific <nav> <ul> <li> menu item ?

Do you have new version for  "Chrome UDF for AutoIT"?

Thanks!

 

 

Link to comment
Share on other sites

  • 2 weeks later...

“AutoIT for Google Chrome.crx” and ”autoit_chrome_native_messaging_host_install.exe“,

For some reason (such as network Forbidden), I can't download the required plugins or extensions here. Which friends can upload them to the "https://github.com/" website? Thanks.....

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...