Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate click in internet explorer

Status
Not open for further replies.

silvie

Programmer
Jul 21, 2007
2
0
0
BE
hi,

I'm trying to get info of a certain frame in a website with vba. The problem is that the frame has not got a name to get the value of it. The problem can be solved if i can automate a mouseclick on the webpage in that frame, then i can ask:
a = ie.Document.activeElement.innerText
Then i get the text of the frame.

Does anyone know how to automate a mouseclick?
 
I'm not sure how to automate a mouse click, but if it's the same frame every time couldn't you just access it by number? For example:

window.location.href = "
For i = 0 To window.frames.length - 1
MsgBox window.frames(i).title
Next

would show you the titles - I've never tried what you want to do, but I think the principle would be the same - access the frame by number, not the name you say it doesn't have. I'm curious, let me know if this works for you please. If not, I'll actually dig into it a little further.
 
hi,
It doesn't work. When you open the webpage in frontpage this is the section i need: <TD CLASS="header">
I can get the data only when i click on that frame in the page with activeelement.
 
Can you give me the web address and tell me the frame so I can look at it?
 
silvie,
If the element you want supports the Click event: [tt]object.Click[/tt]

techinvt has you on the right track as it sounds like you need to find the element you want first.

If your looking for a table you should be able to cycle through all the [tt]TABLE[/tt] elements in the Document without determining which [tt]FRAME[/tt] it's in.

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top