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
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 |
Answer / litan
string1="A=username"
string2="B=password"
Username=Split(string1,"=")(1)
PAssword=Split(string2,"=")(1)
Is This Answer Correct ? | 4 Yes | 2 No |
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 |
Can we use same virtual objects in many number of tests?
wht type of User defined functions or Java Releated functions do we write in VB scripting
Give me an example where you have used a COM interface in your QTP project?
What are the key elements available in test result window?
what are the functions availabla in QTP? what are the data types in QTP?
In QTP, Which are the concepts are needed to do Functional testing and Regression testing?
wht is Driver in Integration testing. Anubody can answers it
Explain hybrid framework with advantages and disadvantages?
Is it possible to merge two object repository files in qtp?
what is the criteria for choosing test cases for automation? Ex: if you have some 300 test cases, then how many you choose for automation. what is criteria of selecting?
3 Answers Aricent, Delhi University, TCS,
how can we handle errors other than using recovery scenerios in qtp
After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans