【发布时间】:2015-09-14 09:26:59
【问题描述】:
以下是页面的 html,我需要获取将在 selenium webdriver 中工作的按钮的 xpath。或者有什么方法可以点击 selenium webdriver 中的按钮 如果它在java中会很棒,否则python和其他语言也会受到赞赏。
<button style="" onclick="saveAndContinueEdit('http://192.168.1.99/cue_extensions/magento1.9/index.php/admin/catalog_product/save/back/edit/tab/{{tab_id}}/id/899/key/6ed7b01b3a2136d6ff896d9380e281d5/')" class="scalable save" type="button" title="Save and Continue Edit" id="**id_636f54090db18b58eecba78e9e6aa6b7**">
<span><span><span>Save and Continue Edit</span></span></span>
</button>
但是当我下次登录时,html 更改为
<button style="" onclick="saveAndContinueEdit('http://192.168.1.99/cue_extensions/magento1.9/index.php/admin/catalog_product/save/back/edit/tab/{{tab_id}}/id/903/key/29d8597a8ec8f63d9b09addae444d4c0/')" class="scalable save" type="button" title="Save and Continue Edit" id="id_c2fe56a74ef2a166dcf0ae4ed7f8e391">
<span><span><span>Save and Continue Edit</span></span></span>
</button>[![enter image description here][1]][1]
【问题讨论】:
标签: selenium button xpath selenium-webdriver