title: How to get the value of a span inside a li using Python Selenium webdriver?
body: <p>I am trying to get the value of SCN from my HTML page which is in this format- </p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;div class="hs-customerdata hs-customerdata-pvalues"&gt;
              &lt;ul&gt;
                  &lt;li class="hs-attribute"&gt;
                      &lt;map-hs-label-value map-hs-lv-label="ACCOUNTINFO.SCN" map-hs-lv-value="89862530"&gt;
                      &lt;span class="hs-attribute-label" hs-context-data="" translate="" hs-channel="abcd" hs-device="desktop"&gt;SCN:&lt;/span&gt;
                      &lt;span ng-bind-html="value | noValue | translate : params" class="hs-attribute-value" context-data="" map-v-key="89862530" map-v-params="" hs-channel="abcd" hs-device="desktop"&gt;
                      89862530&lt;/span&gt;
                      &lt;/map-hs-label-value&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>As of now I tried different ways, but unable to reach the span and get the SCN value. </p>
  
  <p>I tried -</p>
  
  <pre><code>scn = self.driver.find_elements_by_xpath(".//span[@class = 'hs-attribute-value']") 
  </code></pre>
  
  <p>which gives ElementNotFound error. The closest I have come to is -</p>
  
  <pre><code>div_element = self.driver.find_element_by_xpath('//div[@class="hs-customerdata hs-customerdata-personal"]/ul/li[@class="hs-attribute"]')
  </code></pre>
  
  <p>And then when I do -</p>
  
  <pre><code>print(div_element.get_attribute('innerHTML')) 
  </code></pre>
  
  <p>I get -</p>
  
  <pre><code>&lt;map-hs-label-value map-hs-lv-label="ACCOUNTINFO.SCN" map-hs-lv-value="{{::customerData.details.scn}}"&gt;&lt;/map-hs-label-value&gt;
  </code></pre>
  
  <p>But I am not able to go beyound this. I am new to using Webdriver and not able to figure out this. Any help would be much appreciated.</p>