Jump to content

Links in HTML DIV's


Recommended Posts

Hi all,

Apologies if something similar has been asked already - I've had a good look through, but can't find anything specific. I'm also fairly new to AutoIt scripting and can't find anything in the IE.AU3 help that does what I need.

I am trying to automate a web-based system we use and need to be able to click links that are contained within HTML DIVs. The problem is that they are not standard DIVs and links and have a lot of extra information. An example of one such is:

<div abID=123456 abtype="something" abBtn="aButtonType1" class="something1 something2 something3"><a href="javascript:" class="btn" title=""></a><span>Link Text</span></div>

As you can see, it's a bit messy and I'm stuck with how it's written. I have tried using AutoIt to search for "Link Text", but this doesn't work. Also, as there is no real href address for each link, I can't search on that either, plus there can be numerous links generated this way on each page. The only thing I can see that changes individually for each link is the value of abBtn or abID.

Does anyone know a way to search for the abBtn or abID value and select the link text that follows?

Thanks in advance for any help you can provide.

Link to comment
Share on other sites

I just updated the UDF in my signature...as long as you know the XPATH, you can return the HTML DOM object(s) to an array.

<-- ha, no longer 'mass spammer'

Edited by jdelaney
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.
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...