login - 在 VBscript 中使用 GetElementByName 时需要对象
问题描述
我使用以下代码,但在我的 getelementbyname 字段上获取所需的对象。有谁知道这里发生了什么?我尝试了很多变化:
WScript.Quit Main
Call Main
Function Main
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "myurlsamle"
WScript.Sleep 8000
With IE
.document.getElementsByName("UsernameTextBox").value = "myusername"
.document.getElementsByName("PasswordTextBox").value = "mypassword"
End With
End Function
解决方案
推荐阅读
- linux - 在当前进程中添加观察点(不在 gdb 中,不用于调试)
- c# - 在 Unity 中销毁实例化游戏对象的问题
- amazon-web-services - 在 S3 存储桶上更改存储类的经济高效的方法
- laravel - nuxt,js 面临在 vuetify 表中获取数据的问题
- c# - 日期时间计算器
- cmake - 如何在cmake中使用来自构建目录的导入库?
- javascript - 在 npm run build 后 React 网站应用不同的 css
- java - XML org.springframework.expression.ParseException 中的 Spring SpEL:表达式没有结尾后缀“}”
- neo4j - 用户定义的过程超时
- plot - 如何在不删除全息视图中的轴标签的情况下单独隐藏/删除轴