title: Get list of an elements using Selenide
body: <p>I am trying to locate an element on a website and get all of the elements. For that, I use Selenide/Selenium. The element what I am looking for is not locatable by one class, so for that I am trying to locate an element with two class (parent and child). With only Selenide, I can easily locate an element using:</p>
  <p><code>SelenideElement basketIcon = $(By.className(&quot;buttons&quot;)).$(byClassName(&quot;btn-cart&quot;))</code></p>
  <p>this will give me one element for sure.  But how can I locate an array of an elements?
  <code>List&lt;SelenideElement&gt; productName1 = WebDriverRunner.getWebDriver().findElements(By.className(&quot;&quot;));</code> but it is not working, also I've tried so: <code>List&lt;WebElement&gt; productName = WebDriverRunner.getWebDriver().findElements(By.className(&quot;buttons&quot;));</code> but here how can I add another class to locate an element? <code>$(byClassName(&quot;btn-cart&quot;))</code>? Or is there another method to do that?</p>
  <p>I've also tried using <code>ElementsCollection elements = WebDriverRunner.getWebDriver().findElements(By.className(&quot;&quot;));</code> but it is not working...</p>
  <p><strong>EDIT:</strong>
  I have a class called &quot;DriverFactory&quot; which is for opening a browser:</p>
  <pre><code>public static void openBrowser(String browserName, String url) throws Exception {
      
          WebDriverManager.chromedriver().browserVersion(chromeversion).setup();
          Configuration.browser = &quot;Chrome&quot;;
          Configuration.startMaximized = true;
          driver.get(url);
      }
  </code></pre>
  <p>Another class, where I define locators:</p>
  <pre><code>public class EE_MonitorCategoryElements extends DriverFactory {
  
  
  protected static List&lt;WebElement&gt; productName = getWebDriver().findElements(By.id(&quot;asddsa&quot;));
  }
  </code></pre>
  <p>and a Test class:</p>
  <pre><code>@Test
  public void ads() throws Exception {
      DriverFactory.openBrowser(&quot;Chrome&quot;, &quot;https://google.ge&quot;);
  }
  </code></pre>
  <p>When I added that last one element locator, with &quot;getWebDriver()&quot; and I am trying to run the test, it gives me an error: No tests were bound, and where I delete/comment getWebDriver line, it is working</p>