In QTP I have a parameter in a datatable that is a
sentence. I need to take the last word from the sentence
and enter it into a field in a web application. How can I
setup a parameter to enter in just a portion of the
parameter (last word of the sentence) instead of the entire
paramater (whole sentence).
Answers were Sorted based on User's Feedback
Answer / ravimmishra
SystemUtil.Run "notepad.exe", "","",""
iRCount = DataTable.GetSheet(dtGlobalSheet).GetRowCount
msgbox iRCount
For i = 1 to iRCount
sDatColVal = DataTable.Value("Comment")
sFinVal = Split(sDatColVal, " ")
iFinValLen = UBound(sFinVal)
Window("Notepad").WinEditor("Edit").Type sFinVal(iFinValLen) + micReturn
DataTable.SetNextRow
Next
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / zak
Thank you for the helpful response! I included the code in
my script and it is taking the last word from the parameter
and putting it into notepad.
I now need to input this word into a field of the web page
as a security answer. What is the best way to do this? Is
it possible to replace the previous parameter (whole
sentence) with the new parameter (last word of the
sentence)?
| Is This Answer Correct ? | 0 Yes | 0 No |
How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks
Explain different types of action in qtp?
Object recognition in QTP is based on which model ? a) COM b) DCOM c) DOM d) None of the above
how can i change the action path that called in other action. when i copy one action to other pc,the action"test2" calls another action(C:\test1\action0),and i update this"test1",the folder update to "action1",but when i open "test2", it just point the call path to "C:\test1 \action0", but does not update to "action1",and the change i make can be shown in test2. so, can i update the call path manully? thanks
Extract a word from a sentenece?
In Login two edit box which object class property value is same, How to enter into 2nd edit box in qtp by vbscript.
How does QTP identifies the object in the application Mainly objectives are three type's OF PROPERTIES namely
What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.
your doing one project testing then how u know itis wheather web based application or windows based application?
Write a script to delete the a specific row (say 3rd) in a webtable.
how are environment variables used in real time projects (testing)?what answer should be given about this in interview.need real time explanation breifly?thnx in advance.
What is the diff between image and bitmap check point?