![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3 | How to solve this function .. in QTP Hai everybody Can anybody give solution for this... In QTP..flight application ... I want to test one function i.e. Whether application displaying correct Total price according to no of passengers selected... Total Price = No of passengers selected * single ticket price 1). I retrived property value into variable through GetROProperty... but it is storing price with $ symbol ... for Total Price, Single Price ticket...then it is not possible to calculate ...how to eliminate doller symbol . 2). when i retrieved into variable ...if that value is decimal number it is not possible to compare ... Open default 4th record and try to solved this problem... In Winrunner we have split function we use for this type of problem but what is function we use in qtp SEND DETAILED PROCEDURE WITH SCRIPT |
| | |
| | #2 (permalink) |
| Junior Member Join Date: Sep 2006
Posts: 40
Thanks: 0
Thanked 12 Times in 6 Posts
Rep Power: 5 | Re: How to solve this function .. in QTP in QTP we r using mid function.. it is remove unwanted chars.... mid(length,value,position)used 2) uncan change decimal number into integer use int function it is change into integer int a msgbox(a) subbu |
| | |
| | #3 (permalink) |
| Junior Member Join Date: Sep 2006 Age: 25
Posts: 16
Thanks: 1
Thanked 20 Times in 6 Posts
Rep Power: 6 | 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 |
| | |
![]() |
| Tags |
| function , qtp , solve |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C questions | Spoorthi | DATA STRUCTURES, C, C++, VC ++ | 9 | 05-11-09 02:18 PM |
| Some Loadrunner FAQs | kiran2710 | Testing Tools & QA | 1 | 25-10-08 12:42 AM |
| Function pointers- simple example | jithendra.b | ds. c , c++ Interview / Technical Questions | 1 | 30-03-07 03:31 PM |
| TCS Pacement paper 29 | sridhar | TCS Placement Papers | 0 | 12-02-07 05:43 PM |
| Whats the difference between thesr | shilpa | VB / ASP.NET Technologies | 5 | 08-03-06 12:09 PM |
| More Interview Questions Here... |