<div class='into'>
<div class="state " rel="AA" style="width:80px;">AA (1028)</div>
<div class="state " rel="BB" style="width:80px;">BB (307)</div>
</div>
I'd like to select one of elements rel="AA" or rel="BB" to click on it, tried several ways. The most usable idea was:
browser.find_element_by_xpath("//div[@class='into']/[text()='AA']").click()
However there is a number after the text what is various.
browser.find_element_by_xpath("//div[@class='into']/[rel='AA']").click()
And this not works.