lovelysystems / robotframework-androidlibrary

Robot Framework Automation Library for Android
29 stars 22 forks source link

import Android Library is throwing ERROR #45

Closed srib4ufrnd closed 11 years ago

srib4ufrnd commented 11 years ago

I started using robotframework-android library. I am planing to automate my ROBOOT test cases with this completly.

But i am stuck in importing the librrary itself.

I could not find clear documention on begin step of How to import android library with arguments.

I am using RIDE, but i ran the test script with the basic command line using Pybot. i am getting the below error

[ ERROR ] Error in file 'C:\Users\sreedhar.r\Desktop\xxxxxxxx.html' in table 'Settings': Creating an instance of the test library 'AndroidLibrary' with no arguments failed: Couldn't find adb binary in C:\Users\sreedhar.r\None\platform-tools Traceback (most recent call last): File "C:\Python27\lib\site-packages\AndroidLibraryinit.py", line 38, in init 'platform-tools/adb.exe']) File "C:\Python27\lib\site-packages\AndroidLibraryinit.py", line 57, in _sdk_path os.path.split(complete_path)[0],))

I already set an environment variable ANDROID_HOME

and while importing android library i am importing in the below way (TextEdit View in RIDE) * Settings * Library AndroidLibrary ANDROID_HOME=None

My complete test case looks as below (TextEdit View in RIDE)

* Settings * Library AndroidLibrary ANDROID_HOME=None

* Test Cases * Temp1 Start Emulator HUI_PFM no_window=False language=en country=us

Can any one help me?

srib4ufrnd commented 11 years ago

I found the problem is with passing ANDROID_HOME arguments as none in settings i understand this by seeing the above error where it is mentioned as below Couldn't find adb binary in C:\Users\sreedhar.r\None\platform-tools

So i did a small correction. Ok it worked for me with small correction As i already set ANDROID_HOME environment variable (in windows Mycomputer->properties->advanced->Environment variables)

i changed the import command to as below * Settings * Library AndroidLibrary

atleast import command is working fine.

Earlier Import library command in RIDE was shown in RED colour. Now it is properly shown in BLACK colour.

dont know whether the problem was with RIDE or not.

so closing this issue.

peritus commented 11 years ago

Yes, you shouldn't set ANDROID_HOME=None.