Need help to click an icon whose HTML element not present

Hi,
As you can see in the attached image, we have an input textbox, when set text on it, a cross icon is displayed in same area, there is no separate element found for that cross icon instead when you mouse over on it only the class changes of input element.

I need to click on this cross icon in Katalon.

Help is highly appreciated,

Thanks,
Uzair.

Hi,
As you can see in the attached image, we have an input textbox, when set text on it, a cross icon is displayed in same area, there is no separate element found for that cross icon instead when you mouse over on it only the class changes of input element.

I need to click on this cross icon in Katalon.

Help is highly appreciated,

Thanks,
Uzair.

Hi there,

In this case, it would be best to use ‘Click Image’ keyword and use the red cross icon as the input image object. This will work properly in case of no HTML is attached to the element.

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO

Can you please give me an example in this regards?

WebUI.clickImage(findTestObject(‘img_Logo’))
so img_logo means c:/images/abc.jpg
am I right?

Hi there,

Yes that’s right. Please also remember to select the image also in ‘img_Logo’ object

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO

Thanks, Done it.

Hi Oliver,
How do I make this image path dynamic? Like use any global variable instead of using a hard coded file path.

Hi there,

There is a checkbox called ‘Use relative path’ below image field in the test object. Please check it so you don’t need to worry about hard coded file path

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO