Geeks Talk

Prepare for your Next Interview




IN QTP, How to write the code ?

This is a discussion on IN QTP, How to write the code ? within the QTP forums, part of the Software Testing category; In screen name X having on e list box with 3 values a,b,c . i need to print one value a or b or c? Where does using Split ...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-23-2008
Contributing Member
 
Join Date: Nov 2007
Posts: 43
Thanks: 14
Thanked 5 Times in 3 Posts
srinii_vasu is on a distinguished road
IN QTP, How to write the code ?

In screen name X having on e list box with 3 values a,b,c . i need to print one value a or b or c?
Where does using Split function in QTP
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-24-2008
Expert Member
 
Join Date: Jan 2007
Location: India
Posts: 178
Thanks: 3
Thanked 13 Times in 13 Posts
NawabShaikh is on a distinguished road
Re: IN QTP, How to write the code ?

1. WebList
Browser().Page().WebList().Select "#1"..............Index

OR

Browser().Page().WebList().Select "a"................Value

2. Split

a= "I have QTP Installed"
b= Split(a," ")

MsgBox b(2)...........OutPut >> QTP


regards,
Nawab
Reply With Quote
The Following User Says Thank You to NawabShaikh For This Useful Post:
  #3 (permalink)  
Old 06-26-2008
Contributing Member
 
Join Date: Feb 2006
Posts: 73
Thanks: 0
Thanked 3 Times in 3 Posts
kunals is on a distinguished road
Re: IN QTP, How to write the code ?

ur Q is not very specific or m not getting it...

if you want to get the values from a dropdown and print it then you can use
1. do a getroproperty("all items")
2. and then use the split with delimeter as ";"
this will give you an array with all the elements in that dropdown and then play wid then as n how you want.

Hope this will help you...
Kunal.
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Write an SQL query JobHelper SQL 2 09-22-2008 09:35 AM
Write bug report jainbrijesh Testing Issues 2 03-09-2008 08:38 AM
Where should I write the JDBC code chandu_7k JSP 7 07-04-2007 11:37 PM
Which event of the grid should we use to write code Geek_Guest VB.NET 0 04-09-2007 06:23 AM
how should we write the script? abraham_ahmed Testing Issues 4 02-15-2007 05:05 AM


All times are GMT -4. The time now is 06:03 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved