|
本帖最后由 test-yao 于 2013-1-15 16:59 编辑
- 新增渠道
- DataStr= "d:\data.xls"
- Set ExlObj=CreateObject("Excel.Application")
- ExlObj.Visible = false ' 设置为true的情况,文档会打开
- ExlObj.DisplayAlerts = false
- Set book=ExlObj.Workbooks.Open(DataStr)
- Set sheet=book.Worksheets("Sheet3")
- GetExcelSheetRowsCount=Sheet.UsedRange.Rows.Count
- '
- '
- For i=2 to sheet.usedrange.rows.count
- Protocol=ExlObj.WorkSheets("Sheet3").Cells(i,1)
- esbform:icePnlTbSet:0:pOadapto=ExlObj.WorkSheets("Sheet3").Cells(i,2)
- with Browser("SmartESB 管理监控平台").Page("SmartESB 管理监控平台")
- .WebButton("新增").Click
- .WebEdit("esbform:icePnlTbSet:0:formLast").Set Protocol
- .WebElement("WebTable").Click
- .WebList("esbform:icePnlTbSet:0:j_id22").Select "default_channel"
- .WebElement("WebTable_2").Click
- 能否把(WebCheckBox("esbform:icePnlTbSet:0:pOadapto" ).)它参数化
- .WebCheckBox("esbform:icePnlTbSet:0:pOadapto" ).Set "ON" 能否把它参数化
- .WebButton("增加 >").Click
- .WebElement("WebTable_3").Click
- wait (2)
- .WebButton("保存").Click
- On Error Resume Next
- ValCheck=).WebButton("新增").Check (CheckPoint("新增"))
- If ValCheck Then
- Reporter.ReportEvent micPass,"新增协议","新增协议成功"
- else
- Reporter.ReportEvent micPass,"新增协议","新增协议失败"
- err.clear
- End If
- end with
- Next
- ExlObj.Quit
- Set ExlObj = nothing
复制代码 |
|