View Single Post
Old 29-10-07, 02:23 PM   #3 (permalink)
sudhanandareddy
Junior Member
 
Join Date: Sep 2006
Age: 25
Posts: 16
Thanks: 1
Thanked 18 Times in 6 Posts
Rep Power: 5 sudhanandareddy has a spectacular aura about sudhanandareddy has a spectacular aura about
Re: How to solve this function .. in QTP

Hi,

There is no need to use of MID Function...we can use Abs Function to get eliminate $ symble..Here I am sending script..

tickets = window("Flight Reservation").WinEdit("Tickets:").GetROProperty("Text")
prices = window("Flight Reservation").WinEdit("Price:").GetROProperty("text")
total = window("Flight Reservation").WinEdit("Total:").GetROProperty("text")

pavan = abs(prices)
nanda = abs(total)

If nanda = cint(tickets)*pavan Then
msgbox "True"
else
msgbox "False"
End If


int a will not work in VB script. here we use CInt(a)..

If any queries regarding this do mail @ nanda.dreddy@gmail.com
sudhanandareddy is offline Offline   Reply With Quote
 
45,000 Jobs - Get an Interview Call,  Post Your Resume Here