开发者

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

I have been scraping the Internet for some so开发者_运维技巧lution 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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜