I have a html below:
<code><span class="ui-cfs-sn-l" xpath="1">
ABC
<span class="ui-cfs-txt">°⌃</span>
</span>
</code>
<code><span class="ui-cfs-sn-l" xpath="1">
ABC
<span class="ui-cfs-txt">°⌃</span>
</span>
</code>
<span class="ui-cfs-sn-l" xpath="1">
ABC
<span class="ui-cfs-txt">°⌃</span>
</span>
I used the following python code to extract the text which returns ABC°⌃
<code>element = driver.find_element(by=By.XPATH, value="//span[@class='ui-cfs-sn-l']")
result = element.text
</code>
<code>element = driver.find_element(by=By.XPATH, value="//span[@class='ui-cfs-sn-l']")
result = element.text
</code>
element = driver.find_element(by=By.XPATH, value="//span[@class='ui-cfs-sn-l']")
result = element.text
Is there a way to extract just the text before the inner span? The solution should return ABC