How can I click on an image with .svg format?

Hi. In an application I have the image icon of a calculator but I can’t verify the presence of this image or click on it. Could you suggest how can I work with this .svg image?

image.png

As far as I’m aware, it’s just another element.

Paste a portion of the HTML containing the svg stuff so I (we) can take a look.

Hi Russ:

This is part of the html:

Interés por Mora

Ver detalle

Calcular interés

903

Hi Fernanda

This…

<img id="verInteres"  ...>

is a regular HTML img element. You should be able to click it like any other element. (SVG elements look like <svg…>…)

How are you trying to perform the click? Did you try recording it? Are you writing the click yourself in Script? Let me know what you’ve tried and what fails to work (including any errors you receive).

Russ

This is the code that i am trying to execute:

WebUI.clickImage(findTestObject(‘Page_Declaraciones por internet (9)/img_calInteres’))

WebUI.clickImage(findTestObject(‘Page_Declaraciones por internet (9)/img_calMulta’))

This is the error:

Unable to click on image (Root cause: java.lang.IllegalArgumentException: This object don’t have IMAGE_FILE property, please add it)

I tried to add the image using the setting for the image, but the format that Katalon accept are: .jpg, .gif, .png

Hi Fernanda

Try

WebUI.click(findTestObject(...

If it works, post a bug in the Bugs forum, stating that clickImage should support ANY image format (presumably even data: URIs, as well as SVG et al).

Thanks Russ. I will register a bug. I changed the code using WebUI.click , it works fine.