OCRExtractRelative issue

Hi there, it is a repost of a topic: I am using your software to develop an automated test suite of a web application. In a specific test case, I have to capture through OCR a code displayed within a keyboard showed on the web page and then insert into the digital keyboard available on the web page the 4 random digits shown.
Following the JSON of the test steps:

“Command”: “store”,
“Target”: “0”,
“Value”: “tancode”,
“Description”: “”
“Command”: “OCRExtractRelative”,
“Target”: “tankeyboard_dpi_96.png”,
“Value”: “tancode”,
“Description”: “”
“Command”: “echo”,
“Target”: “${tancode}”,
“Value”: “”,
“Description”: “”

Within the “variables” tab I can see the variable set, but when I echo the result the log writes error as shown:

[info] Executing: | store | 0 | tancode |
[info] Macro completed (Runtime 0.36s)
[status] Playing macro TC-14
[info] Executing: | OCRExtractRelative | tankeyboard_dpi_96.png | tancode |
[info] OCR (eng) started (682 byte)
[info] OCR result received (0.9s from endpoint 3)
[info] Executing: | echo | ${tancode} |
[error] Line 25: variable “TANCODE” is not defined
[info] Macro failed (Runtime 0.03s)

So even if it captures the values, and apparently store the variable, it cannot echoes the content as required. I used both Engine 1 and 2.

Obviously I read the documentation and in “Visual” tab I’ve set the pink box for the text to read and capture, and a green box for the static portion of screenshot.
Before these lines I’ve tried to store a generic value into “tancode” variable, I’ve tried the OCRExtract method also and to store the result into a csv file, but nothing changed.

Can you help me with this problem, please?

Can you please post the “_last_screenshot.png” from the Screenshots tab here? That is the file that is created during the OCRExtractRelative command and submitted to the OCR API. Then I can test it with OCR.

And/or: A screenshot of the website (the area around this TAN code) will also be helpful.

1 Like

Thanks for the interest @ulrich !
Unfortunately I don’t have the last screenshot (I had to change the test because the described issue). Anyway this is the screenshot of the TanKeyboard image , where is shown the tan code and the space where to confirm the requested code.
I state that the last_screenshot worked: I’ve tried to capture the entire code and the single digit, always captured correctly, but I repeat that the problem is after that moment, as the echo has never works.