I have a page that has code designed as given below. From this, using automation id I would like to get values '6' and 'ft' separately.
<span class="something" ....>
<span abcdef automation-id="xyz"> My height is 6 ft </span>
</span>
I saw this question, which helps to some extent. The solution given by Qharr here makes sense. How to locate an element and extract required text with Selenium and Python I'm trying to find elements in a similar way by using automation id and get values '6' and 'ft' by using, maybe + operator for sibling values?
WebElement x = driver.find_element_by_css_selector(use automation id)+ ....
So basically in one above the line, I would like x to capture value '6' and use a different webelement say y to capture value 'ft' in one line of code.