如何在 Internet Explorer 上使用 vbscript 填充新标签表单?

如何在 Internet Explorer 上使用 vbscript 填充新标签表单?

我正在使用这个 vbscript 来填写表格:

Option Explicit
Dim objIE, ipf
On Error Resume Next
Const PAGE_LOADED = 4
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("https://www.1stdomain.com/")
Sub WaitForLoad
Do While objIE.Busy
WScript.Sleep 500
Loop
End Sub
objIE.Top = 1
objIE.Toolbar=1
objIE.StatusBar=1
objIE.Height = 730
objIE.Width = 1300
objIE.Resizable = 1
objIE.Visible = True    
Call WaitForLoad 
objIE.Document.all.Item("name1").Value = "john"
objIE.Document.all.Item("name2").Value = "mike"
objIE.Document.all.Item("button1").Click



 after click button a new tab opens with a different url to fill it's form


 objIE.Navigate("https://www.2nddomain.com/")


objIE.Document.all.Item("location").Value = "singapore"



相关内容