|
本帖最后由 qc870912099 于 2013-3-7 11:38 编辑
SystemUtil.Run "http://mail.163.com/"
Dim i
Dim n
Dim outputvalue
Dim expectvalue
For i=1 to datatable.GetSheet("Action1").getrowcount
n=DataTable("D",dtLocalSheet)
Browser("micClass:=Browser").Page("micClass:=Page").WebEdit("micClass:=WebEdit","index:=0").set DataTable("A",dtLocalSheet)
Browser("micClass:=Browser").Page("micClass:=Page").WebEdit("micClass:=WebEdit","index:=1").set DataTable("B",dtLocalSheet)
Browser("micClass:=Browser").Page("micClass:=Page").WebButton("micClass:=WebButton","type:=submit").Click
If Browser("micClass:=Browser").Page("micClass:=Page").WebEdit("micClass:=WebEdit","name:=username").Exist Then
If Browser("micClass:=Browser").Dialog("micClass:=Page","text:=Microsoft Internet Explorer").WinButton("text:=确定").Exist Then
Browser("micClass:=Browser").Dialog("micClass:=Page","text:=Microsoft Internet Explorer").WinButton("text:=确定").Type micReturn ' 这句话是我编写的有问题还是弹出对话框不能这么点击确定按钮呢???
End if
outputvalue=Browser("micClass:=Browser").Page("micClass:=Page").WebElement("html id:=form_info").GetROProperty("outertext")
expectvalue=DataTable("expectvalue",dtLocalSheet)
If outputvalue<>expectvalue Then
reporter.ReportEvent 1,"登录功能提示测试","预期输出值为:"+expectvalue+"实际输出值为:"+outputvalue
else reporter.ReportEvent 0,"登录功能提示测试","预期输出值为:"+expectvalue+"实际输出值为:"+outputvalue
End If
else reporter.ReportEvent 0,"登录功能测试","第"+n+"次测试"
End If
datatable.GetSheet("Action1").setnextrow
Next
当只输入账号不输入密码是,该网页会弹出一个对话框,但是我为什么不能点击其确定按钮呢? |
|