Jump to content
Sign in to follow this  
Gyba

Spy tools for AutoIt + webpage automation tutorials

Recommended Posts

Gyba

Hello,

I am new to AutoIt and I am having troubles finding the necessary information when it comes to web pages.  For example, I what to perform a click on a button in a webpage and I found this function: _IELinkClickByIndex ( ByRef $oObject, $iIndex [, $iWait = 1] ). If for a Windows application you can get all necessary information (title, ID, class etc.) using a tool such as AutoIt v3 Window Info, I don't know how to get the information for web pages ($oObject, $iIndex).  Is there any similar tool that can help me?

I had a look in FAQ and found these:

  • au3inf part of AutoIT
  • simplespy in the zip
  • jabsimplespy in examples section of the AutoIt forum
  • control viewer
  • inspect as part of windows SDK
  • VisualUIAVerifyNative.exe as part of windows SDK (8.1)

Which one is the best for getting web pages info, where can I find it and how to use it?

And also if you know some tutorials for beginners which explain how to automate web pages and use IE functions that would be very helpful. I read the help files but I still don't get it :(. 

Thank you.

Share this post


Link to post
Share on other sites
junkew

You find the right faq 31 which tells you where to get. There is not one fits all spy. Just for ie the developer tools in ie fits best.

Search ie.udf in this forum and you get plenty examples. If in future other browsers needed check for iuiautomation , chrome.udf, webdriver

Share this post


Link to post
Share on other sites
Gyba

Ok, I am trying to click the below button:

Quote

<a class="button" style="left:54px; background-color: #999999;" href="javascript:GoToRealm('pki');">login</a>

I am trying to use this AutoIt code:

Quote

 

#include <IE.au3>

$oIE = _IECreate ("http://mypage.com")

_IELinkClickByIndex($oIE, <here I should put the button index - $iIndex>)

 

 

How do I find this $iIndex?

Share this post


Link to post
Share on other sites
jdelaney

Send  F12 at any browser to being up the debugger and DOM explorer.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
junkew

Wel clicking by index is just you start counting by 1 :sweating: but clicking by index is not the best way. Clicking by text is much better.

But you have to use the F12 developer tools or make small helper programs that help you to go through the collections

Read these links carefully thru all _IE* functions

https://www.autoitscript.com/autoit3/docs/libfunctions/_IE_Example.htm

https://www.autoitscript.com/autoit3/docs/libfunctions/

https://www.autoitscript.com/autoit3/docs/libfunctions/_IELinkClickByText.htm

https://www.autoitscript.com/autoit3/docs/libfunctions/_IELinkGetCollection.htm

 

Share this post


Link to post
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
Sign in to follow this  

×