This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* К примеру, есть такой select | |
<select id="term_id" size="1" name="p_term_in"> | |
<option value="">Select Another Term | |
<option value="201050">Summer 2010 | |
<option value="201010">Spring 2010 | |
<option value="200980">Fall 2009 | |
</select> | |
*/ | |
var options = this._webBrowser.Document.GetNodes( "//select[@id='term_id']//option" ); // выбрали все option select'a с id=term_id | |
var option = options.FirstOrDefault( o => o.TextContent.StartsWith( "Summer 2010" ) ); // ищем первый option, который содержит в себе текст, начинающийся с Summer 2010 |