Hello,
How can i capture first letter of any string using QTP.
For ex.. i want "j" in the below string
"john"
could any one explain me?
Is there any function for that?

Answers were Sorted based on User's Feedback



Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / uday kumar_anem

str="john"
msgbox(left(str,1))

Is This Answer Correct ?    15 Yes 1 No

Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / neeraj chauhan

Dim str, str1
str="john"
str1=mid (str, 1,1)
msgbox str1

Is This Answer Correct ?    9 Yes 4 No

Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / veeranki naveen goud

var = Ltrim (" Veeranki Naveen ")
'Ltrim is used to remove the left padded spaces
var2 = mid (var,1,1)
msgbox var2

OR

var = Trim (" John")
va2 = left(var,1)
msgbox var2



Regards,
Veeranki Naveen,
Noida.

Is This Answer Correct ?    2 Yes 0 No

Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / naveen

This is simple and easy one when compared to second
str="john"
msgbox(left(str,1))

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

does qtp runs on internet explorer 7.0

5 Answers   BeBo Technologies,


Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?

1 Answers  


Define QTP ?

10 Answers   TCS,


I have two actions in my QTP test and two iterations in my DataSheet. I want to execute the Action 1 for the two iterations only after which i want to exceute the next Action2. How is this possible?

4 Answers  


How will u test content of an web application with out using chechpoints in QTP 9.2?

3 Answers   CTS,


Hi, It is HR question. What are the qualities you like and dislike in your Project Manager?

2 Answers   TCS,


How can you handle exceptions in qtp?

0 Answers  


Hi frnds, for ex.. we got a job in wipro, they will give me one mail id.. "Rameshkumar@wipro.com", where to open this mail id..in which sw ? or outlook?

1 Answers  


you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva

0 Answers   Covansys,


What is All object and Local object in Object Repositary? Explain me please.

3 Answers  


Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance

0 Answers  


how to write the descriptive programming in QTP for loginwindow.without using Step generator,object repository for referecnes

4 Answers   STC,


Categories