A dialog is diplays " Transaction 254689 has been
successfully completed" How to get the transaction ID from
the message ?

Answers were Sorted based on User's Feedback



A dialog is diplays " Transaction 254689 has been successfully completed" How to get the ..

Answer / lakshmi

Capture the text into a variable by using GETROPROPERTY.

So now

Str="Transaction 254689 has been successfully completed"
Arr=Split(Str," ")
for i=0 to ubound(Arr)

if IsNumeric(Arr(i))=true then
Msgbox "Transaction ID is "& Arr(i)
End if
Next

Is This Answer Correct ?    8 Yes 0 No

A dialog is diplays " Transaction 254689 has been successfully completed" How to get the ..

Answer / tester

Get the message using GetROproperty.then use spit function
suppose
var1="Transaction 254689 has been successfully completed"
spl=split(var1," ")
msgbox spl(1)

Is This Answer Correct ?    7 Yes 1 No

A dialog is diplays " Transaction 254689 has been successfully completed" How to get the ..

Answer / sandeep guttikonda

This task can be done by using the QTP methods:
we are having
1) GetVisibleText
2) GetROProperty
3) GetTOProperty

As it is dialog it will appears during runtime so by using
GetROProperty we can capture the text.

Example:
Captured_Text = Window("window Name").Dialog("Dialog
Name").Object("Object Name").GetROProperty("Property Name")

Hence the entire line will be stored in Captured_Text

Now we need to retrieve the transaction ID:
For this we have Split function in VBScript

Syntax: Split(Expression, Delimeter)

Example: Transaction_ID = Split(Captured_Text, " ")
Here in this case the transaction ID, 254689 will be in
Transaction_ID(1).

Please let me know if you need further info.

Thank.

Regards,
Sandeep Guttikonda.

Is This Answer Correct ?    5 Yes 0 No

A dialog is diplays " Transaction 254689 has been successfully completed" How to get the ..

Answer / pravati

x="Transaction 254689 has been successfully completed"
for i=1 to len(x)
y=mid(x,i,1)
if isnumeric(y) then
z=z & y
end if
next
msgbox z

Is This Answer Correct ?    0 Yes 0 No

A dialog is diplays " Transaction 254689 has been successfully completed" How to get the ..

Answer / mdbasha7862@gmail.com

Try with 'MID Function'

var2="Transaction 254689 has been successfully completed"
midfun=mid(var2,12,6)
msgbox (midfun)

Is This Answer Correct ?    0 Yes 2 No

A dialog is diplays " Transaction 254689 has been successfully completed" How to get the ..

Answer / qtphelper

Use GETRO and obtain the inner text . Since every time the
number is generated after transaction use mid function and
retrieve the number

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More QTP Interview Questions

In qtp, how you can exit for loop?

0 Answers  


need clear explanation of actions and functions in qtp with examples?can anyone suggest me gud site for that other than qtp manual?

2 Answers  


If the objects hierarchy is changing from build to build, then how you will handle that condition?

0 Answers  


hi this is srinivasa(from blr) i complited my B.tech(e.c.e) in 2007 im searching job in s/w testing but idont have freshers resume for s/w testing please send some s/w testing resume for me(fresfers resumes only) advns thnks you

2 Answers  


how to re-install QTP 9.0 trial version.

25 Answers  






Did you use flatfiles in your projects?At what situation you used it?How can you upload flatfiles?

1 Answers  


What is a Patch in QTP?

0 Answers  


Can any body tell me how can I choose the share object repository and per action object repository mode. Please give me with steps.

4 Answers  


How would you directly trigger javascript in a test?

0 Answers   eBay,


I am using excel sheet to export data to QTP but it selects just one row of data from excel sheel how to import all rows of excel sheet to QTP during runtime

10 Answers   IBM, Wipro,


When there is descriptive programming, why do we go for Object repository for desigining scripts.?? why cant we use descriptive programming instead of using the Object repository..??

4 Answers   DST Global Solutions,


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

0 Answers  


Categories