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

Explain about datafile/verification of date file when file is not available in local system?

0 Answers  


How can we close all webbrowsers which are opened in out desktop?

3 Answers  


How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is

0 Answers   HP, Livetek,


what are the challenges you have faced while testing web based application using the automation tools ?

0 Answers  


explian qtp frame work and what is the use of it? what is the neceecity of this? explian detail?

2 Answers  


how will you check how many members visited the website www.infosys.com?

0 Answers   Logica CMG,


Explain step generator in qtp?

0 Answers  


how to record/identify the webedit box/object which have drop down list and its changing simultaneously in qtp..

1 Answers   Synchronoss Technologies,


How to handle the exceptions using recovery secnario manager in quicktest professional?

0 Answers  


What are objects? how do you select the unknow object?

3 Answers  


How should I get results when I run scripts in a Batch mode

1 Answers   TCS,


how to test use the quality control .how to verify the image verification

0 Answers   Wells Fargo,


Categories