I am trying to get the value of SCN from my HTML page which is in this format-
<html>
<body>
<div class="hs-customerdata hs-customerdata-pvalues">
<ul>
<li class="hs-attribute">
<map-hs-label-value map-hs-lv-label="ACCOUNTINFO.SCN" map-hs-lv-value="89862530">
<span class="hs-attribute-label" hs-context-data="" translate="" hs-channel="abcd" hs-device="desktop">SCN:</span>
<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">
89862530</span>
</map-hs-label-value>
</li>
</ul>
</div>
</body>
</html>
As of now I tried different ways, but unable to reach the span and get the SCN value.
I tried -
scn = self.driver.find_elements_by_xpath(".//span[@class = 'hs-attribute-value']")
which gives ElementNotFound error. The closest I have come to is -
div_element = self.driver.find_element_by_xpath('//div[@class="hs-customerdata hs-customerdata-personal"]/ul/li[@class="hs-attribute"]')
And then when I do -
print(div_element.get_attribute('innerHTML'))
I get -
<map-hs-label-value map-hs-lv-label="ACCOUNTINFO.SCN" map-hs-lv-value="{{::customerData.details.scn}}"></map-hs-label-value>
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.