Recently I was trying to automate one Attachmate Reflection application using terminal activities. The difficulties I experienced during this effort is as below
I was filling an order in order entry screen . At final step when i get an order number I am not able to capture that value using get text activity. I am getting timeout error. is there any way to capture the value and store it anywhere for future use?
Is there anyway i can use dynamic data while filling an order in order entry screen ?
Yes, it is possible, You can use the same type into activities and you can fill the data dynamically.
First of all, add the data you have into a dictionary if the data is as key value pair and enter the values as dictionary(“key name”).tostring
if you have more columns related to one field, then use data table and iterate through the data table using for each row and then enter the values as row(“column name”).tostring
In general, you will use the Move Cursor followed by Send Keys to type into a terminal screen. But, you can also use the Send Field at Position. It depends on your emulator of what works best.
And, you will use the Send Control Key for action keys, assuming it works with your emulator, and if it doesn’t, then a Send HotKey will be needed (which is tricky cause it requires a selector)
To get the screen text, you will use the Get Text at position most of the time.
To smooth the automation, you will use the Wait Screen Text in between screens, as long as it is unique between screens.
The emulator should have a coordinate somewhere, which you can go by when using the position. Using this coordinate, you can dynamically input rows into a terminal screen by using a counter (reset it for multiple page screens)
I would suggest getting outside the wizard, because it could be the wizard causing that error. You should be able to use Get Screen Text or Get Text at position for that. If you use Get Screen Text, then you would need to use .Split() to get the text you need.
I really don’t like the idea of you using Attach Window with the element Get Text for Terminal interaction. But, that’s just my opinion, and I am not sure on your terminal emulator which you are using.
It is attachmate reflection terminal emulator…I am not using attach windowas well…i am using simple terminal session…which open this screen…I am also getting time out error in get screen text…I am not sure how to go outside the wizard and get that value.
I meant to exit the wizard and place the activities in your Terminal Session activity. Then run it from Studio to see if it gets the text. You can check the text by using a Message Box with the variable used in the Output property of either the Get Screen Text or Get Text at position.
Attach window sounds great and it gives the flexibility of coding each window separately.
Since screen scrapping will be mostly used in attach window to find the screens are moving / refreshing after a transaction is submitted in terminal.
What is the success rate of screen scraping on AS 400 terminals ?