我需要使用selenium webdriver自动执行以下功能流程
我可以使用机器人选择图像但是我无法单击“编辑图像”弹出窗口中显示的“裁剪图像”按钮。请找到编辑图像弹出的HTML片段,如下所示
<div id="edt-img-popup" style="left: 193px; position: absolute; top: 1045px; z-index: 902; opacity: 1; display: block;">
<span class="button bClose"><span>X</span></span>
<div id="edited-img"><img style="display: none; visibility: hidden; width: 980px; height: 710px;" src="http://locallocation?img=mQzJ0jI8si.jpg" id="artistImgCrop" height="710.673224715647" width="980"><div class="jcrop-holder" style="width: 980px; height: 710px; position: relative; background-color: rgb(0, 0, 0);"><div style="position: absolute; z-index: 600; width: 980px; height: 653px; top: 0px; left: 0px;"><div style="width: 100%; height: 100%; z-index: 310; position: absolute; overflow: hidden;"><img style="border: medium none; visibility: visible; margin: 0px; padding: 0px; position: absolute; top: 0px; left: 0px; width: 980px; height: 710px;" src="locallocation?img=mQzJ0jI8si.jpg"><div class="jcrop-hline" style="position: absolute; opacity: 0.4;"></div><div class="jcrop-hline bottom" style="position: absolute; opacity: 0.4;"></div><div class="jcrop-vline right" style="position: absolute; opacity: 0.4;"></div><div class="jcrop-vline" style="position: absolute; opacity: 0.4;"></div><div style="cursor: move; position: absolute; z-index: 360;" class="jcrop-tracker"></div></div><div style="width: 100%; height: 100%; z-index: 320; display: block;"><div class="ord-n jcrop-dragbar" style="cursor: n-resize; position: absolute; z-index: 370;"></div><div class="ord-s jcrop-dragbar" style="cursor: s-resize; position: absolute; z-index: 371;"></div><div class="ord-e jcrop-dragbar" style="cursor: e-resize; position: absolute; z-index: 372;"></div><div class="ord-w jcrop-dragbar" style="cursor: w-resize; position: absolute; z-index: 373;"></div><div class="ord-n jcrop-handle" style="cursor: n-resize; position: absolute; z-index: 374; opacity: 0.5;"></div><div class="ord-s jcrop-handle" style="cursor: s-resize; position: absolute; z-index: 375; opacity: 0.5;"></div><div class="ord-e jcrop-handle" style="cursor: e-resize; position: absolute; z-index: 376; opacity: 0.5;"></div><div class="ord-w jcrop-handle" style="cursor: w-resize; position: absolute; z-index: 377; opacity: 0.5;"></div><div class="ord-nw jcrop-handle" style="cursor: nw-resize; position: absolute; z-index: 378; opacity: 0.5;"></div><div class="ord-ne jcrop-handle" style="cursor: ne-resize; position: absolute; z-index: 379; opacity: 0.5;"></div><div class="ord-se jcrop-handle" style="cursor: se-resize; position: absolute; z-index: 380; opacity: 0.5;"></div><div class="ord-sw jcrop-handle" style="cursor: sw-resize; position: absolute; z-index: 381; opacity: 0.5;"></div></div></div><div style="width: 984px; height: 714px; position: absolute; top: -2px; left: -2px; z-index: 290; cursor: crosshair;" class="jcrop-tracker"></div><input class="jcrop-keymgr" style="position: fixed; left: -120px; width: 12px;" type="radio"><img style="display: block; visibility: visible; width: 980px; height: 710px; border: medium none; margin: 0px; padding: 0px; position: absolute; top: 0px; left: 0px; opacity: 0.6;" src="http://locallocation?img=mQzJ0jI8si.jpg" height="710.673224715647" width="980"></div></div>
<!-- This is the form that our event handler fills -->
<form action="javascript:void(0);" method="post" id="img_crp_form">
<input value="0" id="x" name="image[x]" type="hidden">
<input value="0" id="y" name="image[y]" type="hidden">
<input value="980" id="w" name="image[w]" type="hidden">
<input value="653.3333333333334" id="h" name="image[h]" type="hidden">
<input value="980" id="maxW" name="image[maxW]" type="hidden">
<input value="710.673224715647" id="maxH" name="image[maxH]" type="hidden">
<input value="http://locallocation?img=mQzJ0jI8si.jpg" id="slctdImgUrl" name="image[url]" type="hidden">
<input id="cropImage" value="Crop Image" class="btn btn-large btn-inverse" type="submit">
</form>
我尝试了以下方法,但它没有用 1.切换到框架 窗口把手 3. wait - implicit,explicit,ajax
非常感谢任何帮助。
感谢。