提问人:Bhaskar Sharma 提问时间:11/16/2023 最后编辑:karelBhaskar Sharma 更新时间:11/17/2023 访问量:14
运行时错误“438”:对象在引用镶边中的元素以设置值时不支持此属性或方法
Run-time error '438': Object doesn't support this property or method while referring to a element in chrome to set value
问:
当我尝试登录网站但收到错误代码时,我遇到了此错误。Run-time error '438': Object doesn't support this property or method while referring to a element in chrome to set value
PFB
我的代码:
Sub LoginToWebsite()
Dim Chrome As Object
Set Chrome = CreateObject("Shell.Application")
Chrome.ShellExecute "chrome.exe", "https://login.nopaperforms.io/"
While Chrome.Busy Or Chrome.ReadyState <> 4: DoEvents: Wend
Chrome.document.getElementById("Email").Value = "xxxxxxx"
Chrome.document.getElementById("password").Value = "xxxxxx"
Chrome.document.getElementById("login-btn").Click
End Sub
我试过了,而且.getElementById
getElementsByName
querySelector
答: 暂无答案
评论