Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

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 function ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 06-23-2008
Contributing Member
 
Join Date: Nov 2007
Posts: 53
Thanks: 16
Thanked 8 Times in 5 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: 208
Thanks: 3
Thanked 19 Times in 19 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: 85
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


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 08:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved