admin管理员组文章数量:1332377
with Python an Selenium I am trying get data from a web page. This works fine for first page, but there are more than one page. I can already grab the number of pages. 7 in this example. See: span class="paging-index-span" What fails is to press the "next page button": input class="ui-icon-arrow-next-home" I cannot find any code to successfully press this button.
I have worked with AI to support me but it did not work. This is why I am bothering you.
This should be the relevant portion of the HTML code:
<div id="user-list-list-paging-area">
<div class="ui-icon-btn-white paging-icon-div">
<div class="ui-btn ui-input-btn ui-btn-d ui-corner-all ui-shadow ui-btn-inline">
<input class="ui-icon-arrow-first ui-disabled" data-inline="true" data-theme="d" type="button" value=""/>
</div>
</div>
<div class="ui-icon-btn-white paging-icon-div">
<div class="ui-btn ui-input-btn ui-btn-d ui-corner-all ui-shadow ui-btn-inline">
<input class="ui-icon-arrow-back-home ui-disabled" data-inline="true" data-theme="d" type="button" value=""/>
</div>
</div>
<span class="paging-index-span">
<span style="font-size: x-large;">1</span>
<span class="page-index cursor-pointer" data-index="2">2</span>
<span class="page-index cursor-pointer" data-index="3">3</span>
<span class="page-index cursor-pointer" data-index="4">4</span>
<span class="page-index cursor-pointer" data-index="5">5</span>
...
<span class="page-index cursor-pointer" data-index="7">7</span>
</span>
<div class="ui-icon-btn-white paging-icon-div">
<div class="ui-btn ui-input-btn ui-btn-d ui-corner-all ui-shadow ui-btn-inline">
<input class="ui-icon-arrow-next-home" data-inline="true" data-theme="d" type="button" value=""/>
</div>
</div>
<div class="ui-icon-btn-white paging-icon-div">
<div class="ui-btn ui-input-btn ui-btn-d ui-corner-all ui-shadow ui-btn-inline">
<input class="ui-icon-arrow-last" data-inline="true" data-theme="d" type="button" value=""/>
</div>
</div>
My code to access and click the button:
next_page_button = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, 'ui-icon-arrow-next-home')))
next_page_button.click()
Result:
raise TimeoutException(message, screen, stacktrace)
seleniummon.exceptions.TimeoutException: Message:
No further message.
本文标签: can not click on next page button with Selenium and PythonStack Overflow
版权声明:本文标题:can not click on next page button with Selenium and Python - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742305395a2449813.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论