打开网页并单击 VB 脚本中的按钮 [英] Open a web page and click a button in VB script
本文介绍了打开网页并单击 VB 脚本中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 Internet Explorer 中打开一个网页并导航到一个页面并使用 vbscript.例如
I want to open a webpage in internet explorer and navigate to a page and click on a button in the page using vbscript. For example
- 我想打开 IE 并导航到http://www.gmail.com",
- 等待页面加载,
- 并在用户名和密码文本框中填写用户名和密码,然后使用 VB 脚本点击登录按钮.
这是我唯一能找到的东西(只能在 IE 中打开一个页面):
This was the only thing i could find (only to open a page in IE ) :
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("iexplore.exe www.gmail.com", 1)
请帮帮我.
推荐答案
类似:
Set IE = CreateObject("InternetExplorer.Application")
Set WshShell = WScript.CreateObject("WScript.Shell")
IE.Navigate "http://mydomain.com/form.asp"
IE.Visible = True
Wscript.Sleep 2000
IE.Document.All.Item("Item1Id").Value = "1000"
IE.Document.All.Item("Item2Id").Value = "1001"
IE.Document.All.Item("Item3Id").Value = "Some Text"
Call IE.Document.Forms(0).Submit()
这篇关于打开网页并单击 VB 脚本中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文