Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular Expression
#3
Not Solved
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.
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
Reply


Messages In This Thread
Regular Expression - by Himanshu2585 - 09-08-2011, 06:05 PM
RE: Regular Expression - by Ankesh - 09-08-2011, 08:24 PM
RE: Regular Expression - by Himanshu2585 - 09-13-2011, 04:37 PM
RE: Regular Expression - by supputuri - 09-08-2011, 08:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Please help me with Regular Expression nessa2018 2 1,554 09-25-2018, 03:15 PM
Last Post: Ankur
  Regular Expression Suma Parimal 3 2,409 01-17-2014, 03:18 PM
Last Post: basanth27
  regular expression rjkmr.aiht 0 1,778 05-07-2012, 11:34 AM
Last Post: rjkmr.aiht
  regular expression rjkmr.aiht 3 3,151 04-25-2012, 06:09 PM
Last Post: sshukla12
  Regular expression for time validation Pallavi 0 2,517 03-08-2012, 11:57 AM
Last Post: Pallavi

Forum Jump:


Users browsing this thread: 1 Guest(s)