Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
260 views
by The go-to Tester (473 points)
at executionEngine.ScriptTest.main(ScriptTest.java:28)
Caused by: org.openqa.selenium.InvalidSelectorException: The given selector button radius secondary borderless is either invalid or does not result in a WebElement. The following error occurred:
InvalidSelectorError: Compound class names not permitted
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
by The go-to Tester (181 points)
Can you post your code using which you are identifying an element?
by The go-to Tester (473 points)
moved by
driver.findElement(By.id("simplePopup")).findElement(By.className("button radius secondary borderless")).click();

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

Okay. className can not have spaces. 

This is wrong

By.className("button radius secondary borderless")

Instead use CSS selector or xPath. Also, see if you can use name, linkedText or partialLinkedText. I assume that you do not have unique ID.

...