title: Choose one particular element from two separate lists
body: <p>Could someone, please, assist in following case:
  Namely, have to pickup one country from the list and one league form second list.
  <strong><em>Tried with AND function, but in Selenium it throws error as non-existing element, while found as a two separate lists as shown below</em></strong></p>
  
  <p>List of countries:</p>
  
  <pre><code>List&lt;WebElement&gt; chosenCountry = driver.findElements(By.xpath("//body//be-list[contains(@class, 'ng-star-inserted')]/ul//li/div/span/h4/img"));
      for (int i = 0; i &lt; chosenCountry.size(); i++) {
          // System.out.println(chosenCountry.get(i).getAttribute("title"));
          String country = chosenCountry.get(i).getAttribute("title");
      }
  </code></pre>
  
  <p>which looks like:</p>
  
  <pre><code>Argentina
  Brazil
  Chile
  Colombia
  England
  India
  International
  Iran
  Jamaica
  Kuwait
  Mexico
  Scotland
  </code></pre>
  
  <p>List of Leagues:</p>
  
  <pre><code>List&lt;WebElement&gt; chosenLeague = driver.findElements(By.xpath("//body//be-list[contains(@class, 'ng-star-inserted')]/ul//li/div/span"));
      for (int k = 0; k &lt; chosenLeague.size(); k++) {
          // System.out.println(chosenLeague.get(k).getText());
          String league = chosenLeague.get(k).getText();
      }
  </code></pre>
  
  <p>which looks like:</p>
  
  <pre><code>Primera B Metropolitana
  Primera C
  Superliga
  Paulista A2
  State Leagues
  Primera B
  Primera Division
  Championship
  League 1
  League 2
  National League
  </code></pre>
  
  <p>Note, that those data are dynamical ones, so it is useless to pickup needed element from <strong>get(i)</strong>. </p>
  
  <p>Tried with if clause without success:</p>
  
  <pre><code>if ( chosenCountry.get(i).getAttribute("title").equals("England)||chosenLeague.get(k).getText().equals("Championship") {
  </code></pre>
  
  <p>It throws error and not giving me any option.
  Where do I making mistake?
  Thank you in advance</p>