Storeimage bug when linking to a element

Morning

this issue was previously reported a few years ago, but appears to be cropping up again:

  • [info]

Executing: | storeImage | /html/body/div[4]/div/div/div[1]/div/div/div/div/article/section/div/div[5] | bankfeed.png |

  • [warning]

Line 3: Web page connection issue. Retrying last command.

  • [error]

Line 3: ipcPromise: onAsk timeout 500 for cmd “RUN_COMMAND”, args “[object Object]”

can you confirm if this is user error or software error? from what I understand about storeimage, it takes any element and makes a screenshot for later use.

Correct. But to do this, it needs to connect to the website, it seems this fails. Do you have a test case for the support team?

as requested

website is Bank Feed Status - Xero Blog trying to get all the bank feed issues under south africa
{
“Name”: “Daily Bank Feeds”,
“CreationDate”: “2021-7-5”,
“Commands”: [
{
“Command”: “open”,
“Target”: “Bank Feed Status - Xero Blog”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeImage”,
“Target”: “/html/body/div[4]/div/div/div[1]/div/div/div/div/article/section/div/div[5]”,
“Value”: “bankfeed.png”,
“Description”: “”
},
{
“Command”: “open”,
“Target”: “https://mail.google.com/mail/u/0/?tab=rm&ogbl#inbox”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “/html/body/div[7]/div[3]/div/div[2]/div[1]/div[1]/div[1]/div[1]/div[2]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “sven@cfo360.co.za”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${KEY_ENTER}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${KEY_TAB}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “Daily Bank Feeds”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${KEY_TAB}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: " Good Morning see todays bank feeds statuses: ${KEY_ENTER} ${KEY_ENTER} ${bankfeed.png}",
“Value”: “”,
“Description”: “”
}
]
}

Hi All

I managed to get past the error today, not sure what changed but OK.

Want to confirm if it’s possible to directly add a storeimage to an email body as I am getting told the bankfeed is not defined in this case, bankfeed referring to my image in storeimage.

Also noticed it wasn’t necessary to add .png as this got automatically added.

@plankton tested this again and it appears to be extremely moody, I run it three times and the first two times get the error, the third time it worked. Appears to also be happening when I try to access this site and get a image of the element /html/body/div[1]/div[2]/div[1] from https://status.xero.com/ which is basically where it currently states system operational

Can you replace the problematic CLICK | xpath with XCLICK | image ? That should solve it.

even though the click is after the storeimage part?

Ah, I forgot the issue happens with the storeimage command :frowning:

Idea for a workaround:

Instead of storeImage, use OCRExtractRelative. In our case, we (well, you) do not care about the image to text conversion (OCR), but instead we use the fact that the OCR input image is saved as _lastscreenshot.png - in your case this would be storeImage area! In my example it is a screenshot of the best performing daily stock:

Input image: Instead of using XPath to define the area, we mark the anchor area visually (green box). The area “to screenshot” is the pink area:

image

Result:

So I had an idea around all your suggestions and through various previous things and thought well what if I just put a click command within the area I want to take the storeimage from, and so far it appears to be working. The OCR function did work somewhat, but the dynamic nature of the reports made it somewhat jump around and extract odd things at times.

But so far we are good. Thanks for the help.