Within my project, all locators are defined as elements of an enum and follow this format:
For example, if it is a CSS locator -
DIV_LOCATION("css=div.location-text.text-overflow")
. This method parses the string and identifies it as a CSS locator if it begins with css=
.
Similarly, for an XPath locator -
DIV_HEADER_GRP_TITLE("//*[contains(@class,'conversation-title')]//div")
I am looking to create a universal CSS locator that can locate both of these elements:
<div class='conv-title'>...</div>
and <div class='conversation-title'>...</div>
How can I achieve this?
The locator must start with css=