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

hello...any one tell me , where can i get company email id.. actually i am searching on testing... in my CV i put 3+ exp.. but all companies are asked company email id.. please provide solution for that... thanx in advance...

9 Answers   HDFC,


How to test a web application using QTP?there is no any .exe file in web app,then how we can take the application for testing

2 Answers  


In Object Repository, two actions r there. Action1 name is A.tsr, Action2 name is B.tsr. Is it Possible? if Yes, what is the out put of A+B? if No, why?

2 Answers   Kanbay,


Function to convert lowercase to uppercase in QTP Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


h to all plz send me the answer if any one knows about this....i want the java add-ins for the QTP to do my project which is developed under the java platform.

2 Answers   Four soft,






Could some one explain me how to create folder on the desktop from QTP?? This is an interview question

2 Answers   Clinical Soft,


When i used this below script to insert value in the Datatable... At run time it was inserting the given value in the specified column, But after execution all those inserted values were cleared automatically... datatable("column name",sheetid)=value

1 Answers  


suppose im having a string wipro123xyz i need to get the value 123 only from the string today 123 will be in the middle from tommorow it will be changing to front or back how to get the no if it changes continously?

2 Answers   Wipro,


what is the purpose of QTP?

2 Answers  


What are the types of Object Repositories in QTP?

9 Answers  


HI How to take screenshots of a Webpage and saving it in a external word document using QTP.

4 Answers   3i Infotech, TCS,


Use of Multiple Actions in QTP?

3 Answers  


Categories