Question

Image Recognition command is not working in Unattended mode in V11.3


Badge +4

Hi All!

My bot is capturing the specific action on the website. I used image recognition command multiple times to check if specific image present on specific page which works fine when run on local machine or on runner machine in attended mode. When I try to schedule it on runner m/c it is throwing error at almost every image recognition command as mentioned below. Each time it is giving different error.

  1. Image not found!
  2. Error Message: Image not found!
     
    Kindly edit the Image Recognition command with the following steps:
    - Use the 'Repeat if image not found' option.
    - Use the 'Quick Test' option to check if the image is indeed present.

Please help!!!


17 replies

Badge +4

Hi All!

My bot is capturing the specific action on the website. I used image recognition command multiple times to check if specific image present on specific page which works fine when run on local machine or on runner machine in attended mode. When I try to schedule it on runner m/c it is throwing error at almost every image recognition command as mentioned below. Each time it is giving different error.

  1. Image not found!
  2. Error Message: Image not found!
     
    Kindly edit the Image Recognition command with the following steps:
    - Use the 'Repeat if image not found' option.
    - Use the 'Quick Test' option to check if the image is indeed present.

Please help!!!

Also when bot runs in attended mode blank error screen getting captured in error handle.

I have checked for Scaling and resolution of both the machines and they are same.

Anybody has any idea!!

Badge +4

@Pallavi Desai  - Pl check the screen resolution

Userlevel 5
Badge +14

@Pallavi Desai : check if screen resolution and scaling percentage is same 

Badge +4

@Pallavi Desai  - Pl check the screen resolution

Hi @Shyam ,

Thank you for reply!!!

I checked the resolution as well as scaling and it same on my local m/c as well as on bot runner

 

Badge +4

@Pallavi Desai : check if screen resolution and scaling percentage is same 

Hi @rbkadiyam 

Thank you for reply!!!

I checked the resolution as well as scaling and it is same on my local m/c as well as on bot runner

Badge +2

Make Sure  this before you run the bot

  1.  Screen Resolution should be 100%.
  2. Your Laptop should be of Full HD Resolution (1920*1080)
  3. Bot Runner Device should not be opened with the laptop that has not Full HD Resolution. 
Badge +4

Make Sure  this before you run the bot

  1.  Screen Resolution should be 100%.
  2. Your Laptop should be of Full HD Resolution (1920*1080)
  3. Bot Runner Device should not be opened with the laptop that has not Full HD Resolution. 

Hi @karthik CN.

Thanks for the reply!!

I have following resolution on my laptop which is the maximum one

Secondly the bot runner m/c screen resolution is below:

 

Badge +2

may i know what is the max screen resolution of bot runner . is your bot runner is RDC i mean Remote Desktop 

Userlevel 5
Badge +9

@Pallavi Desai 

Are you using RDP or Autologin approach?

 

 

Try the following:

  1. Recapture the image.
  2. Keep redefining the parameters for Tolerance, Comparison and Percentage Match till the Quick Test is a success. Hence, you can do any or all of the following:
    a. Reduce the Match Percentage value.
    b. Increase the Tolerance value
    c. Select a different Comparison mode.

Also, check the following KB

https://apeople.automationanywhere.com/s/article/Commands-like-Object-Cloning-Image-Recognition-Keystrokes-Etc-Do-Not-Work-In-Unattended-Mode-When-Autologin-Is-Enabled-And-Error-Out-With-Black-Screenshot-On-Failure

HTH

Regards

Badge +4

 Hi @Pallavi Desai 

 

Run the below screen resolution script in bot runner RDC and check the correct screen resolution.

 

dim vid
dim vStatus

for each vid in getobject("winmgmts:").instancesof("Win32_VideoController")
vStatus = "Resolution: " & vid.CurrentHorizontalResolution & "x" & vid.currentVerticalResolution
next
'Wscript.Echo vStatus
Wscript.Stdout.Writeline vStatus
WScript.Quit

Badge +5

I have had this issue before and oddly it ended up not being a resolution issues. I have seen within my space that in an unattended run that the image you are looking for is not in the same spot on the screen as when running attended or VDI open. How i have solved this was by putting screen captures before and after the image recognition command. By doing this you can pinpoint the exact location of the image. From there i would use IF image recognition options to account for the original location when open and the image location when VDI is closed.. this has helped me a ton. I also set the IF image recognition command to try to find it 3 times by 50ms so that it does not delay your process as bad. 

 

Hopefully that is helpful although it does add some work… ps after you resolve the issue, if that is your issue, you can disable the capture screen commands

Badge +4

 Hi @Pallavi Desai 

 

Run the below screen resolution script in bot runner RDC and check the correct screen resolution.

 

dim vid
dim vStatus

for each vid in getobject("winmgmts:").instancesof("Win32_VideoController")
vStatus = "Resolution: " & vid.CurrentHorizontalResolution & "x" & vid.currentVerticalResolution
next
'Wscript.Echo vStatus
Wscript.Stdout.Writeline vStatus
WScript.Quit

Hi @Shyam ,

I ran the script given by you on bot runner m/c and surprisingly it is showing different resolution as ‘1706X686’ whereas in display setting it is showing as below which is same as my laptop. Since bot runner is VMware and our admin has restricted any changes to the resolution I don’t understand how to resolve this now. 

 

Badge +4

Hi @Pallavi Desai,

 

Update 1366*768 screen resolution in your laptop and try to re-capture & save the bot. Then check-in the bot code and run it in runner machine.

Badge +4

Hi @Pallavi Desai,

 

Update 1366*768 screen resolution in your laptop and try to re-capture & save the bot. Then check-in the bot code and run it in runner machine.

Hi @Shyam ,

My laptop already has same resolution as 1366*768 bot runner is showing ‘1706X686’ when I ran the script.  The 1366*768 is the max resolution I can set on my laptop.

Badge +4

sorry @Pallavi Desai I misunderstood. Please raise a ticket with your Infra/Desktop team and inform them to update the 1366*768 resolution in all your bot runner machines

Badge +4

@Pallavi Desai Screen Resolution change needs to be done in VMware display driver.

Badge +4

sorry @Pallavi Desai I misunderstood. Please raise a ticket with your Infra/Desktop team and inform them to update the 1366*768 resolution in all your bot runner machines

@Pallavi Desai Screen Resolution change needs to be done in VMware display driver.

@Shyam  Thanks !!

Reply