如何让selenium从下面的HTML代码中单击next按钮?在
<span class="action-btn" data-bind="visible: viewModel.page() < viewModel.pages(), click: viewModel.changePage(+1);">></span>
最初我写道:
^{pr2}$但我注意到,在这个网站上,还有其他名字相似的{action-btn customize
和{
对于我当前的代码,它基本上只是点击action-btn customize
,我的猜测是因为这个按钮名出现在我想要单击的代码之前。在
我应该如何编写代码呢?在
更新
这是画面的截图。黄色高亮显示是我要点击的。在
看看你的屏幕截图,你想点击的
action-btn
是pager
类中的最后一个。在而且,如果您只有一个
div
元素和pager
类,那么可以选择其中的所有action-btn
并得到最后一个:以下是有关^{} 选择器的详细信息:
相关问题 更多 >
编程相关推荐