android webview automation

4,114 views
Skip to first unread message

Siva Rapaka

unread,
Apr 10, 2013, 10:58:11 AM4/10/13
to appium-...@googlegroups.com
HI,
I use Uiautomator to write automated test cases for my apps. One MAJOR issue that i am facing on one the apps that i am working is with WEBVIEWS like getting text from a web view e.t.c; , Curious to know will appium slove this problem on android ..

Jonathan Lipps

unread,
Apr 10, 2013, 1:48:58 PM4/10/13
to Siva Rapaka, appium-...@googlegroups.com
Siva,

We are working on supporting webviews for Android, but are still in the research stages. We will definitely announce when that changes as it's a big priority for us as well.

On Apr 10, 2013, at 7:58 AM, Siva Rapaka <siva....@newsint.co.uk> wrote:

HI,
I use Uiautomator to write automated test cases for my apps. One MAJOR issue that i am facing on one the apps that i am working is with WEBVIEWS like getting text from a web view e.t.c; , Curious to know will appium slove this problem on android ..


--
"Please consider the environment before printing this e-mail"

Newsworks - bringing advertisers and newsbrands together 

This e-mail and any attachments are confidential, may be
legally privileged and are the property of NI Group Limited
on whose systems they were generated. NI Group Limited is 
the holding company for the News International group, is 
registered in England under number 81701, has its registered 
office at 3 Thomas More Square, London E98 1XY and VAT 
number GB 243 8054 69. If you have received this e-mail in 
error, please notify the sender immediately and do not use, 
distribute, store or copy it in any way. Statements or 
opinions in this e-mail or any attachment are those of the 
author and are not necessarily agreed or authorised by NI 
Group Limited or any member of its group. NI Group Limited 
may monitor outgoing or incoming emails as permitted by law.  
It accepts no liability for viruses introduced by this e-mail 
or attachments.

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tester

unread,
Apr 22, 2013, 8:00:01 PM4/22/13
to appium-...@googlegroups.com, Siva Rapaka
Hi Jonathan,
Where can we find updates on , where we are with the WebView support for Android. I need it for my test ASAP as well :)
Thanks
Mugil

Jonathan Lipps

unread,
Apr 23, 2013, 12:17:11 AM4/23/13
to Tester, appium-...@googlegroups.com, Siva Rapaka
Webview support in android landed with selendroid integration. You can use selendroid by specifying "selendroid" as your device after running `./reset.sh --selendroid`. Instructions for getting into webview mode for selendroid are shown in this pull request: https://github.com/appium/appium/pull/463

Sujata Joshi

unread,
Apr 26, 2013, 7:12:39 PM4/26/13
to appium-...@googlegroups.com
Hello Jonathan,
I am also automating Android hybrid app. And for which I need to switch to web view and back. I followed the instructions you have given to install selendroid ( ./reset selendroid)
Also replaced my device with 'selendroid' in the desired capabilities. Also run appium using command - node server.js - V
But when I try to run my test it is not working. Here is the error I can see in the log.-

Creating new appium session b47899e2-9a41-4d2c-977a-577798df5d6c
info: Starting selendroid server
info: Checking whether selendroid is built for package yet
info: Selendroid needs to be built
info: Building selendroid server for package com.adtruth.sdk
error: Unable to build selendroid server. Stdout was:
error:
error:
error: Failed to start an Appium session, err was: Error: spawn ENOENT

What is it that I am missing?

-Sujata

Tester

unread,
Apr 27, 2013, 3:11:26 PM4/27/13
to appium-...@googlegroups.com
I face the same issue as well:

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Mac","app":"/Users/eparamasivam/Workspace/Appium/PPHAppium-ios-v2/paypal-here-1-6-0-1608-qa-qa.apk","browserName":"","app-package":"com.paypal.here","device":"selendroid","app-activity":"StartUpActivity"}}
info: Using local app from desiredCaps: /Users/eparamasivam/Workspace/Appium/PPHAppium-ios-v2/paypal-here-1-6-0-1608-qa-qa.apk
info: Creating new appium session 9d9dc728-b72d-4ee6-a535-4f8b4f6ec26a
info: Starting selendroid server
info: Checking whether selendroid is built for package yet
info: Selendroid needs to be built
info: Building selendroid server for package com.paypal.here
error: Unable to build selendroid server. Stdout was: 
error: 
error: 
error: Failed to start an Appium session, err was: Error: spawn ENOENT
info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: spawn ENOENT)","code":"ENOENT","errno":"ENOENT","syscall":"spawn","origValue":"spawn ENOENT"},"sessionId":"9d9dc728-b72d-4ee6-a535-4f8b4f6ec26a"}
POST /wd/hub/session 500 14ms - 286
info: Clearing out appium devices

Where you able to find a fix for this issue?

Thanks

bootstrap online

unread,
Apr 27, 2013, 5:09:37 PM4/27/13
to Tester, appium-...@googlegroups.com

On Sat, Apr 27, 2013 at 3:11 PM, Tester <mugi...@gmail.com> wrote:
Unable to build selendroid server

Do you have maven installed? Selendroid tries to run mvn install.
https://github.com/appium/appium/blob/d00ecbe217ee60b2cecccc2ced4a6a06fe3cfc8a/app/selendroid.js#L73

Jonathan Lipps

unread,
Apr 27, 2013, 9:33:30 PM4/27/13
to bootstrap online, appium-...@googlegroups.com, Tester
Also have you run

./reset.sh --selendroid

? It grabs the selendroid submodule. If you don't have it it will fail to build selendroid with a file not found error just like the one you're seeing


--

Mugil

unread,
Apr 30, 2013, 4:39:25 PM4/30/13
to appium-...@googlegroups.com, bootstrap online, Tester
Thank You for all the help!!

I have the selendroid submodules now. But ran into a build failure error on executing my test 

bootstrap online

unread,
Apr 30, 2013, 4:41:03 PM4/30/13
to Mugil, appium-...@googlegroups.com
try ./reset.sh --selendroid

Mugil

unread,
Apr 30, 2013, 5:01:46 PM4/30/13
to appium-...@googlegroups.com, Mugil
Yes. I see the same error even after running ./reset.sh --selendroid

bootstrap online

unread,
Apr 30, 2013, 5:03:34 PM4/30/13
to Mugil, appium-...@googlegroups.com
Did you try:

sudo ANDROID_HOME=$ANDROID_HOME ./reset.sh --selendroid

Mugil

unread,
Apr 30, 2013, 5:11:28 PM4/30/13
to appium-...@googlegroups.com, Mugil
I just did and still the same errors.

bootstrap online

unread,
Apr 30, 2013, 5:28:02 PM4/30/13
to Mugil, appium-...@googlegroups.com
Does this file exist?

/Users/eparamasivam/Workspace/Appium/appium/submodules/selendroid/selendroid-server/target/generated-sources/r/org/openqa/selendroid/R.java
If it exists then you may have to adjust permissions. If it doesn't exist then selendroid isn't building properly.

Mugil

unread,
Apr 30, 2013, 5:39:33 PM4/30/13
to appium-...@googlegroups.com, Mugil
target/generated-sources/r/org/openqa/selendroid/R.java 
does not exists
What could be going wrong? Any idea? Have others faced similar issue?

Sujata Joshi

unread,
Apr 30, 2013, 7:11:30 PM4/30/13
to appium-...@googlegroups.com
After I installed selendroid using ./reset --selendroid, I am still getting error. It is not able to build the selendroid server for my package.
Here is the error-

info: Creating new appium session 73f582c4-33f7-48da-af87-288ea60df475

info: Starting selendroid server

info: Checking whether selendroid is built for package yet
info: Selendroid needs to be built
info: Building selendroid server for package com.my.test


debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"desiredCapabilities":{"platform":"Mac","app":"/Users/test/MyWorkspace/mobile/target/MyTestApp.apk","browserName":"","app-package":"com.my.test","device":"selendroid","app-activity":"MyActivity"}}


error: Unable to build selendroid server. Stdout was:

error:
error:
error: Failed to start an Appium session, err was: Error: spawn ENOENT

info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: spawn ENOENT)","code":"ENOENT","errno":"ENOENT","syscall":"spawn","origValue":"spawn ENOENT"},"sessionId":"73f582c4-33f7-48da-af87-288ea60df475"}

POST /wd/hub/session 500 17ms - 286


info: Clearing out appium devices

Not able to understand why it is not able to build. There is no specific error message. What is it that I am missing?



-Sujata

On Wednesday, April 10, 2013 7:58:11 AM UTC-7, Siva Rapaka wrote:

bootstrap online

unread,
Apr 30, 2013, 7:16:34 PM4/30/13
to Sujata Joshi, appium-...@googlegroups.com
What is the output of mvn --version ? You could also try again on the latest Appium which has better debug messages.


--

Sujata Joshi

unread,
Apr 30, 2013, 7:36:12 PM4/30/13
to appium-...@googlegroups.com, Sujata Joshi
Hello,
I am using maven 3.0.3. And also downloaded latest Appium version (0.3.1).

bootstrap online

unread,
Apr 30, 2013, 7:38:00 PM4/30/13
to Sujata Joshi, appium-...@googlegroups.com
I'm using Maven 3.0.3 also. I run appium from source though and don't use the npm release.

Jonathan Lipps

unread,
May 1, 2013, 7:31:15 PM5/1/13
to Mugil, appium-...@googlegroups.com
I just upgraded selendroid, might be worth trying again.

Sujata Joshi

unread,
May 3, 2013, 5:21:58 PM5/3/13
to appium-...@googlegroups.com
Hello Jonathan,
I just installed the latest version of Appium and tried running my test case using device as selendroid, but am still getting exactly same error, I posted here before.



-Sujata

On Wednesday, April 10, 2013 7:58:11 AM UTC-7, Siva Rapaka wrote:

Simon Howlett

unread,
May 3, 2013, 6:03:54 PM5/3/13
to appium-...@googlegroups.com
i am seeing the same, i have maven 3.0.5, selendroid is building the file as mentioned, also running appium 0.3.1, 

stack i am seeing is


info: Creating new appium session 8187e0ae-c9d8-4f0d-b507-f4c8c9b7dca8
info: Starting selendroid server
info: Checking whether selendroid is built for package yet
info: Selendroid needs to be built
info: Building selendroid server for package com.webfilings.books
info: Copying selendroid server to correct destination
error: Error copying selendroid to destination
error: Failed to start an Appium session, err was: Error: ENOENT, lstat '/Users/simonhowlett/appium/selendroid/selendroid-server/target/selendroid-server-0.3.apk'
info: Responding to client with error: {"status":6,"value":{"0":{"errno":34,"code":"ENOENT","path":"/Users/simonhowlett/appium/selendroid/selendroid-server/target/selendroid-server-0.3.apk"},"message":"A session is either terminated or not started"},"sessionId":"8187e0ae-c9d8-4f0d-b507-f4c8c9b7dca8"}

bootstrap online

unread,
May 3, 2013, 6:05:43 PM5/3/13
to Simon Howlett, appium-...@googlegroups.com
It's working for me running Appium from GitHub.

Sujata Joshi

unread,
May 3, 2013, 7:45:55 PM5/3/13
to appium-...@googlegroups.com, Simon Howlett
Do you mean you downloaded source code of appium from git and then it is working for you?
Because I just downloaded just .dmg that is offered on the home page 'appium.io'

bootstrap online

unread,
May 3, 2013, 7:46:53 PM5/3/13
to Sujata Joshi, appium-...@googlegroups.com, Simon Howlett
git clone git://github.com/appium/appium.git

cd appium; ./reset.sh

node server.js -V --fast-reset --without-delay

Jonathan Lipps

unread,
May 3, 2013, 8:02:35 PM5/3/13
to bootstrap online, Sujata Joshi, appium-...@googlegroups.com, Simon Howlett
There was a bug in running selendroid due to a version mismatch. If you update or pull code from master it should work now.

Simon Howlett

unread,
May 3, 2013, 8:21:26 PM5/3/13
to appium-...@googlegroups.com
Seem to be past that error now, thanks guys. super quick turnaround as well. 

Sujata Joshi

unread,
May 6, 2013, 2:46:56 PM5/6/13
to appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
I cloned the appium to my machine and then run ./reset.sh, But I am getting following error-

---- RESETTING IOS ----
Downloading/updating instruments-without-delay
./reset.sh: line 45: git: command not found

-Sujata

bootstrap online

unread,
May 6, 2013, 3:01:31 PM5/6/13
to Sujata Joshi, appium-...@googlegroups.com, Simon Howlett
Is git installed?

git --version

Sujata Joshi

unread,
May 6, 2013, 3:04:12 PM5/6/13
to appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
Yes it is installed.

Sujata Joshi

unread,
May 6, 2013, 3:52:08 PM5/6/13
to appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
I reinstalled git with latest version and then clone the appium.
After running ./reset.sh now am getting follwing error-

fatal error: 'spawn.h' file not found
#import <spawn.h>
        ^
1 error generated.


and then -

fatal error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>
        ^
1 error generated.


** BUILD FAILED **


The following build commands failed:
    CompileC /Users/sjoshi/Library/Developer/Xcode/DerivedData/instruments-without-delay-aykbfznnhwzgocgvrclpdxypbsal/Build/Intermediates/SimShim.build/Release/SimShim.build/Objects-normal/i386/SimShim.o SimShim/SimShim.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/sjoshi/Library/Developer/Xcode/DerivedData/instruments-without-delay-aykbfznnhwzgocgvrclpdxypbsal/Build/Intermediates/SimShim.build/Release/SimShim.build/Objects-normal/i386/ArrayOfStrings.o ../Common/ArrayOfStrings.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)


-Sujata

Jonathan Lipps

unread,
May 6, 2013, 6:11:33 PM5/6/13
to Sujata Joshi, appium-...@googlegroups.com, Simon Howlett
IF you're just trying to get android to work, run

./reset.sh --android

otherwise you need XCode and the iOS sdks installed

Sujata Joshi

unread,
May 7, 2013, 6:51:30 PM5/7/13
to appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
Hello,
I just now downloaded the latest version 1.6.3 and also appium 0.4.0. And run my test case again.
Now I can see the error message.

It is not able to find selendroid-server's pom.xml. It is finding this file under -
Applications/Appium.app/Contents/Resources/node_modules/appium/selendroid/selendroid-server/pom.xml

But actually file is located at -
Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/selendroid/selendroid-server/pom.xml


-Sujata

Jonathan Lipps

unread,
May 7, 2013, 7:41:46 PM5/7/13
to Sujata Joshi, appium-...@googlegroups.com, Simon Howlett
Did you run ./reset.sh --selendroid?

Sujata Joshi

unread,
May 8, 2013, 3:59:31 PM5/8/13
to appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
Yes I did.

Jonathan Lipps

unread,
May 8, 2013, 5:20:01 PM5/8/13
to Sujata Joshi, appium-...@googlegroups.com, Simon Howlett
These paths have changed in a lot of recent commits. Dan, any thoughts?

It might be as simple as re-downloading and installing Appium.app with the latest Appium code under the hood

Dan Cuellar

unread,
May 8, 2013, 10:56:26 PM5/8/13
to appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
Yeah, you'll probably need to cd to Appium.app/Contents/Resources/node_modules/appium and build selendroid. How about I start running reset.sh after I do the package update? Jonathan, do you think that would solve the problem

Jonathan Lipps

unread,
May 8, 2013, 11:02:45 PM5/8/13
to Dan Cuellar, appium-...@googlegroups.com, Sujata Joshi, Simon Howlett
This has all been revamped recently. There are now a few ways to initialize appium:

1) from source: run reset.sh
2) from npm: run npm install appium (this now comes with the binaries pre-built, no reset.sh required)
3) manually copying .appiumconfig and build/ from a project that already has them

So Dan you have your choice of how you want to get .appiumconfig and build/ into Appium.app. Running reset.sh is probably the easiest way. It works much nicer now and doesn't install dev dependencies or rely on global grunt-cli unless you specify --dev.

On May 8, 2013, at 7:56 PM, Dan Cuellar <dancu...@gmail.com> wrote:

Yeah, you'll probably need to cd to Appium.app/Contents/Resources/node_modules/appium and build selendroid. How about I start running reset.sh after I do the package update? Jonathan, do you think that would solve the problem

Sujata Joshi

unread,
May 9, 2013, 1:44:10 PM5/9/13
to appium-...@googlegroups.com, Dan Cuellar, Sujata Joshi, Simon Howlett
Hello,
Thank you all for all the help and quick updates.
I downloaded the latest version again containing the updates.
Also run
cd /Applications/Appium.app/Contents/Resources/node_modules/appium

./reset --selendroid

And then run my test case, now I am getting following error-
error: java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{com.my.test.selendroid/org.openqa.selendroid.ServerInstrumentation} from pid=852, uid=852 not allowed because package com.my.test.selendroid does not have a signature matching the target com.my.test
    at android.os.Parcel.readException(Parcel.java:1425)
    at android.os.Parcel.readException(Parcel.java:1379)
    at android.app.ActivityManagerProxy.startInstrumentation(ActivityManagerNative.java:2871)
    at com.android.commands.am.Am.runInstrument(Am.java:675)
    at com.android.commands.am.Am.run(Am.java:119)
    at com.android.commands.am.Am.main(Am.java:82)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
    at dalvik.system.NativeStart.main(Native Method)


error: Failed to start an Appium session, err was: Error: java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{com.my.test.selendroid/org.openqa.selendroid.ServerInstrumentation} from pid=852, uid=852 not allowed because package com.my.test.selendroid does not have a signature matching the target com.my.test


Regards,
Sujata

bootstrap online

unread,
May 9, 2013, 1:52:04 PM5/9/13
to appium-...@googlegroups.com
In the appium server logs, is it able to resign your apk successfully?

Sujata Joshi

unread,
May 9, 2013, 2:48:39 PM5/9/13
to appium-...@googlegroups.com
Where can I find 'appium server logs'?. The log trace I have pasted the errors displayed on the appium.app application.

bootstrap online

unread,
May 9, 2013, 2:50:50 PM5/9/13
to Sujata Joshi, appium-...@googlegroups.com
appium.app prints the server logs. There should be information about
app signed or not signed. Post the full output to a gist on GitHub and
I'll take a look. The SecurityException error only happens if the apk
was not successfully resigned.

Sujata Joshi

unread,
May 9, 2013, 3:37:02 PM5/9/13
to appium-...@googlegroups.com, Sujata Joshi
Ok, I got it. So it is the same place where I am looking.
And I have pasted the whole log trace above from appium logs.

bootstrap online

unread,
May 9, 2013, 3:44:39 PM5/9/13
to Sujata Joshi, appium-...@googlegroups.com
You should see something like this:
debug: Checking app cert for …
debug: App already signed.
debug: Checking app cert for …
debug: App already signed.

Maybe try running appium from source.

Sujata Joshi

unread,
May 9, 2013, 4:43:26 PM5/9/13
to appium-...@googlegroups.com, Sujata Joshi
I have created the glist on github, containing full log trace. Please have a look.

bootstrap online

unread,
May 9, 2013, 4:47:12 PM5/9/13
to Sujata Joshi, appium-...@googlegroups.com
Where is the link?

Sujata Joshi

unread,
May 9, 2013, 5:32:11 PM5/9/13
to appium-...@googlegroups.com, Sujata Joshi
oops,

Here is the link-
https://gist.github.com/skjoshi/5550454


bootstrap online

unread,
May 9, 2013, 5:38:29 PM5/9/13
to Sujata Joshi, appium-...@googlegroups.com
Try running: java -jar verify.jar my.apk

https://github.com/appium/appium/blob/master/app/android/verify.jar?raw=true

According to the log, the app is signed so there shouldn't be a problem.

Vish Janmanchi

unread,
May 30, 2013, 8:52:38 PM5/30/13
to appium-...@googlegroups.com, Siva Rapaka
Hi Jonathan,

Is there any update about webview support (non-selendroid) ? 

Thanks
Vishwanath

On Wednesday, April 10, 2013 10:48:58 AM UTC-7, Jonathan Lipps wrote:
Siva,

We are working on supporting webviews for Android, but are still in the research stages. We will definitely announce when that changes as it's a big priority for us as well.

On Apr 10, 2013, at 7:58 AM, Siva Rapaka <siva....@newsint.co.uk> wrote:

HI,
I use Uiautomator to write automated test cases for my apps. One MAJOR issue that i am facing on one the apps that i am working is with WEBVIEWS like getting text from a web view e.t.c; , Curious to know will appium slove this problem on android ..


--
"Please consider the environment before printing this e-mail"

Newsworks - bringing advertisers and newsbrands together 

This e-mail and any attachments are confidential, may be
legally privileged and are the property of NI Group Limited
on whose systems they were generated. NI Group Limited is 
the holding company for the News International group, is 
registered in England under number 81701, has its registered 
office at 3 Thomas More Square, London E98 1XY and VAT 
number GB 243 8054 69. If you have received this e-mail in 
error, please notify the sender immediately and do not use, 
distribute, store or copy it in any way. Statements or 
opinions in this e-mail or any attachment are those of the 
author and are not necessarily agreed or authorised by NI 
Group Limited or any member of its group. NI Group Limited 
may monitor outgoing or incoming emails as permitted by law.  
It accepts no liability for viruses introduced by this e-mail 
or attachments.

bootstrap online

unread,
May 30, 2013, 9:00:31 PM5/30/13
to Vish Janmanchi, appium-...@googlegroups.com, Siva Rapaka
webview support in uiautomator will not be anytime soon because it
depends on Google updating the framework. See this GTAC 2013 video for
details.

http://www.youtube.com/watch?v=O1u8iBLUFL0

Jonathan Lipps

unread,
May 31, 2013, 11:57:18 AM5/31/13
to bootstrap online, Vish Janmanchi, appium-...@googlegroups.com, Siva Rapaka
Webview support will be possible on new devices when we get Chrome-backed webviews in Android rather than Browser-backed webviews. Then we'll be able to circle round UiAutomator's limitations completely.

Not sure of the ETA on this though.

Vish Janmanchi

unread,
Jun 1, 2013, 12:39:23 PM6/1/13
to appium-...@googlegroups.com
Thanks for the info. Let's hope things fall in place for this soon.

Shu Chen

unread,
Jun 7, 2013, 6:15:42 PM6/7/13
to appium-...@googlegroups.com
Hi, 
did your issue get resolved? I met the same issue that the selendriod  I get from appium says 

not allowed because package com.amazon.mShop.android.selendroid does not have a signature matching the target

Joel Miele

unread,
Jun 21, 2013, 1:20:09 PM6/21/13
to appium-...@googlegroups.com
I ran into this issue.  I fixed it by uninstalling the application from the emulator/device, and then running my test, which reinstalled the application on the device.

Elang

unread,
Jul 17, 2013, 7:35:51 AM7/17/13
to appium-...@googlegroups.com
Hi All,

Is Webview automation possible on Windows platform for android app?.

Regards,
Elang.

Elangovan Ganesan

unread,
Jul 17, 2013, 8:21:24 AM7/17/13
to appium-...@googlegroups.com
I try to do Webview automation for android app in Windows.

I ran the command C:\Appium\node_modules\appium>reset --selendroid

The output was as below,

npm install .
npm WARN package.json node-i...@0.1.2 No repository field.
npm WARN package.json cookie-s...@0.0.1 No repository field.
npm WARN package.json fr...@0.1.0 No repository field.
npm WARN package.json met...@0.0.1 No repository field.
npm WARN package.json range-...@0.0.4 No repository field.
npm WARN package.json se...@0.1.0 No repository field.
npm WARN package.json by...@0.1.0 No repository field.
npm WARN package.json formi...@1.0.11 No repository field.
npm WARN package.json pa...@0.0.1 No repository field.
npm WARN package.json va...@0.1.0 No repository field.
npm WARN package.json jsh...@0.9.1 No repository field.
npm WARN package.json ey...@0.1.8 No repository field.
npm WARN package.json datef...@1.0.2-1.2.3 No repository field.
npm WARN package.json m...@0.3.0 No repository field.
npm WARN package.json gr...@1.7.0 No repository field.
npm WARN package.json polic...@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json asser...@0.1.2 No repository field.
npm WARN package.json ct...@0.5.2 No repository field.

=====Resetting Android=====

grunt configAndroidBootstrap
Running "configAndroidBootstrap" task
Updated file C:\Appium\node_modules\appium\android\bootstrap\build.xml

Done, without errors.

gruntbuildAndroidBootstrap
Running "buildAndroidBootstrap" task
Using ant found at C:\Program Files\apache-ant-1.9.0\bin\antBuildfile: C:\Appium
\node_modules\appium\android\bootstrap\build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 22.0.1
 [checkenv] Installed at E:\adt-bundle-windows-x86-20130522\sdk

-build-setup:
[getbuildtools] Using latest Build Tools: 17.0.0
     [echo] Resolving Build Target for AppiumBootstrap...
[getuitarget] Project Target:   Android 4.2.2
[getuitarget] API level:        17
     [echo] ----------
     [echo] Creating output directories if needed...

-pre-compile:

compile:

-post-compile:

-dex:
      [dex] input: C:\Appium\node_modules\appium\android\bootstrap\bin\classes
      [dex] Found Deleted Target File
      [dex] Converting compiled files and external libraries into C:\Appium\node
_modules\appium\android\bootstrap\bin\classes.dex...

-post-dex:

-jar:
      [jar] Building jar: C:\Appium\node_modules\appium\android\bootstrap\bin\Ap
piumBootstrap.jar

-post-jar:

build:

BUILD SUCCESSFUL
Total time: 7 seconds

Done, without errors.

grunt setConfigVer:android
Running "setConfigVer:android" (setConfigVer) task
Config file exists, updating it
{"git-sha":"120bb6813272efc128276bd212202e2cda0dea14","android":{"version":"0.7.
3"},"ios":{"version":"0.7.3"},"selendroid":{"version":"0.7.3"}}
Done, without errors.

=================================================================================

When I run the command node server.js -V, it says invalid. Please look at the below log.

C:\Appium\node_modules\appium>node server.js -V
usage: server.js [-h] [-v] [--app APP] [--ipa IPA] [-q] [-U UDID] [-a ADDRESS]
                 [-p PORT] [-k] [--no-session-override] [--full-reset]
                 [--no-reset] [-l] [-g LOG] [-G WEBHOOK]
                 [--native-instruments-lib] [--app-pkg ANDROIDPACKAGE]
                 [--app-activity ANDROIDACTIVITY]
                 [--app-wait-activity ANDROIDWAITACTIVITY] [--avd AVD]
                 [--device-ready-timeout ANDROIDDEVICEREADYTIMEOUT] [--safari]
                 [--force-iphone] [--force-ipad] [--orientation ORIENTATION]
                 [--nodeconfig NODECONFIG] [-ra ROBOTADDRESS] [-rp ROBOTPORT]
                 [--selendroid-port SELENDROIDPORT]

server.js: error: Unrecognized arguments: -V.

C:\Appium\node_modules\appium>node server.js -v
0.7.3


Am I able to do webView automation in Windows platform?


Thanks & Best regards,
Elangovan G
QA Automation Engineer
Blog: Automatium



Jonathan Lipps

unread,
Jul 17, 2013, 9:59:44 AM7/17/13
to Elangovan Ganesan, appium-...@googlegroups.com
Why are you starting the server with node server.js -V? -V is not a valid flag.

Jonathan Lipps

unread,
Jul 18, 2013, 4:02:05 PM7/18/13
to Elangovan Ganesan, appium-...@googlegroups.com
I'm not sure why that's happening, but as I don't have Windows I'm not sure how to debug it. I would start by googling the ADB error listed in the logs and seeing if that provides any insight.

On Jul 17, 2013, at 11:12 PM, Elangovan Ganesan <elang....@gmail.com> wrote:

How could I proceed Jonathan?. Please help me.

I am trying to automate androd app(which has webview) in Windows platform.

I executed following commands in the cmd prompt


C:\Appium\node_modules\appium>reset --selendroid

I ran the command C:\Appium\node_modules\appium>node server.js --full-reset

Then ran my code,

    @Test
    public void test() throws Exception {
        System.out.println("1");
        File appDir = new File("E://AndroidWorkspace//appiumandroid//src//Resource");
        //new FileInputStream(System.getProperty("user.dir")+"\\src\\Resource\\or.properties
        File app = new File(appDir, "myApp.apk");
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("device","selendroid");
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
        capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
        capabilities.setCapability(CapabilityType.PLATFORM, "WINDOWS");
        capabilities.setCapability("app-package","com.myApp.activity");
        capabilities.setCapability("app-activity","LoginActivity");     
        capabilities.setCapability("app", app.getAbsolutePath());
        driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);

Log is as below,

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"WINDOWS
","app":"E:\\AndroidWorkspace\\appiumandroid\\src\\Resource\\myApp
.apk","browserName":"","app-package":"com.myApp.activity","device":"selend
roid","app-activity":"LoginActivity","version":"4.2.2"}}
info: Using local app from desiredCaps: E:\AndroidWorkspace\appiumandroid\src\Re
source\myApp.apk
info: Creating new appium session cf0ca267-d6c8-48f4-90ab-5ddde26cec21
info: Starting selendroid server
info: Checking whether selendroid is built yet
info: Selendroid server exists!
info: Starting selendroid
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from E:\adt-bundle-windows-x86-20130522\sdk\platform-tools
\adb.exe
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
info: [ADB] 1 device(s) connected
info: [ADB] Setting device id to emulator-5554
info: Found device, no need to retry
info: [ADB] Waiting for device emulator-5554 to be ready and to respond to shell
 commands (timeout = 5)
info: Checking whether we need to run fast reset
info: User doesn't want fast reset, doing nothing
info: Rebuilt selendroid apk exists, doing nothing
info: Rebuilt selendroid server already exists, no need to rebuild it with a new
 manifest
info: Checking signed status of C:\Windows\Temp\selendroid.com.myApp.activ
ity.apk
debug: Checking app cert for C:\Windows\Temp\selendroid.com.myApp.activity
.apk: java -jar "C:\Appium\node_modules\appium\app\android\verify.jar" "C:\Windo
ws\Temp\selendroid.com.myApp.activity.apk"
info: Checking signed status of E:\AndroidWorkspace\appiumandroid\src\Resource\myApp.apk
debug: Checking app cert for E:\AndroidWorkspace\appiumandroid\src\Resource\myApp.apk: java -jar "C:\Appium\node_modules\appium\app\android\verify
.jar" "E:\AndroidWorkspace\appiumandroid\src\Resource\myApp.apk"
debug: App already signed.
debug: App already signed.
debug: Getting install/clean status for com.myApp.activity.selendroid
info: Rebuilt selendroid is not installed, installing it
info: Installing C:\Windows\Temp\selendroid.com.myApp.activity.apk
debug:  pkg: /data/local/tmp/selendroid.com.myApp.activity.apk

Failure [INSTALL_FAILED_UID_CHANGED]


info: Determining app install/clean status
debug: Getting install/clean status for com.myApp.activity
info: [ADB] Forwarding system:8080 to device:8080
error: Error: Command failed: error: cannot bind socket

info: Overriding session id with ,,,,,,,,,,,,,,,
error: Failed to start an Appium session, err was: Error: Command failed: error:
 cannot bind socket


info: Responding to client with error: {"status":6,"value":{"message":"A session
 is either terminated or not started (Original error: Command failed: error: can
not bind socket\r\n)","killed":false,"code":1,"signal":null,"origValue":"Command
 failed: error: cannot bind socket\r\n"},"sessionId":null}
POST /wd/hub/session 500 11276ms - 305
info: Clearing out appium devices





Thanks & Best regards,
Elangovan G
QA Automation Engineer
BPA Technologies Pvt Ltd, Chennai


On Thu, Jul 18, 2013 at 9:25 AM, Jonathan Lipps <jli...@gmail.com> wrote:
Appium has changed since then.

On Jul 17, 2013, at 3:03 PM, Elangovan Ganesan <elang....@gmail.com> wrote:

In the above thread I see below, wrote by Boostrap online.


git clone git://github.com/appium/appium.git

cd appium; ./reset.sh

node server.js -V
--fast-reset --without-delay


Thanks & Best regards,

Swapnil Kotwal

unread,
Nov 19, 2013, 6:56:16 AM11/19/13
to appium-...@googlegroups.com
Hi,

Is anybody knows how to access webview elements for ruby using Uiautomator  and Selendroid?

Thanks,
Swapnil

Aniket Gadre

unread,
Nov 19, 2013, 7:34:59 AM11/19/13
to Swapnil Kotwal, appium-...@googlegroups.com

AFAIK uiautomator doesn't support webviews...you need to use selendriod

http://selendroid.io/hybrid.html

--

Swapnil Kotwal

unread,
Nov 19, 2013, 8:10:01 AM11/19/13
to Aniket Gadre, appium-...@googlegroups.com
Hi Aniket,

I'm using emulator with version 4.3 also the same error on emulator with version 2.3.3

Here is ruby script

require 'selenium-webdriver'
require 'selenium/webdriver/remote/http/persistent'
require 'rspec'

absulute_path =  'C:\Users\Vertis\Desktop\appiumOS\os.apk'#'http://shared.ooyala.com.s3.amazonaws.com/Appium/ContactManager.apk'

capabilities = {
'browserName' => 'Selendroid',
    'platform' => 'WINDOW',
    'version' => '4.3',#3.2 
'device' => 'Selendroid',
    'app' => absulute_path,
    'app-package' => 'com.vertis.mobility',
    'app-activity' => '.ActivationActivity'
  }


describe "Contact" do
  before :all do
    @driver ||= Selenium::WebDriver.for(
      :remote, 
      :desired_capabilities => capabilities,
      :url => server_url,
    )
@driver.manage.timeouts.implicit_wait = 10 # seconds
end

But I got  INSTRUMENTATION_FAILED error using Selendroid

could you please help me sorting this thing out

info: Welcome to Appium v0.11.3 (REV 4a0cb4cc9e974d8d584ae98fef41eee0c067c081)
info: Appium REST http interface listener started on 127.0.0.1:4723
   info  - socket.io started
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"browserName":"Sele
ndroid","platform":"WINDOW","version":"4.3","device":"Selendroid","app":"C:\\Use
rs\\Vertis\\Desktop\\appiumOS\\os.apk","app-package":"com.vertis.mobility","app-
activity":".ActivationActivity"}}
info: Using local app from desiredCaps: C:\Users\Vertis\Desktop\appiumOS\os.apk
info: Creating new appium session 8f220f27-6969-4ec1-87d1-0cb87b0d21f2
info: Starting selendroid server
info: Checking whether selendroid is built yet
info: Selendroid server exists!
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from C:\Users\Vertis\android-sdks\platform-tools\adb.exe
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" devices
info: [ADB] 1 device(s) connected
info: Setting device id to emulator-5554
info: [ADB] Waiting for device to be ready and to respond to shell commands (tim
eout = 5)
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 wait-for-device
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 shell echo 'ready'
info: Starting logcat capture
info: Rebuilt selendroid apk exists, doing nothing
info: Rebuilt selendroid server already exists, no need to rebuild it with a new
 manifest
info: Checking signed status of C:\Windows\Temp\selendroid.com.vertis.mobility.a
pk
debug: Checking app cert for C:\Windows\Temp\selendroid.com.vertis.mobility.apk:
 java -jar "C:\Users\Vertis\Appium\node_modules\appium\lib\devices\android\helpe
rs\verify.jar" "C:\Windows\Temp\selendroid.com.vertis.mobility.apk"
info: Checking signed status of C:\Users\Vertis\Desktop\appiumOS\os.apk
debug: Checking app cert for C:\Users\Vertis\Desktop\appiumOS\os.apk: java -jar
"C:\Users\Vertis\Appium\node_modules\appium\lib\devices\android\helpers\verify.j
ar" "C:\Users\Vertis\Desktop\appiumOS\os.apk"
debug: App already signed.
debug: App already signed.
debug: Getting install status for com.vertis.mobility.selendroid
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 shell pm list packages -3 com.vertis.mobility.selendroid
info: [ADB] App is not installed
info: Rebuilt selendroid is not installed, installing it
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 install -r C:\Windows\Temp\selendroid.com.vertis.mobility.apk
debug: Getting install status for com.vertis.mobility
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 shell pm list packages -3 com.vertis.mobility
info: [ADB] App is  installed
info: [ADB] Forwarding system:8080 to device:8080
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 forward tcp:8080 tcp:8080
debug: Pushing unlock helper app to device...
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 install C:\Users\Vertis\Appium\node_modules\appium\build\unlock_apk\unl
ock_apk-debug.apk
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 shell dumpsys window
debug: Screen already unlocked, continuing.
debug: executing: "C:\Users\Vertis\android-sdks\platform-tools\adb.exe" -s emula
tor-5554 shell am instrument -e main_activity 'com.vertis.mobility.ActivationAct
ivity' com.vertis.mobility.selendroid/io.selendroid.ServerInstrumentation
error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.vertis.mobilit
y.selendroid/io.selendroid.ServerInstrumentation

        at com.android.commands.am.Am.runInstrument(Am.java:802)

        at com.android.commands.am.Am.onRun(Am.java:242)

        at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)

        at com.android.commands.am.Am.main(Am.java:75)

        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)

        at dalvik.system.NativeStart.main(Native Method)


info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: android.util.AndroidEx
ception: INSTRUMENTATION_FAILED: com.vertis.mobility.selendroid/io.selendroid.Se
rverInstrumentation

info: Responding to client with error: {"status":33,"value":{"message":"A new se
ssion could not be created. (Original error: android.util.AndroidException: INST
RUMENTATION_FAILED: com.vertis.mobility.selendroid/io.selendroid.ServerInstrumen
tation\r\r)","origValue":"android.util.AndroidException: INSTRUMENTATION_FAILED:
 com.vertis.mobility.selendroid/io.selendroid.ServerInstrumentation\r\r"},"sessi
onId":null}
POST /wd/hub/session 500 24329ms - 400b

--
Swapnil

Swapnil Kotwal

unread,
Nov 20, 2013, 2:06:03 AM11/20/13
to appium-...@googlegroups.com, Aniket Gadre

Why  INSTRUMENTATION_FAILED error using Selendroid on win7 ?
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discuss+unsubscribe@googlegroups.com.



--
Swapnil

Aniket Gadre

unread,
Nov 20, 2013, 2:13:06 AM11/20/13
to Swapnil Kotwal, appium-...@googlegroups.com
uninstall app from device/emulator, delete the signed app...it gets stored somewhere in temp I guess, rebuild selendroid with reset.bat --selendroid

then check if you still face error
--

Best Regards,

Aniket Gadre


Programming can be fun, so can cryptography; however they should not be combined.

Swapnil Kotwal

unread,
Nov 20, 2013, 5:05:45 AM11/20/13
to Aniket Gadre, appium-...@googlegroups.com

On Wed, Nov 20, 2013 at 12:43 PM, Aniket Gadre <anike...@gmail.com> wrote:
rebuild selendroid with reset.bat --selendroid

Thanks Aniket,

But I dont understood "rebuild selendroid with reset.bat --selendroid" means ?

i ahve opened reset.bat file. Could you please specify , what I have to exactly do ?


--
Swapnil

Aniket Gadre

unread,
Nov 20, 2013, 5:12:10 AM11/20/13
to Swapnil Kotwal, appium-...@googlegroups.com
run "reset.bat --selendroid"

Swapnil Kotwal

unread,
Nov 20, 2013, 6:05:13 AM11/20/13
to Aniket Gadre, appium-...@googlegroups.com

On Wed, Nov 20, 2013 at 3:42 PM, Aniket Gadre <anike...@gmail.com> wrote:
run "reset.bat --selendroid"

I'm using windows 7 (64) bit . When I tried run "reset.bat --selendroid" on command prompt as well as on git bash it shows 'run' command not found.

So i have doble clicked on reset.bat file present under my appium-master folder in downloads.
It reset so many things. I have also removed temp selendroid apk also app from device but still
encountered with issue 

error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.vertis.mobilit
y.selendroid/io.selendroid.ServerInstrumentation

        at com.android.commands.am.Am.runInstrument(Am.java:802)

        at com.android.commands.am.Am.onRun(Am.java:242)

        at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)

        at com.android.commands.am.Am.main(Am.java:75)

        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)

        at dalvik.system.NativeStart.main(Native Method)

--
Swapnil

Aniket Gadre

unread,
Nov 20, 2013, 6:23:18 AM11/20/13
to Swapnil Kotwal, appium-...@googlegroups.com
run is not part of command...command is just reset.bat --selendroid .It won't reset selendroid if its not executed with selendroid flag. if you double click and run it will run with --android flag by default

Swapnil Kotwal

unread,
Nov 20, 2013, 6:45:35 AM11/20/13
to Aniket Gadre, appium-...@googlegroups.com
Got some thing which is not as per our expectation :(

C:\Users\Swapnil\Downloads\appium-master\appium-master>reset.bat --selendroid

=====Installing dependencies with npm=====

'on' is not recognized as an internal or external command,
operable program or batch file.
npm WARN package.json node-i...@0.1.2 No repository field.

=====Resetting Selendroid=====

Clearing out any old modified server apks
The system cannot find the file specified.
The filename, directory name, or volume label syntax is incorrect.
Cloning/updating selendroid
The system cannot find the file specified.
The system cannot find the path specified.
fatal: Not a git repository (or any of the parent directories): .git

Stopping because there was an error and --force was not used
--
Swapnil

Swapnil Kotwal

unread,
Nov 21, 2013, 2:37:40 AM11/21/13
to Aniket Gadre, appium-...@googlegroups.com
Thanks Aniket for your patients.

Instead of git clone, I have downloaded appium from git, so it was causing   fatal: Not a git repository (or any of the parent directories): .git error.

I'm able to run reset.bat --selendroid successfully.

I have installed Java, mvn also set environment variable properly(I'm sure for this).
But still mvn --version command through 

ERROR: JAVA_HOME is set to an invalid directory. error

I googled it but still unable to resolve this issues.

Do you have any idea about it ?


Thanks.



--
Swapnil

Khushboo Kaur

unread,
Jan 30, 2014, 6:00:58 AM1/30/14
to appium-...@googlegroups.com
I have also uninstalled the application from the emulator and executed the Appium Test case which installed the app again (meanwhile I have created the apk again with default debug keystore). It executed well without the Security Exception.

Hope this helps.

Rameshwar Juptimath

unread,
Mar 11, 2014, 5:19:17 AM3/11/14
to appium-...@googlegroups.com, bootstrap online, Tester

how to run ./reset.sh on windows?
On Sunday, April 28, 2013 7:03:30 AM UTC+5:30, Jonathan Lipps wrote:
Also have you run

./reset.sh --selendroid

? It grabs the selendroid submodule. If you don't have it it will fail to build selendroid with a file not found error just like the one you're seeing


On Sat, Apr 27, 2013 at 2:09 PM, bootstrap online <ma...@bootstraponline.com> wrote:


On Sat, Apr 27, 2013 at 3:11 PM, Tester <mugi...@gmail.com> wrote:
Unable to build selendroid server

Do you have maven installed? Selendroid tries to run mvn install.
https://github.com/appium/appium/blob/d00ecbe217ee60b2cecccc2ced4a6a06fe3cfc8a/app/selendroid.js#L73

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
Reply all
Reply to author
Forward
0 new messages