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 call .vbs functions in QTP? plz Explain indetail
i have written some lines of code today..tommorow some lines of code deleted in middle of that code..how to handle this type of script
In a Web appl, on a page, there are student names & details listed.On clicking sort button,details are sorted on Names.How do u verify htat sorting is done by using QTP?
What is the extension of script and object repositary files?
what is Property......End Property loop? how to write sript for it in QTP
HOW do we find a datasheet when there are 4 datasheets in data table.this question was asked by covansys interview.
How to export QTP results to an ".xls" file?
How can I pass values from one action to another in QTP ?
i this is balaji from chennai i have 4 yrs exp in testing and my qualification is bsc computers i completed in correspondace in which companiies accept the correspondace plz let me know
Plz explain about Virtual object? What is the situation u r using , explain with example?
Can you expect major bugs in Net banking Application?
how to get the data from a winedit box in vb scripting and store it in a variable if data contains "_"(i.e data is TEST_1)