Hi,
While automating terminal application, Get field inputs data in field, if field input text is in same row as field label.
But, if in case field input text is below field label, then how can we automate it, independent of field position?
Hi ccma,
I avoid Field related operations when it comes to Terminal Screens in favor of Get Text and Get Text At Positions.
To work with Fields, there is a FIeld Resolution algorithm executed behind the hood of the Terminal App and that is costly in some ways and can be ambiguous (when two field overlap, for instance).
I am not sure why you need something independent of field position. A terminal screen is not really dynamic, once displayed, so you’d be safe to go with Get Text At Position at all times, or, in case you need a portion of screen (such as a table of data), use Screen Scrape (with F3 option to select a region)
Hi,
Thanks for update.
Agreed, objects are not much dynamic. But Reason for looking is menu availability and few fields position changes based on environment used and login user roles.
So, if we get an alternate solution for identifying independent of position, same code can be reused across environments and user roles.
Please suggest, if it is possible.
Well, there would be anchor based OCR, but I don’t think it’s a good idea.
You may want to keep login role and environment as variables if possible and then, for Get Text At Position, you could use variables for row and column (maintaining a List or Dictionary for mapping them dynamically).
Personally, I do not think it’s doable directly dynamic. I just don’t know how.
Thanks for update.