write a script for get the following result:
username
password
frm the
string1="A=username"
string2="B=password"
Answer Posted / 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 |
Post New Answer View All Answers
Shall we add Local Repository to shared object repository,if yes,how we add
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
how to post xml data from QTP scripts to any application?
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
Hi Friends, I worked with 8.2 not with 9.2. Please help me in this prob. I created one script and recorded some think and save as Test 1 then I opened process--open the object repository manager. Switch to file->save->give some name->save as Objectrepo1.tsr file. (This is the global repository file.) Then I went to object repository->tools-> associate repository ->click + icon ->open the previously saved Objectrepo1.tsr file. This is the global repository Now I created one more script and save as Test 2. In this script I am calling script with the Help of "Call of existing action" and I executed but QTP is not able to execute B’cos it is QTP is not able to read the Object Repository of Test 1. Please let me know why? Once I made Script 1 as a shared Obj. Repository so it would not give any Problem. Right?
What are the benefits of qtp?
Can you write a script to check if the folder exists or not?
Explain qtp(quick test professional)?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
How do client side image and server side image work?
what is impact analysis on regression testing?
What is ‘object spy’ and what is the function of object spy in qtp?
What is the basic concept of quicktest professional (qtp)?
What is the script for database check point, bitmapchek point, regular expression ?
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?