java – 如何添加Selendroid到android工作室的web抓取?

前端之家收集整理的这篇文章主要介绍了java – 如何添加Selendroid到android工作室的web抓取?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Please see edits below before answering!

我正在尝试用Selenium来设置动态的网页报废,但是我似乎找不到必要的毕业依赖/ lib文件添加到我的项目中.我看着Selendroid / Selenium的网站,找不到必要的配置信息.我假设我需要webdriver,因为我将要刮网络数据.作为一个附注,我已经决定使用Selendroid找到HtmlUnit不兼容的Android,并没有找到任何可行的替代方案.所有的帮助是赞赏.

(解决这个问题的其他问题仍然没有得到答复)

Edit: so using Exeon’s suggestion,I found the following dependency for Selendroid:

compile 'io.selendroid:selendroid-client:0.16.0'

但是,在运行我的应用程序时,我收到以下错误(重复约10次):

Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for debug as it may be conflicting with the internal version provided by Android.
     In case of problem,please repackage it with jarjar to change the class packages

请注意,我也尝试使用以下内容

compile 'org.testcontainers:selenium:0.9.7'

但我遇到了相同的错误

解决方法

这样的事情
buildscript {
     repositories {
         mavenCentral()
     }
     dependencies {
         classpath 'org.seleniumhq.selenium:selenium-java:2.47.1'

         } 
 }

(使用渐变加入maven回购)

原文链接:https://www.f2er.com/java/122475.html

猜你在找的Java相关文章