0
我正尝试使用VBA登录此网页,https://www.fois.indianrail.gov.in/ecustomer/JSP/QryInsight.jsp 。调试表明,当用户名行处于活动状态(显然它不能填充用户名数据)时,VBA会引发所需的错误424对象。无法使用excel登录网页,需要使用错误424对象
下面的代码:
Sub Test()
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
ie.Navigate ("https://www.fois.indianrail.gov.in/ecustomer/JSP/QryInsight.jsp")
With ie.document
.getElementById("txtUserId").Value = "ABCDE"
.getElementById("txtPassword").Value = "ABCDE"
.getElementById("submit").Click
End With
End Sub
谁能帮我同时登录到指定的网页调试问题?
该网页有框架,你所提供的网址是顶部帧。登录部分的真实URL是:https://www.fois.indianrail.gov.in/ecustomer/JSP/LoginNew.jsp –
假设Logan是正确的,您将希望导航到框架的文档,然后通过ID获取元素。您应该能够通过名称,班级或ID获取框架。 –
尝试在VBS中使用.getElementsByName(“txtUserId”)。 –