title: Not able to click second checkbox using relative locator
body: <p>I have following HTML code </p>
  
  <pre><code>&lt;div class="compatible-product ng-star-inserted"&gt;
    &lt;adapt-checkbox2 class="checkbox ng-valid ng-star-inserted ng-dirty ng-touched" ng-reflect-model="false"&gt;
      &lt;label class="checkbox__label" for= "adapt-checkbox-453-input"&gt;              
        &lt;input class="checkbox__input" type="checkbox" id="adapt-checkbox-453-input" tabindex="0" aria-label="" aria-checked="false"&gt;
        &lt;span class="checkbox__item"&gt; 
           &lt;span class="sr-only" ng-reflect-ng-class="[object Object]"&gt;&lt;/span&gt;             
        &lt;/span&gt;
      &lt;/label&gt;
    &lt;/adapt-checkbox2&gt;
    &lt;span class="compatible-product-name" style=""&gt;Product - ABC&lt;/span&gt;
  &lt;/div&gt;
  &lt;div class="compatible-product ng-star-inserted"&gt;
    &lt;adapt-checkbox2 class="checkbox ng-untouched ng-pristine ng-valid ng-star-inserted"&gt;
      &lt;label class="checkbox__label" for="adapt-checkbox-454-input"&gt;           
        &lt;input class="checkbox__input" type="checkbox" id="adapt-checkbox-454-input" tabindex="0" aria-label="" aria-checked="false"&gt;
        &lt;span class="checkbox__item"&gt;
          &lt;span class="sr-only" ng-reflect-ng-class="[object Object]"&gt;&lt;/span&gt;              
        &lt;/span&gt;
      &lt;/label&gt;
    &lt;/adapt-checkbox2&gt;
    &lt;span class="compatible-product-name" style=""&gt;Product - XYZ&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0iOkd.png" rel="nofollow noreferrer">Please check screenshot here</a></p>
  
  <p>From which 
  1) First I need to select/click on "adapt-checkbox2" who is left to Span "Product - ABC"
  So I have written code as follows</p>
  
  <pre><code>WebElement selectCompatibleProduct1 = driver.findElement(RelativeLocator.withTagName("adapt-checkbox2").toLeftOf(By.xpath("//*[text()='Product - ABC']")));
      selectCompatibleProduct1.click();
  </code></pre>
  
  <p><strong>Which is working fine. Its selecting the correct check-box.</strong></p>
  
  <p>2) But Whenever I tried to select 2nd check-box its not working. Its again clicking/selecting 1st checkbox. 
  Code for 2nd checkbox is:-</p>
  
  <pre><code>WebElement selectCompatibleProduct2 = driver.findElement(RelativeLocator.withTagName("adapt-checkbox2").toLeftOf(By.xpath("//*[text()='Product - XYZ']")));
  selectCompatibleProduct2.click();
  </code></pre>
  
  <p>Selenium Version is:- 4.0.0-alpha-3
  Please can someone help me on this?
  Thanks in advance.</p>