|
RunAction "login [login]", oneIteration
wait(10)
m=DataTable.GetSheet("Global").GetRowCount
n=DataTable.GetSheet("new ups shipping mehtod").GetRowCount
msgbox(m)
msgbox(n)
ReDim newservices(m),ShipCostType(n)
Browser("Fastcommerce").Page("Fastcommerce_2").Link("Set Up").Click
wait(10)
Browser("Fastcommerce").Page("Fastcommerce").Link("Change").Click
wait(10)
k=1
Browser("Fastcommerce#_1").Page("Fastcommerce#").Link("New Shipping Method").Click
Browser("Fastcommerce#_1").Page("Fastcommerce#").WebList("newServices").Click
newservices(k)=DataTable.Value("new_services","Global")
msgbox(newservices(k))
Browser("Fastcommerce#_1").Page("Fastcommerce#").WebList("newServices").Select( newservices(k)
//执行到这就报错
wait(3)
j=1
ShipCostType(j)=DataTable.Value("ShipCostType","Global")
msgbox(ShipCostType(j))
If ShipCostType(j)=NULL Then
j=1
DataTable.SetCurrentRow(j)
End If
wait(3)
Browser("Fastcommerce#_1").Page("Fastcommerce#").WebList("shippingCostType").Select (ShipCostType(j))
//执行到这就报和上面一样的错,
wait(3)
If Browser("Fastcommerce").Page("Fastcommerce").WebEdit("shipFlatRates").Exist then
Browser("Fastcommerce#_1").Page("Fastcommerce#").WebEdit("newFlatRates").Set "55"
elseif Browser("Fastcommerce").Page("Fastcommerce").WebEdit("firstWeight").Exist then
Browser("Fastcommerce").Page("Fastcommerce").WebEdit("firstWeight").Set"2.22"
Browser("Fastcommerce").Page("Fastcommerce").WebEdit("additionalWeight").Set"2"
elseIf Browser("Fastcommerce").Page("Fastcommerce").WebEdit("firstItem").Exist then
Browser("Fastcommerce").Page("Fastcommerce").WebEdit("firstItem").Set "3.33"
Browser("Fastcommerce").Page("Fastcommerce").WebEdit("additionalItem").Set "3"
elseif Browser("Fastcommerce").Page("Fastcommerce").WebList("shippingCostType").Select("Item Specific") then
Browser("Fastcommerce#").Page("Fastcommerce#").WebElement("Go to individual product").Check CheckPoint("Go to individual product to add shipping cost")
else
Browser("Fastcommerce#_1").Page("Fastcommerce#").WebElement("enableShipInfos").Check CheckPoint("enableShipInfos")
End If
j=j+1
k=k+1
DataTable.SetNextRow
Browser("Fastcommerce").Page("Fastcommerce").Link("Save").Click
wait(5)
Browser("Fastcommerce").Dialog("Microsoft Internet Explorer").WinButton("确定").Click |
|