Reputation: 3
Can someone help me in selecting option Inquiry from below code? I have tried but failed.
<div class="SplitButton" id="HIRA_SPLITBUTTON" splitBtnName="pyDescription" btnType = "menu" onSplMenuClick='HIRA.ui.gadget.NewWork.StartProcess4Menu'>
<select id="pyDescription">
<option value='className=HIRAFS-Work-Inquiry&flowType=Inquiry&HarnessVersion=1'> Inquiry </option>
<option value='className=HIRAFS-Work-Copy&flowType=Copy&HarnessVersion=1'> Copy </option>
</select>
<table class='buttonMainTable' border='0' cellspacing='0' cellpadding='0' id='' >
<tr>
<td class='buttonTdLeft'>
<div class="buttonLeftContent">
<div class="buttonLeftContentInner">
</div>
</div></td><td class='buttonTdMiddle'>
<button class='buttonTdButton' alt='' title='' HIRA_VERSION='HTMLPROPERTY' id='HIRA_SPLITBTNpyDescription'>
<table cellspacing='0' cellpadding='0'>
<tr>
<td valign='top'><img src='desktopimages/new.gif' style='margin-top:-1px'/></td><td valign='middle' style='white-space:nowrap;'>New</td>
</tr>
</table></span>
</button></td><td class='buttonTdRight'>
<div class="buttonRightContent">
<div class="buttonRightContentInner">
</div>
</div></td>
</tr>
</table>
</div>
Upvotes: 0
Views: 1166
Reputation: 4659
You need to have to reference the webdriver support dll to do the following.
SelectElement select = new SelectElement(element);
select.SelectByText("Inquiry");
If you are using Visual Studios with NuGet then you can go to your powershell and type
Install-Package Selenium.Support
and that will install all of the references and dlls that you need.
Upvotes: 1