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包 产生了各种问题,暂时停更

原文地址:https://www.cnblogs.com/StarZhai/p/14117593.html