html - 通过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 点击网页上的按钮,但我一直失败,使用此代码成功填写了用户名和密码,但我不知道如何点击继续按钮,这是使用的代码
解决方案
推荐阅读
- javascript - xsltProcessor.importStylesheet(xsl) 错误
- php - 将 SQL 查询更改为 eloquent 查询
- javascript - PHP循环值到javascript数组中
- c# - 将多个类型组合成一个字节数组
- .net - 了解 .NET 中的并发管理
- python - 如何使用 python 3 创建套接字连接?
- laravel-5.4 - Laravel:更新按钮点击的值以获得批准
- python - 使用子进程将大文件写入磁盘时调用进度 - Python
- php - 我想让 mcrypt 使用 php 7.2 在 xampp windows 上工作错误:调用未定义的函数 mcrypt_module_open()
- c++ - 将库与较新的 GLIBC 依赖项链接