1
@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?

Sharon
  • 146
  • 1
  • 8

1 Answers1

1

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")
Andersson
  • 51,635
  • 17
  • 77
  • 129