write a script for get the following result:
username
password
frm the
string1="A=username"
string2="B=password"

Answers were Sorted based on User's Feedback



write a script for get the following result: username password frm the string1="A=username..

Answer / sandeep guttikonda

The Above Posted answer is the very correct one.

Here I would like to show one more option but, not as good
as above one ( Just to tell the other option)

String1 = "A=username"
String2 = "B=password"

We are having 3 good buildin functions in VBscript to work
upon the test messages.

1) Left()
2) Mid()
3) Right()

Here in this case we can use Right() Function to retrieve
the required text.
We can use this function to get a specified number of
characters from the right side of a string.

Syntax: Right(String,Length)

To get username:
Code:
Username = Right(String1,8)
Msgbox Username

As length of us username is 8 I am using 8 in the function.

To get Password:
Code:
Password = Right(String2,8)
Msgbox Password

As length of us Password is 8 I am using 8 in the function.

Is This Answer Correct ?    5 Yes 1 No

write a script for get the following result: username password frm the string1="A=username..

Answer / litan

string1="A=username"
string2="B=password"


Username=Split(string1,"=")(1)
PAssword=Split(string2,"=")(1)

Is This Answer Correct ?    4 Yes 2 No

write a script for get the following result: username password frm the string1="A=username..

Answer / giriyappa badagar

string1="A=username"
string2="B=password"

UName=Split(string1,"=")
PWord=Split(string2,"=")

msgbox UName(1)
msgbox PWord(1)

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

Is virtual object supported in low level recording mode?

0 Answers  


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

0 Answers   Wipro,


can u explain about QTP Frameworks? what are the framework types are available? and How to set or create frame work for a application? Explain briefly?(Also give me one example)

1 Answers  


I install .Net Add-Ins in my system. It installed properly. But all the objects are recognizing as window objects only. But it has to recognize as swf objects. In Record and Run setting i selected 'Record and run test on any open browser' and Record and run test on any open Windows-based application' Can any one tell what setting i have to do to recognize objects correctly as swf...? Please give some suggestions..?

1 Answers  


how to select particular value from the combobox in the current page which is entred in the previous page editbox after parameterization?

5 Answers   Ordain Solutions,






How to load the object repository at run time?

9 Answers   TCS,


Where virtual objects stores results?

4 Answers  


Can we use smart identification in Keyword Driven approach? If yes , How we can use. Please Explain?

1 Answers  


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

0 Answers   Wipro,


plz anybody tell me how to explain the architecture of one particular project.plz give me answer for this.....RAJESH

7 Answers   TCS, Wipro,


Which scripting language used by quicktest professional (qtp)?

0 Answers  


What is a data driven test in qtp?

0 Answers  


Categories