09-08-2011, 08:26 PM
HI,
I would rather suggest to go with the text comparision rather than the checkpoint. Get the text from that field and then compare with your expected result.
Please let me know if you need any further info on this.
I would rather suggest to go with the text comparision rather than the checkpoint. Get the text from that field and then compare with your expected result.
Code:
'Some will be something like this.
strCartSubTotal = Browser("officeworks").Page("ShopingCart").WebTable("PricingInfo").webelement("CartSubTotal").GetRoProperty("innertext")
strShippingChrg = Browser("officeworks").Page("ShopingCart").WebTable("PricingInfo").webelement("ShipingCharge").GetRoProperty("innertext")
If strCartSubTotal > 55 and strShippingChrg = "Free" Then
msgbox "Free shiping as the subtotal is " & strCartSubTotal
ElseIf strCartSubTotal <= 55 and strShippingChrg = "Free" Then
msgbox "Error: Showing Free shipping even the cart subtotal is not more than $55. The cart subtotal is : " & strCartSubTotal
ElseIf strCartSubTotal > 55 and strShippingChrg = "$5.95" Then
msgbox "Erro: Showing shipping fee even the cart subtotal is more than $55. The cart subtotal is : " & strCartSubTotal
ElseIf strCartSubTotal <= 55 and strShippingChrg = "$5.95" Then
msgbox "Shiping of $5.95 displayed correctly as the subtotal is " & strCartSubTotal
EndIf
Please let me know if you need any further info on this.
Thanks,
SUpputuri
SUpputuri