通过vba点击网页中的提交按钮

问题描述

Sub j()
Dim ie As Object
Dim doa As HTMLDocument
Dim HTMLdoc As HTMLDocument
Dim button As HTMLInputButtonElement
Dim i As Integer
'Set HTMLdoc = .document
Set ie = CreateObject("internetexplorer.application")

ie.Visible = True
ie.navigate "https://ebfpm.tsgwn.co.in/Prksoortal/login.jsp"

do while ie.busy
 Application.Wait DateAdd("s",1,Now)
Loop
'Set doa = ie.document
ie.document.getelementbyid("username").Value = "egh125"
ie.document.getelementbyid("password").Value = "**"

End Sub

'in web page the "continue" button code which i try to click is

<a class="button ok" tabindex="0" href="javascript:submitForm();">
<span class="submit-text">Continue</span>
<img class="arrow" src="img/arrow.png" alt="">
</a>

在这个网站上尝试了多种代码变体来让我的 VBA 点击网页上的按钮,但我一直都失败了, 使用此代码成功填写了用户名和密码,但我不知道如何单击“继续”按钮,这是使用的代码

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)