title: Retrieving aria-label value using Selenium's find function
body: <p>I have the xpath of an element on a website but I'm trying to get the aria-label value of that element.</p>
  <pre><code>    # NO SUCCESS: print(WebDriverWait(browser, 20).until(EC.visibility_of_element_located((By.XPATH, &quot;element_xpath_you_found&quot;))).get_attribute(&quot;aria-label&quot;))
      # NO SUCCESS: first_rev = browser.find_element(By.xpath, &quot;/html/body/span/g-lightbox/div[2]/div[3]/span/div/div/div/div[2]/div[1]/div/div[2]/div[1]/div[1]/div[3]/div[1]/g-review-stars/span&quot;)
      
      first_rev = browser.find_element_by_xpath(&quot;/html/body/span/g-lightbox/div[2]/div[3]/span/div/div/div/div[2]/div[1]/div/div[2]/div[1]/div[1]/div[3]/div[1]/g-review-stars/span&quot;).click()
      aria_label = first_rev.find_element_by_css_selector('span').get_attribute(&quot;aria-label&quot;)
      print(aria_label)
  </code></pre>
  <p>On the browser, I inspect the element and get this html:</p>
  <pre><code>&lt;span class=&quot;fTKmHE99XE4__star fTKmHE99XE4__star-s&quot; aria-label=&quot;Rated 3.0 out of 5,&quot; style=&quot;&quot;&gt;&lt;span style=&quot;width:42px&quot;&gt;&lt;/span&gt;&lt;/span&gt;
  </code></pre>
  <p>However, can the problem be that this element is inside a pop-up on the page? Page source doesn't show any html for any element in the pop-up.</p>