无法处理DOM中的元素

2024-09-28 18:53:22 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能帮我理解,我怎么能选择或键入这个领域的东西上а 带Python的Selenium webdriver? 我使用了所有的路径、wait命令以及JavascriptExecutor,没有任何帮助。 (https://www.linkedin.com/

field


Tags: https命令路径com键入wwwselenium领域
1条回答
网友
1楼 · 发布于 2024-09-28 18:53:22

请尝试以下解决方案:

driver.get ("https://www.linkedin.com/")

driver.find_element_by_xpath("//button[@class='search__placeholder search search-input']").click();
driver.find_element_by_xpath("//form[@id='JOBS']//input[@placeholder='Search job titles or companies']").send_keys("Type here")

相关问题 更多 >