java爬蟲(五)利用selenium 模擬點擊獲取動態頁面的內容


依賴的資源

1.ChromeDriver與Chrome版本對應參照表及ChromeDriver下載鏈接

http://npm.taobao.org/mirrors/chromedriver/

2.Selenium庫的jar包

有問題的資源:https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java

正確的jar包資源:http://selenium-release.storage.googleapis.com/index.html

import import org.openqa.selenium.WebDriver;的時候會報The import org.openqa cannot be resolved的問題

 

 

解決方法:原來的jar包大小只有不到1k 里邊的方法沒有實現,引入正確的jar包即可 selenium不同於其他jar包 他需要依賴大量的別的jar包所以構建項目時一定要引用完整。我用的是http://selenium-release.storage.googleapis.com/index.html?path=3.4/。

 

參考 https://blog.csdn.net/qq_22003641/article/details/79137327

由於不能使用maven方法依賴jar包 產生了各種問題,暫時停更

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM