我试图从IE(Internet Explorer)中的表中按类名获取元素。我尝试过这样的事情:
foreach (SHDocVw.InternetExplorer ie in shellWindows) {
string wqmURL = "https://wqm-eme.accenture.com/arsys/forms/wqmeme";
if (ie.LocationURL.StartsWith(wqmURL)) {
var doc = ie.Document;
var testText = doc.getElementByClassName("");
testText.click();
}
ie.BeforeNavigate2 += new
SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler(this.ie_BeforeNavigate2);
}
但是这不起作用,我也不知道从Internet Explorer中的表格中选择元素的任何其他方式。请说我会得到"正在进行中#" 34;元件。这是html代码:
<div class="MenuOuter" style="left: 602px; top: 240px; width: 161px; height: 0px; visibility: hidden; z-index: 100003;" armenuelementserial="0">
<iframe src="https://wqm-eme.accenture.com/arsys/resources/html/Blank.html" frameborder="0" scrolling="no" style="border: currentColor; border-image: none; left: 0px; top: 0px; width: 100%; height: 100%; display: block; position: absolute;"></iframe>
<div class="MenuTableContainer">
<table class="MenuTable" style="width: 159px;" cellspacing="0" cellpadding="0">
<tbody class="MenuTableBody">
<tr class="MenuTableRow">
<td class="MenuEntryName" nowrap="">New</td>
<td class="MenuEntryNoSub" arvalue="New"></td></tr>
<tr class="MenuTableRow">
<td class="MenuEntryName" nowrap="">Assigned</td>
<td class="MenuEntryNoSub" arvalue="Assigned"></td></tr>
<tr class="MenuTableRow">
<td class="MenuEntryName" nowrap="">In Progress</td>
<td class="MenuEntryNoSub" arvalue="In Progress"></td></tr>
</tbody>
</table>
</div>
任何人都可以帮助我?