Given a string variable contain a full name (last name,
first name), using vbscripting, how can you extract first
and last name and save them into two different variables.

Answers were Sorted based on User's Feedback



Given a string variable contain a full name (last name, first name), using vbscripting, how can yo..

Answer / uday

Use split method.

Here is the ex:

str="Uday,Anem" 'where Uday is first name and Anem is last
name
arr=split(str,",")
firstname=arr(0)
lastname=arr(1)

msgbox(firstname+" "+lastname)

Is This Answer Correct ?    8 Yes 2 No

Given a string variable contain a full name (last name, first name), using vbscripting, how can yo..

Answer / naveen arora

fullname = "Arora Naveen"
last = Left(fullname, InStr(1, fullname, " "))
print last
first = Right(fullname, InStr(1, fullname, " "))
Print first

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More QTP Interview Questions

I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to give input of drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. I have changed the drop down value as variable in Keyword view and given values in data table "A,B,C,D,E" as one below one. 4. While i am running the script it could not identify the drop down value which is in Data Table.It shows message. How to make value identify by QTP?

1 Answers  


suppose i can done the project , that project have 4 modules in that one module they have many links(web pages).in that time i can say i can work on some links? or total module?

4 Answers  


suppose our project is developed using java technologies.after complition of the coding developer relesed a build to the testing team.so, what is the process means how we open that documents?what are that documents?plz give reply its urgent

2 Answers  


Whenever we use GETROPROPERTY function.

7 Answers   NIIT,


Explain QTP testing process?

1 Answers   Crea,


what is defination of intergration testing?

2 Answers  


How to get line numbers in your editor in expert view?

2 Answers  


How to find the difference between 2 dates in qtp?

0 Answers  


In where you are keeping or maintaining shared object repository (file)in your appliction?

2 Answers   Inlogic,


Define Environment Variable in UFT and its uses?

0 Answers  


What are the QTP advantages and disadvantages?

6 Answers  


Explain the new feature of UFT regarding the export of test results?

0 Answers  


Categories