Jquery selenium python选择显示隐藏具有图像主干js
我是selenium的新手。我在选择id间接指向和它单击的向外方向时遇到了很大的困难,但更改不受影响。id directionsel打开了一个矩形图像框,我想从该图像中选择第二个和第三个箭头。将鼠标悬停在元素上也不起作用。提前谢谢。 下面是它的html代码 我尝试了下面的代码。单击事件会发生,但不会在图像框上 el=驱动程序。通过xpath'/[@id=directionPopup]'查找元素 hover=ActionChainsdriver.move_to_elementel.move_to_elementdriver.find_element_by_xpath'/[@id=inDirection]/span[4]/img' 鼠标悬停。单击Jquery selenium python选择显示隐藏具有图像主干js,jquery,python,selenium,backbone.js,Jquery,Python,Selenium,Backbone.js,我是selenium的新手。我在选择id间接指向和它单击的向外方向时遇到了很大的困难,但更改不受影响。id directionsel打开了一个矩形图像框,我想从该图像中选择第二个和第三个箭头。将鼠标悬停在元素上也不起作用。提前谢谢。 下面是它的html代码 我尝试了下面的代码。单击事件会发生,但不会在图像框上 el=驱动程序。通过xpath'/[@id=directionPopup]'查找元素 hover=ActionChainsdriver.move_to_elementel.move_to
悬停。执行是,我找到了解决方案。选择元素后执行javascript,单击作为参数[0]。单击我正在使用selenium webdriver和pythoni got解决方案,使用jquery单击
<div id="directionSel" class="wosPanelDirection">
<div id="popSiteLabel" style="height: 15px;">
<span class="firstTxt">
<label id="dirRefSite" title="NJ">NJ</label>
</span>
<span class="secondTxt">
<label id="dirPop1Name" title="Ashburn">Ashburn</label>
</span>
<span class="thirdTxt">
<label id="dirPop2Name" title="All">All</label>
</span>
<span class="forthTxt">
<label id="dirOtherSite" title="All">All</label>
</span>
</div>
<div id="dirSelected"><div id="biDirection" data-dir="0" class="bidirectionalTraffic dirClick">
<span class="first lftPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="first lftPrivate">
<img class="lftStem" alt="" src="images/blue-bullet.png">
<img class="lftLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
<span class="second lftPublic" style="display: none;">
</span>
<span class="second lftPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="third rtPublic" style="display: none;">
</span>
<span class="third rtPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="fourth rtPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="forth rtPrivate">
<img class="rtStem" alt="" src="images/blue-bullet.png">
<img class="rtLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
</div></div>
<div id="anap" style="height: 10px; height: 10px; position: relative; top: -10px; margin-bottom: 0px;">
<span class="first">
<img id="refAnap" height="13px" alt="" src="images/anap.png">
</span>
<span class="second"></span>
<span class="third"></span>
<span class="forth">
<img id="otherAnap" height="13px" alt="" src="images/anap.png" style="display: none;">
</span>
</div>
<input type="hidden" id="directionValue" value="0">
</div>
<div id="directionPopupContainer">
<fieldset id="directionPopup" class="wosPanelDirection selectionComponent" style="display: none;">
<div id="biDirection" data-dir="0" class="bidirectionalTraffic dirClick">
<span class="first lftPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="first lftPrivate">
<img class="lftStem" alt="" src="images/blue-bullet.png">
<img class="lftLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
<span class="second lftPublic" style="display: none;">
</span>
<span class="second lftPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="third rtPublic" style="display: none;">
</span>
<span class="third rtPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="fourth rtPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="forth rtPrivate">
<img class="rtStem" alt="" src="images/blue-bullet.png">
<img class="rtLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
</div>
<div id="inDirection" data-dir="1" class="rightTraffic dirClick">
<span class="first lftPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="first lftPrivate">
<img class="lftStem" alt="" src="images/blue-bullet.png">
<img class="lftLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
<span class="second lftPublic" style="display: none;">
</span>
<span class="second lftPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="third rtPublic" style="display: none;">
</span>
<span class="third rtPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="fourth rtPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="forth rtPrivate">
<img class="rtStem" alt="" src="images/blue-bullet.png">
<img class="rtLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
</div>
<div id="outDirection" data-dir="2" class="leftTraffic dirClick">
<span class="first lftPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="first lftPrivate">
<img class="lftStem" alt="" src="images/blue-bullet.png">
<img class="lftLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
<span class="second lftPublic" style="display: none;">
</span>
<span class="second lftPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="third rtPublic" style="display: none;">
</span>
<span class="third rtPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="fourth rtPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="forth rtPrivate">
<img class="rtStem" alt="" src="images/blue-bullet.png">
<img class="rtLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
</div>
<div id="noDirection" data-dir="3" class="noDirection" style="display:none">
<span class="first lftPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="first lftPrivate">
<img class="lftStem" alt="" src="images/blue-bullet.png">
<img class="lftLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</span>
<span class="second lftPublic" style="display: none;">
</span>
<span class="second lftPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="third rtPublic" style="display: none;">
</span>
<span class="third rtPrivate">
<img alt="" src="images/green-bullet.png">
</span>
<span class="fourth rtPublic" style="display: none;">
<img alt="" src="images/green-bullet.png">
</span>
<span class="forth rtPrivate">
<img class="rtStem" alt="" src="images/blue-bullet.png">
<img class="rtLeaf" alt="" src="images/blue-light-bullet.png" style="display: none;">
</s