@FindBy with Arquillian Graphene using className

91 views Asked by At
@FindBy(className = "shellTileBase")
  private WebElement tile;

@FindBy(className = "FilterDefault FilterIcon UiIcon IconMirrorInRTL")
  private WebElement form;

I am working with selenium and testng but am trying to add arquilliian to my testing. can arquillian handle

@FindBy(className ="")

With multiple class names as per my above example. When I run this I am getting a:

InvalidSelectorError: Compound class names not permitted 

Is there a way around this?

1

There are 1 answers

0
Andersson On

Compound class names (class names with a spaces) cannot be used as selector in search by className. You can solve it using XPath as below:

@FindBy(xpath="//*[@class='FilterDefault FilterIcon UiIcon IconMirrorInRTL']")

or CSS:

@FindBy(css=".FilterDefault.FilterIcon.UiIcon.IconMirrorInRTL")