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
精彩评论