HtmlAgility FormProcessor -> DropDown item select

Feb 12, 2009 at 12:31 PM

I know now how to set textfield values prior to submitting a form.... here is an example taken from this forum:

HtmlAgilityPack.AddOns.FormProcessor.FormProcessor p = new HtmlAgilityPack.AddOns.FormProcessor.FormProcessor();
string userName = "******";
string password = "*******";

HtmlAgilityPack.AddOns.FormProcessor.Form form = p.GetForm("", "//form@name='login'", HtmlAgilityPack.AddOns.FormProcessor.FormQueryModeEnum.Nested);

form"userID".SetAttributeValue("value", userName);
form"password".SetAttributeValue("value", password);

HtmlDocument doc= p.SubmitForm(form);

But what is the syntax i use to select an particular item from a select menu eg
<select name="colourOfCar">
<option value="0">Blue</option>
<option value="1">Red</option>
<option value="2">Green</option>
Would anyone be able to tell me how I would select the blue one for example?

Cheers for any input.