Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Internet Explorer Document Title

$
0
0

Hello, everyone,

I have been working on a script that automatically clicks on some buttons and links in Internet Explorer. One of these buttons opens up a new tab. So I would need my script to switch to that new tab before it looks for the next button/link/selection/text box.

I have been trying to google a way to do this for a while, and everyone seems to say something about referring to the Document.Title of each Window.

So to test out whether this will work for me, I created this simple code in a VBS file.

Option Explicit
Dim IE

For Each IE in CreateObject("Shell.Application").Windows
	MsgBox IE.Document.Title
Next

When I run this script, it immediately returns the error "Object doesn't support this property or method 'Document.Title'"

What am I doing wrong that all these people on the internet supposedly can just refer to an IE window's title so easily while Windows Script Host tells me that the Window object doesn't support the 'Document.Title' property?

I'm pretty sure I can figure out the rest of my code if I can just get past this one road block, which is why I didn't want to bother you with the entire script.

Thanks so much, I appreciate it.

-Jacob


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>