The class attribute of this element...
<button style="padding:2px 7px; background-color:#4caeea"
class="btn btn-xs btn-custom" </button>
contains multiple classnames.
Using By.classname("btn btn-xs btn-custom")
you won't be able to locate it as:
Find elements based on the value of the "class" attribute. If an element has multiple classes, then this will match against each of them. For example, if the value is "one two onone", then the class names "one" and "two" will match.
As per your requirement, avoiding the xpath & css-selectors you still can use classname but the element may not be the first/only match. As an example:
By.classname("btn")
//would match all the elements which contains the classname btn
By.classname("btn-xs")
//would match all the elements which contains the classname btn-xs
By.classname("btn-custom")
//would match all the elements which contains the classname btn-custom
As an alternative, you can also use the following Locator Strategies: