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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are Shared ORs read-only?

635


How many types of object repository in qtp?

611


How can i click on any Excel sheet's "H" column with out writing coordinates Ex:Window("Book1").WinObject("Book1").Click 498,14 I dont want to give coordinates like 498,14 Can i open "H" column by writing like Ex:Window("Book1").WinObject("Book1").Click "H" or Ex:Window("Book1").WinObject("Book1").Click "H","1" or Ex:Window("Book1").WinObject("Book1").Click H,1 If i want to click on "Sheet3" of an excel sheet, Can i open like Ex:Window("Book1").WinObject("Book1").Click "Sheet3" Please help me any one

1602


what could go wrong with test automation?

1507


Hi! My OTP script has several bitmap checkpoints included which I check in the test results xml file. The test is for SAP 4.7. I need to save these bitmaps to files or at least export them to the html file using the export function in the test results viewer. Could you please help me with this problem? Thank you in advance! Best regards, Peter

2204






How to use setroproperty?

579


1.explain end to end process of qc,2.how many tabs are in qc9.0,qc10.0 3.what is review, how many reviews are following in aproject 4.how will you get the requirements 5.why do we choose testing 6.how to export tc's and requirements to qc through add-ins

1440


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1359


What is meant by a Check Point in UFT? Also, explain the applicable Check Points.

711


Is it possible to split an action? How?

662


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

991


Can I change properties of a test object?

635


Define Canvas view of UFT?

620


what is description object?

1602


when to start the automation?

1480