This is exactly as expected. If your class name includes a space, WebDriver will see it as a “compound selector”. You can either remove the space in your By.className()
locator, which should still find the elements you’re looking for; or you can move to finding by CSS selectors, using something like By.cssSelector(".cashout_noCash")
, which offer far more flexibility for similar functionality. This is exactly what the exception message says.