我想要访问位于层次结构上方的DOM元素,以访问我有权访问的元素。使用硒在DOM层次结构中向上移动
在Attached ScreenShot中,我想访问#pRow_22,其中#ntsDiv_1的Grand Grand Grand Parent。但我只能访问#ntsDiv_1。请建议我怎么在这种情况下做
HTML代码是这样的: -
<tr id="pRow_22" style="border-bottom: 0;">
<td class="nameCell" style="border-bottom: 1px solid #CCCCCC;">
<div id="seller_22" class="product-sellercell">
<a id="pLogoLink_22" target="_blank" href="/norob/ClickTracker.somethins..." onclick="setMerchLb('eComElectronics.com')" rel="nofollow">
<div>
<a id="ntsLink_1" rel="nofollow" onclick="return false;" href="#">
</div>
<div id="ntsDiv_1" class="mlt-pop-container" style="width: 250px; text-align: left; white-space: normal; top: 2340px; left: 131px; visibility: hidden;">
<div class="mlt-pop-bg">
</div>
.
.
</div>
</td>
是查询父级,直到获得父级TR。 – vipin8169 2013-02-25 10:28:21
我该怎么做? – vipin8169 2013-02-25 10:38:32
我必须这样做,使用硒API,如何做到这一点 – vipin8169 2013-02-25 10:47:36