Can' locate a certain element using xpath locator in python -
i've written xpath
element unfortunately not being able to.
i can't understand i'm getting deviated. hope provide me little help.
i'm trying locate address below elements.
here elements:
<div class="detail-contact-address"> <i class="fa fa-map-o"></i> address:36 sukhumvit, soi 15, wattana, klongtoey-nua, bangkok 10110, thailand </div>
i trying with:
//div[@class='detail-contact-address']/*[contains(@class,'fa-map-o')]/../text()
user below xpath text :
//div[@class='detail-contact-address']
or based on string match
//div[@class='detail-contact-address'][contains(.,'address')]
so text like
print driver.find_element_by_xpath("//div[@class='detail-contact-address']").text
Comments
Post a Comment