How to extract data from drop down menu (Xpath doesn't work)


#1

I’m very new to import…io and i’ve been learning to get data from drop down menu. So far i’ve been trying on “https://www.import.io/user-guide/best-practices-tips-and-tricks/using-manual-xpaths/” with ikea site(http://www.ikea.com/my/en/catalog/products/40319478/). However io-cursor-not-allowed-CHFG has occur when checking on the elements. Can anyone guide me on how can i extract this particular options? Actually i would want to get the data and the link that it’s going to.


#2

Hi Ethan,

So it sounds like you’re looking at the HTML within Import.io. You’ll want to inspect it outside of the product so that way you can map the XPath correctly. Here’s what the XPath should look like if you’re getting the options:

//div[@id="selectionDropDownDiv2"]//span[@class="dropdown-value" or @class="link-title"]

That said, if you want the links, you’ll need to use a combination of XPath and Regular Expression. I put together an example at https://app.import.io/dash/extractors/67591e06-9f4b-4c40-b565-81b37962f3d8 that should help you out!