Skip to content

Trouble understanding visual automation element identifiers - check this #143

Closed
@crea7564

Description

@crea7564

Hi,

I'm new to rpa-python, thanks for the great package!

I was interested to try and get visual automation to work.

Based on the documentation, here's what I was under the impression could/should work:

  1. I capture an image of a button and I save this image somwhere, "/path/to/button.png"
  2. when I call r.click("/path/to/button.png") then it would search the screen for something visually similar using computer vision and click it

What I did actually get to work (occasionally) that it clicked the cell in my jupyter notebook where I had written that code 😄

So I'm a bit confused. I tried screenshots, I tried 1-1 the same image file as the one I wanted it to recognise, basic shapes like red square etc. but I never got it to click an image. So I'm wondering if my interpretation of the docs is off and I'm simply barking up the wrong tree?

The docs further say

If the image file specified does not exist, OCR will be used..

I can see how this is handy in making RPA process more robust.

However, is there really no feedback on whether the OCR fallback mechanism or visual automation was used? No matter what I put in this r.click() API might as well do OCR only. Was it doing anything at all with my image and how I would go about debugging this? By the way, this also makes it impossible to work in a Jupyter notebook since it's clicking my notebook code instead of the visual button I want to hit which is quite funny but a bit frustrating 😃

I'm on OSX Catalina, other functionality was working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions