用描述性语言写网易邮箱的登录
求大神指教啊!怎么用描述性语言写网易邮箱(只要是网页的登录就好)的登录!最好是用description写描述性语言 自己先录制一下,察看录制的脚本
然后模仿着写 你就说的是描述性编程吧,自己百度下示例就可能了 dim wshShell
set wshShell = CreateObject("Wscript.Shell")
'用的是chrome浏览器
wshShell.run "Chrome"
Wscript.Sleep 1000
wshShell.SendKeys "%d"
Wscript.Sleep 1000
wshShell.SendKeys "http://mail.163.com/"
Wscript.Sleep 1000
'进入页面后,直接按TAB键,不同的情况,按的TAB键个数不同,你可以多加几个,下面类似
wshShell.SendKeys "{TAB}"
wshShell.SendKeys "dream@163.com"
Wscript.Sleep 1000
wshShell.SendKeys "{TAB}"
wshShell.SendKeys "dream"
Wscript.Sleep 1000
wshShell.SendKeys "{ENTER}"
dim wshShell
set wshShell = CreateObject("Wscript.Shell")
'chrome浏览器
wshShell.run "Chrome"
Wscript.Sleep 1000
wshShell.SendKeys "%d"
Wscript.Sleep 1000
wshShell.SendKeys "http://mail.163.com/"
Wscript.Sleep 1000
'进入邮箱页面后,按TAB键到达用户名处,不同的情况,可以多加几个
wshShell.SendKeys "{TAB}"
wshShell.SendKeys "dream@163.com"
Wscript.Sleep 1000
wshShell.SendKeys "{TAB}"
wshShell.SendKeys "dream"
Wscript.Sleep 1000
wshShell.SendKeys "{ENTER}" dim wshShell
set wshShell = CreateObject("Wscript.Shell")
'chrome浏览器
wshShell.run "Chrome"
Wscript.Sleep 1000
wshShell.SendKeys "%d"
Wscript.Sleep 1000
wshShell.SendKeys "http://mail.163.com/"
Wscript.Sleep 1000
'进入邮箱页面后,按TAB键到达用户名处,不同的情况,可以多加几个
wshShell.SendKeys "{TAB}"
wshShell.SendKeys "dream@163.com"
Wscript.Sleep 1000
wshShell.SendKeys "{TAB}"
wshShell.SendKeys "dream"
Wscript.Sleep 1000
wshShell.SendKeys "{ENTER}" neval_wu 发表于 2016-4-22 15:20
dim wshShell
set wshShell = CreateObject("Wscript.Shell")
'chrome浏览器
运行不了啊! 亲 jingzizx 发表于 2016-4-21 10:38
自己先录制一下,察看录制的脚本
然后模仿着写
我写灰机(类似的也会)的会写,但是写网页的不会啊! Strived 发表于 2016-4-24 19:10
运行不了啊! 亲
抱歉,没说清楚,我这个脚本是直接保存成.vbs直接运行的
如果你是在QTP中写代码运行的话,应该是运行不了的 如果是在QTP中写这个功能脚本的话,最简单的是录制,然后照着抄。
SystemUtil.Run "IExplorer.exe","mail.163.com"
中间抄录制的内容就可以了
SystemUtil.CloseByName "IExplorer.exe"
页:
[1]