In my website, I have to click in an icon to be able to edit a user settings. So I want to be able to create a test in testRigor to click in this icon and edit the user settings. For example, if I want to create a test to click in a button that it's written "Edit", I just have to write in the test steps: press "Edit", but if instead of written "Edit", it's just an icon/image what should I write, press "???" ?
Asked
Active
Viewed 413 times
1
-
Sorry, I have edited my description, let me know if it's still not clear. – Michele Weber Mar 07 '22 at 00:38
-
Hey, please do post code(if any) you have worked till now. – Abhishek Dutt Mar 07 '22 at 03:01
1 Answers
0
In testRigor you have multiple ways to refer to elements on the screen. Of course, there is a visible text you can rely on it. However, there are many more like:
click "Edit"
in case you enabled ML-based image classification and the icon looks like an edit icon. You can see all supported icons here. Or the button has aria-label set to "Edit". Or one of CSS classes contains "edit".
Alternatively, you can rely on relative locations and indexes. For example:
click on the second button on the right of "Something"
click on the third button on the right of stored value "myId"
In general, all of the ways to refer to elements are described here.

Artem
- 7,275
- 15
- 57
- 97