ViciousXUSMC

IE Automation Resources

3 posts in this topic

I sort of get a break from "things I have to do" and can do a bit of "things I want to do" for scripting for a bit :)

One thing that would be infinitely useful that I really need to get under my belt is internet/website automation.

I used to use this heavily years ago when working helpdesk before I converted over to AutoIT (was using the "other guys" stuff back then)

IE being the easiest to work with I would assume (even though its not a browser I use)

I google/search and poke in and out of various threads to learn some of it, but I had to ask do we have like a be all end all thread or resource that really shows how to figure this stuff out?  An example would be opening a page and then finding all the links/buttons/forms to interact with.  I am currently doing that with a For loop using one of the GetCollection type of functions, but it could be easier to look at the page source or maybe even have a tool like the Autoit Window Info tool that can simply mouse over things but I have not found the information to point to these techniques/tools. 

Any tips/tricks, links, etc I can get would be a good help to start me in the right direction.

 

Regards,

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Yeah, I looked at that a few times and every time I am way over my head :(

Last time somebody showed me that it was in my thread about Automating the Steam GUI and I tried and got as far as having it activate the Steam Window lol.  Maybe it will be easier with an IE browser.  I'll have to give it a shot again.

Edited by ViciousXUSMC

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

  • Similar Content

    • tommytx
      By tommytx
      I have been experiment for months trying to find a way to be able to like script the find button to find some text and click on that text or something nearby.
      Is this possible?  When the search hilites the text of course this is not where the cursor is so you cannot command a click at that point.   I can get the coordinates of any point and go there and click... but I cannot find the coordinates of a piece of text i have searched up and click that..
      Thanks
       
    • jonson1986
      By jonson1986
      Hello I'm trying to translate few text using below code, I found it working previously couple of months ago but Now these days it's not working at all and I'm getting below errors when I run the script and Array display at the end of text also not able to show any translated text instead of value 0 & 1;
      --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (gt-res-data)
      --> IE.au3 T3.0-2 Error from function _IEPropertyGet, $_IESTATUS_InvalidDataType
      Here is code,
      #include <IE.au3> #include <Array.au3> Local $tag="* # * # *" Local $oIE=_IECreate("https://translate.google.com/#auto/es") Local $oForm=_IEFormGetCollection($oIE,0) Local $oQuery=_IEGetObjByName($oForm,"text") _IEFormElementSetValue($oQuery, $tag & @CR & "Hello World" & @CR & "This is a test" & @CR & $tag) _IEFormSubmit($oForm) _IELoadWait($oIE) Local $oText=_IEGetObjById($oIE,"gt-res-data") $lines=StringSplit(_IEPropertyGet($oText,"innerText"),@CRLF,1) _IEQuit($oIE) _ArrayDelete($lines,_ArraySearch($lines,$tag,1,0,0,1,0) & "-" & $lines[0]) _ArrayDelete($lines,"1-" & _ArraySearch($lines,$tag,1,0,0,1,1)) $lines[0]=UBound($lines)-1 _ArrayDisplay($lines)  
    • smellyfingers
      By smellyfingers
      Hey, i hope someone can point me in the right direction, i have a page with tables, inside i have TD,TR,INPUT tags, the input tags is buttons and i need to click on one of theese buttons but they have the same value and type so the only way that i am going to know that it's the correct button is to find out the name of the innerhtml of the TD before (the parent node) because the input comes after, like this
      <TABLE> <TR> <TD> Name of the td </TD> <TR> <TD colSpan=3<INPUT> value=my button type=button</INPUT></TD> <TR> <TD> Other name of a td </TD> <TR> <TD colSpan=3<INPUT> value=my button type=button</INPUT></TD> <TR> I know how to find all td's and inputs but not (in a loop) look for the td's and once it has found it click on the corresponding or "closest" input, maybe a nested loop?
      I made a for loop using _IETagnameGetCollection($ie,"TD") and after it found the TD i tried looking for nextSibling but that might be impossible with INPUT perhaps?
    • oHenry
      By oHenry
      Hi,
      I would like to share this simple project which aims to be a first approach in order to use AutoIt as scripting language for mobile automation (Android).
      This project is an ImperiusGeorge client for mobile test automation that support native Android apps. 
      You can find more information at https://ohtejera.github.io/ImperiusAutoIt and here's the link to the project on Github: https://github.com/ohtejera/ImperiusAutoIt
      Best regards.
      Henry
    • Faalamva
      By Faalamva
      Hello,
      Let's take a simple example to illustrate my case.
      I open a webpage with the command _IECreate and I parse all its elements :
      #include <IE.au3> $oIE = _IECreate("http://www.york.ac.uk/teaching/cws/wws/webpage1.html") $oElements = _IETagNameAllGetCollection($oIE) For $oElement In $oElements ConsoleWrite("Tagname: " & $oElement.tagname & @CRLF & "Id: " & $oElement.id & @CRLF & "InnerText: " & $oElement.innerText & @CRLF & "--------------------------------" & @CRLF) Next Now let's imagine I simulate a click with MouseClick to the link "lesson two" at the bottom of this webpage. A new webpage will open :
      http://www.york.ac.uk/teaching/cws/wws/webpage2.html
      I'd like to get the elements (tagname, id, innertext) of this new webpage, just like I got them for the first webpage. But for this, I presume I would have to get a new $oIE2 Object variable of an InternetExplorer.Application, in order to be able to use the _IETagNameAllGetCollection once again.
      How am I supposed to do this ?
      Thank you !