Democanvas fails with timeout reached when looking for element 'link=Mapbox'


#1

I ran the code again and then it worked and only complained:
* [error][ignored]

Image 'canvas_wyoming_verify_dpi_96.png' (conf. = 0.5) not found

I don’t know why I would get two results running the same script…

Is there a better place to post bugs?

here’s the code:

{
  "CreationDate": "2018-10-4",
  "Commands": [
    {
      "Command": "store",
      "Target": "fast",
      "Value": "!replayspeed"
    },
    {
      "Command": "open",
      "Target": "https://a9t9.com/kantu/demo/canvas",
      "Value": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "link=LiterallyCanvas",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "First a simple clickAt demo (3 dots)",
      "Value": ""
    },
    {
      "Command": "clickAt",
      "Target": "//*[@id=\"literally-canvas\"]/div[1]/div[1]/canvas[2]",
      "Value": "28,28"
    },
    {
      "Command": "clickAt",
      "Target": "//*[@id=\"literally-canvas\"]/div[1]/div[1]/canvas[2]",
      "Value": "58,28"
    },
    {
      "Command": "clickAt",
      "Target": "//*[@id=\"literally-canvas\"]/div[1]/div[1]/canvas[2]",
      "Value": "88,28"
    },
    {
      "Command": "comment",
      "Target": "Just image search the canvas!",
      "Value": "88,28"
    },
    {
      "Command": "visionLimitSearchArea",
      "Target": "element://*[@id=\"literally-canvas\"]/div[1]/div[1]/canvas[2]",
      "Value": ""
    },
    {
      "Command": "visualVerify",
      "Target": "canvas_3dots_verify_dpi_96.png",
      "Value": ""
    },
    {
      "Command": "open",
      "Target": "https://a9t9.com/kantu/demo/canvas",
      "Value": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "link=Mapbox",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "Test: Embedded map (Mapbox)",
      "Value": ""
    },
    {
      "Command": "selectFrame",
      "Target": "id=demo",
      "Value": ""
    },
    {
      "Command": "visionLimitSearchArea",
      "Target": "viewport",
      "Value": ""
    },
    {
      "Command": "visualAssert",
      "Target": "canvas_wyoming_dpi_96.png@0.60",
      "Value": ""
    },
    {
      "Command": "clickAt",
      "Target": "#efp",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "Now verify that the click (= the map) works as expected",
      "Value": ""
    },
    {
      "Command": "visualVerify",
      "Target": "canvas_wyoming_verify_dpi_96.png@0.5",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "Test Google Maps: Find & click Hyde park, and check that its info bubble shows.",
      "Value": ""
    },
    {
      "Command": "open",
      "Target": "https://a9t9.com/kantu/demo/canvas#maps",
      "Value": ""
    },
    {
      "Command": "visionLimitSearchArea",
      "Target": "viewport",
      "Value": ""
    },
    {
      "Command": "visualAssert",
      "Target": "canvas_hydepark_dpi_96.png@0.70",
      "Value": ""
    },
    {
      "Command": "selectFrame",
      "Target": "index=0",
      "Value": ""
    },
    {
      "Command": "clickAt",
      "Target": "#efp",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "Now verify that the click (= the map) works as expected",
      "Value": ""
    },
    {
      "Command": "visualVerify",
      "Target": "canvas_hydepark_verify_dpi_96.png@0.70",
      "Value": ""
    }
  ]
}

#2

Is there a better place to post bugs?

The forum is the best place to post bugs, so we can all discuss, verify and then fix them.

Now, about your question:

What browser and what operating system are you using? Each browser renders images a bit different, and to adapt to it we have the confidence value for the image search:

"Target": "canvas_wyoming_dpi_96.png@0.60",

Note the @0.60:

=> Can you try to reduce the value to, say, 0.50 and see if it works better?

confvalue

You can also use the FIND button to run the image search and tweak the confidence value.

Another solution would be to use the SELECT button and grab a new image, directly on your system. Then it should work for sure.


#3

re my browser
Version 68.0.3440.106 (Official Build) (64-bit)
re: OS
Ubuntu 18.04

re: Kantu tests
I definitely need to rerun the tests before posting! I just ran the same Democanvas and it worked as advertised. Sorry for the confusion, though, why errors on one day and no errors the next? Anyway.

thanks and with regards,
Dennis