jmcdev
jmcdev

Reputation: 15

vbscript to launch internet explorer, navigate to URL and click button

I have been scraping the Internet for some solution to this problem with no success. I need to use vbscript to launch a URL within Internet Explorer and click a button. The challenge that I am having is that the button has no id or name. It only has a specified type and value. I have tried different methods with no success. I would love some help if you can.

Thank you.

Upvotes: 0

Views: 5848

Answers (2)

David
David

Reputation: 11

Try this with groovy:

import org.codehaus.groovy.scriptom.*;

Scriptom.inApartment
{
  def ie = new ActiveXObject('InternetExplorer.Application')

  ie.Visible = true
  ie.AddressBar = true

  ie.Navigate("http://glaforge.free.fr/weblog")
}

This code is from http://repository.codehaus.org/org/codehaus/groovy/modules/scriptom/scriptom-all-assembly/1.6.0/scriptom-all-assembly-1.6.0.zip

Upvotes: 1

Dominic Cooney
Dominic Cooney

Reputation: 6545

Use getElementsByTagName to find all of the button elements (or input elements) in the page and then look at the name property to see if it is the one you want.

Upvotes: 1

Related Questions