I am using “IBM Personal Communications , iSeries Access for Windows” terminal and uiPath activity “Terminal Session” to connect with “IBM PC terminal”. I can do the data entry, but there is one business scenario where I need to get the text color and basis of that color (Green) I have to add business condition. Can anyone tell me how to capture the text color from terminal session of specific line ?
In my case there is white, Green and black colors are present in terminal window.
Below is the text screenshot;
I am using Get Position activity to get the position of image on this page then I am using find OCR text to get the text location of User on that image.
I added the position of image with position of user word and supplied it as an input to color detector activity.
I am using IBM WINS terminal not the image. There is a scenario where multiple times for a specific text (e.g. google) is in “Green or white” color in multiple WINS pages. So to compare the color robot have move and compare on multiple WINS pages (by pressing down key).
a) As you have guide me one way by using image, if need to use the image then for every page I have to capture the screenshot and process as you suggested.
b) How can I specify Attach Browser activity selector or the path of the image ? How can I specify “Get Position IMG” activity selector ? How can I specify “Find OCR Text IMG” activity selector ?
WINS screen can be move or display at any position when it’s execution started, so how can I get the exact X and Y position for specific text (X and Y position must be present inside the WINS window)?
You don’t need to take screenshot. These activities can be directly applied to terminal window.
Instead of Attach browser use attach window activity(ie attach to terminal window).
This is what I mean:(Please ignore error in image)
@palindrome Please see below screenshot this is the scenario, as shown point 1 and 2 both having the same data , but the difference between them is “White and Green” color. On the basis of color condition only I have to choose the record and process ahead.
I have done a sample code as you have suggested but not getting the required result.
While testing I entered different text in “Find OCR text” activity to get the color from WINS screen, but not getting the exact color as the text is having.
“Get Position” activity lies under “UI Automation”, not under “Terminals”. So does it helpful in my scenario or not ? I am not sure.
As my text position is dynamic so I have used only selectors in code activity not using “indicate on screen” option to capture the informative screenshot.
I have done a sample code as you have suggested but not getting the required result.
Like i said before you ll need to get position of application and add position of text, then only you can find the correct location of word on screen.
While testing I entered different text in “Find OCR text” activity to get the color from WINS screen, but not getting the exact color as the text is having.
Find OCR Text will provide the position of the text with respective to the application window.
Get Position will provide the position of the window with respective to screen
if you add you ll get the position of word with respective to screen. This is what we want to achieve in order to get the color.
“Get Position” activity lies under “UI Automation”, not under “Terminals”. So does it helpful in my scenario or not ? I am not sure.
yes this lies under UI Automation. If terminal is on screen then you can use any kind of UI automation. Color Detector activity takes the X and Y coordinate of pixel on screen and provides it color.
As my text position is dynamic so I have used only selectors in code activity not using “indicate on screen” option to capture the informative screenshot.
This does not matter. only the selectors are useful in identifying any application.
I am able to get the background color of the text, but not the text color actually.
Eg:- I have text “India” in yellow, on the background color “Red”.
After doing the same code for this scenario, I am getting the color of text India as “Indian Red”
inspite of some shade of Yellow.