Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vb scripting
#1
Not Solved
Hi,
Wishing you a happy and prosperous new year.

I have an query
In Flight Reservation application how can we check that
Total Price= Ticket*Price
And how can we get that value in our design time data table.
Reply
#2
Not Solved
Hi rahul,

For checking total price = Ticket * Price, you can use conditional statement like, if.. else or check the value you can use table check point (For the same you can follow the QTP tutorial for checkpoint), hope this might solve your problem.

Thanks
Mahesh
Reply
#3
Not Solved
Hi,

Note: Values retrieved & posted during the RunTime will not be seen in Design Time Datatable.

You can get the value into RunTime Datatable of Test Results window.
Code:
total_price = Ticket * Price
Datatable("TotalPrice",dtGllobalSheet).Value=total_price

@Forum members: HAPPY NEW YEAR TO U Smile
Reply
#4
Not Solved
First get the values available in "Tickets" and "Price" fields

and Multiply both the values and keep in one Variable and Use that value where ever you want

Code:
Dim No_of_Tickets,Price_of_Tickets

No_of_Tickets=Object.getroproperty("value")
Price_of_Tickets=Object.getroproperty("Value")

Result=No_of_Tickets*Price_of_Tickets

msgbox "Price of Tickets"&Result

'You can use this variable as a parameter and pass to your desired place
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Objectless Scripting Sruthe 1 1,378 04-06-2018, 05:09 PM
Last Post: Ankur
  need to check Alert messages in scripting setukaran 2 3,426 11-21-2014, 01:16 AM
Last Post: prs2014
  Vb Scripting Tutorial Payal Sharma 3 8,002 05-16-2012, 05:58 PM
Last Post: Ankesh
  QTP Scripting Unleash Rajesh 7 7,635 06-09-2011, 03:53 PM
Last Post: Unleash Rajesh
  Scripting Angel 2 3,291 11-03-2010, 08:17 PM
Last Post: rajeshwar

Forum Jump:


Users browsing this thread: 2 Guest(s)