Jump to content

Embed & automate chrome help


 Share

Recommended Posts

Hi,

I have this basic code snippet which loads google in my GUI and clicks the 'Im Feeling Lucky' Button. - This works fine by the way.

_IENavigate($oIE, "https://www.google.co.uk")
_IEAction($oIE, "stop")
Local $oSubmit = _IEGetObjByName($oIE, "btnI")
_IEAction($oSubmit, "click")
_IELoadWait($oIE)

Please could anyone tell me how I'd do the above but using chrome as the browser instead of IE? I know there is a Chrome UDF but I have no idea how to use it. Or is there another way to do this?

Thanks

am632

Link to comment
Share on other sites

  1. Chrome UDF
  2. IUIAutomation FAQ 31
  3. WebDriver UDF by @Danp2

 

There are several other ways to do this outside of AutoIt but you would have to learn other languages and products

I use WinAppDriver on Windows 10 with Appium. WinAppDriver projects use Selenium libraries in C# or whatever .Net language you want, or Java if you install the full Appium (I just use the Windows one with no gui). this solution is for pure testing though. You need to modify Win10 or greater by enabling the Developer Mode and then installing appium from cmdline and the WinAppDriver driver. Requires Win10 or greater (Sever 2016, etc). You can test any windows app for free. It's now my test harness. Uses MSTest libraries too for Unit and all testing purposes.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

I looked at the Chrome UDF but when I saw it said it requires an additional chrome extension and host application I stopped reading. My question was Is there another way to do this? I don't want to use additional 3rd party tools so if this can't be done in AutoIt in a similar way to _IE functions - without additional software or extensions then I'll just use iMacros.

Link to comment
Share on other sites

you do whatever you want. I gave you an entire list of ways. too bad you don't like any of them. You could do this with IUIAutomation but you would have to read and learn. I guess you will have to finally learn how to use the Forum Search functionality.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

If IUIAutomation is the only way to do this in AutoIt without needing 3rd party software then thanks for providing this, I'll have a look at it. But all your other list really has nothing to do with AutoIt. I appreciate your help but your original reply came across as a bit rude which you have since edited. Thanks for pointing me in the direction of IUIAutomation though.

Link to comment
Share on other sites

WebDriver is AutoIt but I believe you need to install a driver, which you are against. all three on list were AutoIt related and ways to do it with AutoIt. Your initial comment was ridiculous! You knew about the UDF but had no idea how to use it, then you tell me it's because of extensions and whatnot. If you had even done a little research on the subject with google you would have come up with my list right quick.

automate chrome autoit

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

WinAppDriver, Appium, Selenuim - C#, .Net & Java are your solution to my AutoIt question? Well I got all the help I needed here so don't bother replying back 'cos you clearly can't add any additional value to your helpful answer.

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...