on 06-20-2012 4:01 PM
Is there a way to get the exact text from a popup? i.e. Session.findbyid("wnd[1]").Text only gets the title of the popup. Also counting the number of push buttons will not work for my scenarion to identify the popup box.
Hi,
Using the SAP script recorder and Hit Test should get you around this.
But just started a Q as:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Todd,
you can get the exact text from a popup by using this code:
RowOne= Trim(session.findById("wnd[1]/usr/txtMESSTXT1").text)
RowTwo= Trim(session.findById("wnd[1]/usr/txtMESSTXT2").text)
(in SAP version 7.20)
Counting the numbers of push buttons will follow tomorow.
Kind Regards,
netkid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I didn't recognize you're not using the FI-Modul.
I don't know this example will help you (no guarantee).
As I promised the code for the buttons (in FI-Modul):
Hint: First you have to focus the first line, to go on in this popup
session.findById("wnd[1]/usr/txtMESSTXT1").setFocus
session.findById("wnd[1]/tbar[0]/btn[0]").press 'Button "Continue"
session.findById("wnd[1]/tbar[0]/btn[12]").press 'Button "Cancel"
You have to test it.
Or you start the SAP script recorder and create this popup.
Then you push one button and you'll see then it's exact code.
Hope this will help you.
Bye, netkid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.