title: Selenium WebDriver, Can't properly select/assert a radio button on amazon? Any tips?
body: <p><a href="https://www.amazon.com/gp/customer-preferences/select-language/ref=topnav_lang?ie=UTF8&amp;preferencesReturnUrl=%2Fb%2Fref%3Ds9_acss_bw_cg_147ECPv2_2b1_cta_w%3Fnode%3D12691224011%26pf_rd_m%3DATVPDKIKX0DER%26pf_rd_s%3Dunified-hybrid-3%26pf_rd_r%3DP9VPVM94B4HVV8WQZ9YS%26pf_rd_t%3D101%26pf_rd_p%3D45797eec-3609-4e49-908f-fe170faf8aaf%26pf_rd_i%3D13896617011" rel="nofollow noreferrer">link to the page with buttons</a></p>
  
  <p>One of my attempts:</p>
  
  <pre><code>@Test
  public void checkRadioBtn()
  { 
      WebElement langEng = driver.findElement(By.xpath(".//*[@id='customer-preferences']/div/div/form/div[1]/div[1]/div[1]/div/label/i"));
  
      if(!langEng.isSelected())
      {
          langEng.click();
      }
  
      assertTrue("English is selected", langEng.isSelected());     
  
  }
  </code></pre>
  
  <p>assertTrue should throw and error if the condition is false. The option is selected, it throws an AssertionError. What is going on here?</p>