Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert a Currency value to number
#3
Solved: 11 Years, 8 Months, 3 Weeks ago
Egun -

Are you importing the data from Excel Sheet ?? Because if you are entering the data into the datatable, Datatasheet blindly eliminates all the special charachters . Never mind, just curious to know.

Try this, I have modified your code.

Code:
DbTable("DbTable_4").Output CheckPoint("DbTable_4")
Browser("V").Page("V").WebElement("14,800.18").Output CheckPoint("14,800.18")

'here I'm getting 14800.18
value5 = Datatable.Value("DbTable_TAmount")
'here I'm getting 14,800.18
value6 = Datatable.Value("_charges_innertext_out")
value6 = Replace(value6, ",", "")
If Trim(value5) = Trim(value6) Then
foundC = True
Reporter.ReportEvent micPass, "found", "TAmount is correct."
Else
foundC = false
Reporter.ReportEvent micFail, "found", "TAmount is INCORRECT."
End if
Let me know if it worked or it helped you or this exactly what you were looking for.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Messages In This Thread
Convert a Currency value to number - by egun - 08-10-2009, 09:22 PM
RE: Convert a Currency value to number - by Saket - 08-11-2009, 10:33 AM
RE: Convert a Currency value to number - by basanth27 - 08-11-2009, 10:56 AM
RE: Convert a Currency value to number - by Saket - 08-11-2009, 11:05 AM
RE: Convert a Currency value to number - by egun - 08-11-2009, 09:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Get Item of ListBox and convert it to array felino 1 2,606 11-26-2015, 02:20 PM
Last Post: felino
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,929 02-10-2014, 03:07 PM
Last Post: pranikgarg
  How to convert integer to decimal automation2012 2 5,712 03-25-2013, 04:44 PM
Last Post: automation2012
  How to convert three arrays into just ONE array? Arena 2 5,268 04-10-2012, 09:35 AM
Last Post: Arena
  "How to convert StringName to FunctionName" suresz449 0 2,450 08-30-2011, 04:01 PM
Last Post: suresz449

Forum Jump:


Users browsing this thread: 1 Guest(s)