【发布时间】:2020-03-04 03:03:44
【问题描述】:
我有一个需要在多台计算机上登录的网站 IOT 允许考生参加考试。 如果用户有 IE,我已经编写了一个完美的 .vbs。但是我不知道如何编写 JavaScript 或任何其他代码语言来使用 Chrome。该网站在任何一种浏览器上都运行良好,有时测试是在没有安装 IE 的 Chromebook 上进行的。
这是我的 .vbs:
REM Save as .vbs, select save as all in drop down,
REM type .vbs in place of .txt
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "https://www.dmdc.osd.mil/icat/loginCEP.do"
IE.FullScreen = True
IE.Visible = True
While IE.Busy
WScript.Sleep 50
Wend
Set ipf = IE.document.all.username
ipf.Value = "username" REM replace with your username
Set ipf = IE.document.all.password
ipf.Value = "password" REM replace with your password
Set ipf = IE.document.all.sess_id
ipf.Value = "nnnnnn"
Set ipf = IE.document.all.st_id
ipf.Value = "nn" REM first 2 numbers of school code
Set ipf = IE.document.all.cnt_id
ipf.Value = "nnn" REM next 3 numbers of school code
Set ipf = IE.document.all.sch_id
ipf.Value = "nnnn" REM last 4 numbers of school code
【问题讨论】:
-
不回答我的问题。不过谢谢。
-
只是为了确保我理解:这里的目标是编写一个可以进入(例如)Chromebook 所具有的任何内容的程序,而不是启动浏览器然后填写一个开始菜单的程序自动登录表格。对吗?
-
请发布一些输入数据作为示例,以及您要填写的页面的HTML内容。
-
@besciualex — 所有这些都可以从问题中的代码中推断出来……但这并不是问题的棘手部分,即如何在 Chrome OS 上自动化浏览器。
标签: javascript