How to get a specific SPAN ID
benSmith1981 opened this issue · comments
Ben Smith commented
This is the extract from the webpage:
<h4 class="username">
<span id="ctl00_ctl00_ctl00_cphMain_cphMiddle_cphLeftColumn_widgetDiveSiteProfile_lblSiteName">
Tiger Beach
</span>
</h4>
I want to extract "Tiger Beach". What is syntax I used to get this?
span[id]
But how can I get the text for this specific Span ID so not jsut all of them? I want to avoid doing a string search through all the Span IDs returned, and I just want this one for this ID?
"ctl00_ctl00_ctl00_cphMain_cphMiddle_cphLeftColumn_widgetDiveSiteProfile_lblSiteName"
I can't find anywhere in the documentation or an example how to solve this (relatively simple) problem
Thanks
Ben Smith commented
Solution: You want the contents so between > < of a span id of "star5" do this
span[id="star5"]