|
以下是页面结构,点击了<a class="my-A" href="#">edit</a> 后,页面就会弹出ID 为“edit-A”的DIV对话框,,怎么用selenium定位里面的 yes 和 no 按钮呢?
<div class='A'>
<a class="my-A" href="#">edit</a>
<div id="edit-A" class="popup container" style="display: block;">
<div class="popup-content container">
<h2>Warning</h2>
<p>If you return to your basket now, the information you have supplied in checkout will not be saved.</p>
<p>Do you want to continue to your shopping basket?</p>
<div class="container">
<div class="button btn-yes">
<button name="yes" value="yes" type="button">yes</button>
</div>
<div class="button btn-no">
<button name="no" value="no" type="button">no</button>
</div>
</div>
</div>
</div>
</div> |
|