I'd like to download the primary parcel layer from this website.
First step is to click the "Add/Remove Item" button, but I am having trouble locating it. For this button, the Inspect Element window looks like this:
The relative XPath for this is
//div[@data-dojo-attach-point='itemAddStateNode']
The absolute XPath for this is
/html[1]/body[1]/div[4]/div[1]/div[2]/div[1]/div[1]/div[2]/div[2]/div[1]/div[1]/div[1]
I've tried using both by going:
driver.find_elemet_by_xpath("XPath as above")
I've also tried using its id:
driver.find_elemet_by_id("K/widgets/Tooltipify_10")
but they did not work (NoSuchElementException).
What I want to do is to make sure that this button is "ON", in which case, the class name is
class = ........... is-in-collection
and if not, turn it on.
Originally I was going to locate the button and click it to turn it on, but if there is a way to check the status of the button, that's probably better, as this site seems to retain the setting from the last visit.
Can anyone please help me on this?
Thanks in advance.