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 |
Using Object Repository is a advantage or disadvantage?
how to invoke the web application through script in qtp
Explain advantages and disadvantages of ddf?
in QTP, we have options like (record and play,recording modes(normal,analog,low level),object identification,smart identification,object repository,synchronizing test,transactions,checkpoints(std,bitmap,text,text area,DB,XML,accessibility),regular expression,actions,data driving,parameter,parameterization,data tables,recovery scenario(pop up,object state,test run error,application crash). real time users of QTP, pls say and when and at what point u have used all these options ,in ur concerned project.pls give me explanation in accordance with ur real time project handled. real users pls send some time in the aboue case. if u can send the the reply through allinterview or at ref_it_ref@yahoo.co.in
how and what kind of vb functions do us ein QTP?
we have 10 automation scripts. how to call them from one main script.
How many types of recording facility are available in quicktest professional (qtp)?
what is the code in QTP to take screen shot?
how qtp handles customised object
How do know the number of browsers opened?
I have recorded a test over web application(with IE6.0) in analog mode. But, while running it my test gets failed. Why? (Note: my systray has 3 open web applications)
Explain abt the File System Object in QTP with ex