android - AndroidDriver - Selenium library issues and unable to read AndroidManifest.xml error -


i trying run example test found here https://code.google.com/p/selenium/wiki/androiddriver#run_the_tests on android emulator (mac), i'm running problems when trying run test.

i have set emulator , installed webdriver apk, in eclipse created new android application project , created class onetest.java , copied in code (also imported org.openqa.selenium.webdriver; missing example code). imported 2 selenium-java-2.33.0 jars library. updated androidmanifest be:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.test"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="8"         android:targetsdkversion="17" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <activity             android:name="com.example.test.mainactivity"             android:label="@string/app_name" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <uses-library android:name="android.test.runner" />     </application>     <instrumentation android:name="android.test.instrumentationtestrunner"     android:targetpackage="com.example.test" /> </manifest> 

when try run onetest.java android junit test see error:

[2013-07-25 11:53:36 - test] library 'selenium-java-2.33.0.jar' contains native libraries not run on device. [2013-07-25 11:53:36 - test] following libraries found: [2013-07-25 11:53:36 - test]  - org/openqa/selenium/firefox/amd64/libibushandler.so [2013-07-25 11:53:36 - test]  - org/openqa/selenium/firefox/amd64/x_ignore_nofocus.so [2013-07-25 11:53:36 - test]  - org/openqa/selenium/firefox/x86/libibushandler.so [2013-07-25 11:53:36 - test]  - org/openqa/selenium/firefox/x86/x_ignore_nofocus.so 

if ignore error , try run again see:

[2013-07-25 11:59:43 - test] installing test.apk... [2013-07-25 11:59:44 - test] installation failed due invalid apk file! [2013-07-25 11:59:44 - test] please check logcat output more details. [2013-07-25 11:59:44 - test] launch canceled! 

and in logcat:

07-25 10:59:44.188: d/zipro(23141): zip: eocd not found, /data/local/tmp/test.apk not zip 07-25 10:59:44.188: d/asset(23141): failed open zip archive '/data/local/tmp/test.apk' 07-25 10:59:44.219: w/packageparser(23141): unable read androidmanifest.xml of /data/local/tmp/test.apk 07-25 10:59:44.219: w/packageparser(23141): java.io.filenotfoundexception: androidmanifest.xml 07-25 10:59:44.219: w/packageparser(23141):     @ android.content.res.assetmanager.openxmlassetnative(native method) 07-25 10:59:44.219: w/packageparser(23141):     @ android.content.res.assetmanager.openxmlblockasset(assetmanager.java:487) 07-25 10:59:44.219: w/packageparser(23141):     @ android.content.res.assetmanager.openxmlresourceparser(assetmanager.java:455) 07-25 10:59:44.219: w/packageparser(23141):     @ android.content.pm.packageparser.parsepackagelite(packageparser.java:733) 07-25 10:59:44.219: w/packageparser(23141):     @ com.android.defcontainer.defaultcontainerservice$1.getminimalpackageinfo(defaultcontainerservice.java:171) 07-25 10:59:44.219: w/packageparser(23141):     @ com.android.internal.app.imediacontainerservice$stub.ontransact(imediacontainerservice.java:110) 07-25 10:59:44.219: w/packageparser(23141):     @ android.os.binder.exectransact(binder.java:351) 07-25 10:59:44.219: w/packageparser(23141):     @ dalvik.system.nativestart.run(native method) 07-25 10:59:44.219: w/defcontainer(23141): failed parse package 

i did try suggestion here how solve library issue(s) in selenium? use android_webdriver_library.jar instead, got errors on import org.openqa.selenium.android.androiddriver; , webdriver driver = new androiddriver(); can resolve first 1 using android.androidwebdriver; can't resolve issue androiddriver().

any great since i'm eclipse/android noob :)

edit: progressed bit adding:

<uses-permission android:name="android.permission.internet" />  

to manifest, see error "could not find class 'org.openqa.selenium.android.androiddriver', referenced method com.example.test.onetest.testgoogle

i've solved of problems creating java project, including main method , running java application. had import selenium-server-standalone-2.33.0.jar otherwise i'd run error when running test.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -