how to recognie an element whose class changes

I want to take a test on a website that there are some elements which have classes more than 2.

For example, there is a white button and it changes as black when mouse is over.

In this case, if I take a test with basic Xpath that I get from a recording didn’t work well.

So I change Xpath by myself or using chrome’s developer mode to solve this problem.

 

Is there any way I can record like Chrome Xpath with Katalon??

You can get the xpath from Chrome Developer tools and set it to Katalon Studio for this. Also you can try select multiple different properties to identify objects instead of using xpath.