But I don’t know if there is a better solution to identify the element based on the property class.
Thus I don’t know which command to use for checking the property backgroundColor on the element whose the attribute class contains the word “edit” (in order to identify this button).
You could try assertEval | getComputedStyle(document.getElementsByClassName(‘ux-button_content’)).getPropertyValue(‘background-color’) | rgb(0, 68,148)
Hi @dennis.hohn I already used that. It’s working usually. But If I have 2 buttons: one for edit, and another for Cancel on the same page, only a part of the class name changes:
As you can see, the attribute class can change a little bit: “eui-icon eui-icon-edit” or “eui-icon eui-icon-close”.
That’s why I asked you how to identify better the button when only a part of the class name changes.
How I can do that ?
@amadese in the case of having multiple elements, you will need to specify the location of the button you are trying to read. Note the added [1] below. You’ll need to determine what the location is and adjust that number locate the element you are looking to find.