How to put WebElements in a list


List <WebElement>  sList = cDriver.findElement(“sex”));


The above throws an error

Exception in thread “main” java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to java.util.List
at Demo.main(



Default Asked on December 28, 2018 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.