如何解决硒库的问题(S)? [英] How to solve library issue(s) in Selenium?

查看:150
本文介绍了如何解决硒库的问题(S)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着在我的应用程序,所以我已经添加了库硒-java的2.30.0.jar 以构建路径使用硒及以下进口活动类:

I try to use Selenium in my application so I have added the library selenium-java-2.30.0.jar to the build path and the following imports to the activity class:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.android.AndroidDriver;

不过,每当我尝试运行在模拟器(AVD 2.2和4.2)我不断收到以下错误应用程序:

However; whenever I try to run the application in the emulator (avd 2.2 and 4.2) I keep receiving the following errors:

[2013-02-21 19:03:46 - xxxx] The library 'selenium-java-2.30.0.jar' contains native libraries that will not run on the device.
[2013-02-21 19:03:46 - xxxx] The following libraries were found:
[2013-02-21 19:03:46 - xxxx]  - org/openqa/selenium/firefox/amd64/libibushandler.so
[2013-02-21 19:03:46 - xxxx]  - org/openqa/selenium/firefox/amd64/x_ignore_nofocus.so
[2013-02-21 19:03:46 - xxxx]  - org/openqa/selenium/firefox/x86/libibushandler.so
[2013-02-21 19:03:46 - xxxx]  - org/openqa/selenium/firefox/x86/x_ignore_nofocus.so

和发射被取消。我已经清理项目,但仍得到了同样的消息。这是一个模拟器的问题还是我用错了库?

and launch is canceled. I have already cleaned the project but still got the same messages. Is this an emulator problem or I'm using wrong libraries?

推荐答案

我发现这个解决方案。 //$c$c.google.com/p/selenium/downloads/list:而不是使用的硒-java的2.30.0.jar HTTP://$c$c.google.com/p/selenium/downloads/list 我去了Android SDK管理器,并从那里安装相应的库

I have found the solution for this. Instead of using selenium-java-2.30.0.jar available in the downloads section at http://code.google.com/p/selenium/downloads/list I went to the Android SDK Manager and installed appropriate libraries from there.

在Eclipse中去窗口 - > Android SDK中管理器 - >选择:提供的封装→其它→谷歌→webdriver的

In Eclipse go to Window -> Android SDK Manager -> select: Available packages → Extras → Google → WebDriver

安装GoogleWebDriver去后的的Andr​​oid / SDK /演员/谷歌/的webdriver / 的目录中,找到并复制 android_webdriver_library.jar 库,并将其粘贴到lib文件夹您项目。之后,您可以导入前面提到的声明和使用硒网络驱动程序类。

After installing the GoogleWebDriver go to android/sdk/extras/google/webdriver/ directory, find and copy android_webdriver_library.jar library and paste it into lib folder of your project. Afterwards you can import earlier mentioned statements and use the Selenium web driver classes.

这篇关于如何解决硒库的问题(S)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆