一、自带检查点函数
  '最后一个参数为timeout,单位是毫秒
1   Browser( "SAP NetWeaver Portal" ).Page( "SAP NetWeaver Portal" ).SAPEdit( "用户名" )._
2   CheckProperty "value" , "tianyangln" , 2000

 

二、ChildObjects使用举例:
1 '点击Page页面的所有webButton
2 Set oDesc = Description.Create()
3 oDesc("micClass").Value = "WebButton"
4 Set Buttons = Browser("micClass:= Browser").Page("micClass:=Page").ChildObjects(oDesc)
5 NumerOfButtons = Buttons.Count
6 For i = 0 To NumberOfButtons - 1
7 Buttons(i).Click
8 Next

三、QTP报告

1   Reporter.ReportEvent micFail, "StepName" , "具体描述",[截图路径]
2   '报告状态有micFail,micWarning,micPass,micDone四种
四、Browser或Page的CaptureBitmap方法---对象截图
1 FullFileName = "D:\test.png"
2 Browser("百度一下,你就知道").CaptureBitmap FullFileName,True
3 Reporter.ReportEvent micFail,"错误截图方法试用","错误截图写入报告",FullFileName

五、Browser的FullScreen方法,使浏览器全屏

相关文章:

  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2021-09-21
  • 2021-06-20
  • 2021-11-07
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-10-06
  • 2022-12-23
相关资源
相似解决方案