所以我想打這個「評論協定」按鈕元素:硒無法找到嵌入HTML載入
它具有以下的html代碼:
<section class="col-33 text-right">
<button class="anchor-button bordered" ng-click="onClickReviewAgreement()">Review Agreement</button>
</section>
BUT顯然它是從另一個資源加載的,所以findElement(By.*)
不起作用 - 我也試過By.xpath("/html/body/ul/li[2]/notification-bar/ul/li/section[1]/section[2]/button")
- 。所有相關的代碼我得到的View Page Sources
是:
<!-- Agreement form modal -->
<ui-modal
ui-modal-id="ui.modals.agreementFormModal"
ui-modal-class="takeover agreement"
ui-modal-controller="AgreementFormController"
ui-modal-template-url="paths.templates + '/components/forms/tpl.agreement-form.html'"
ui-modal-has-dimmer="true">
</ui-modal>
有什麼辦法,我可以選擇這些類型的元素?