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).

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

1446


i have to login into gmail loginpage i have to pass testcase into userid and password by using functions. the test case of user id is it should take only lowerletters alphabetin between 4 to 6 length.it should not take spectial letters.it should not take numbers.testcase for password is it should take numbers and it should not take alphabets note the following things must happen 1 when i give correct password and userid that password and userid should be seen in QTP result and notepad,xl sheet 2 when i gave in valid password the system willgive message please give valid password that particular messaage should be seen in QTP result,norepa and xl sheet

1770


How to delete an object from the object repository?

600


what is the hierarchy to use properties in descriptive programming

1507


.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

1685






What is the difference between a Function and Procedure in QTP?

694


How do we handle run-time errors?

590


If you are testing a web application then what will you test in that application?

1547


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1428


How QTP identify the system time that's changes every seconds?

607


What is the extension of the qtp local repository?

570


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

589


Explain building blocks of the bpt framework ?

565


Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?

1425


HOw to add the recovery file at runtime to the test file .

1549