Drop Down List

Questions and answers about anything related to Helium Scraper
Post Reply
kevin994
Posts: 3
Joined: Wed Nov 23, 2011 3:15 pm

Drop Down List

Post by kevin994 » Wed Nov 23, 2011 5:39 pm

Hi,
How do I gather all shoe sizes from a drop down list?

I've found the 'Select Each item in a list' from the online premades but have no idea how to implement it.

Could someone link me to a straight forward tutorial?

Many thanks.

Newbie Kevin.

webmaster
Site Admin
Posts: 521
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Re: Drop Down List

Post by webmaster » Thu Nov 24, 2011 10:29 pm

Hi,

If all you want is gather all the values from the list, create a kind that selects them. Since the option elements are not clickable, you'll need to first select the drop down list (the OuterHTML property in the Selection panel should look like "<SELECT ...") and then click the Select first child button in the selection panel at the bottom (now the OuterHTML should look like "<OPTION ...").

Then create your kind with the selected element, then press the Select next sibling button and add this element to your kind. Now when you select this kind it should select every OPTION element that belong to the SELECT element you first selected. To extract the text of these options elements simply extract the InnerText property of your created kind.

If your Select first child button happen to be disabled after you select the SELECT element, create an actions tree with an Execute JavaScript action with the code below inside. Then run it instead of pressing the Select first child button. All it does is select the first child of the currently selected element in an alternative way.

Code: Select all

var select = Global.Browser.Selection.GetItem(0);
Global.Browser.Selection.Clear();
Global.Browser.Selection.Add(select.children[0]);
Juan Soldi
The Helium Scraper Team

kevin994
Posts: 3
Joined: Wed Nov 23, 2011 3:15 pm

Re: Drop Down List

Post by kevin994 » Tue Nov 29, 2011 9:11 am

Very helpful thanks.

Post Reply