所以我想打这个“评论协定”按钮元素:硒无法找到嵌入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>
有什么办法,我可以选择这些类型的元素?