1

I found this Android webdriver API on github.

I already have the Selenium Python client and have written many plain web-based test scripts with it. I have tried asking the git owner, but he has not responded.

Here are the instructions:

  1. download AndroidWebDriver4Python using command:

    $ git clone git://github.com/truebit/AndroidWebDriver4Python.git

  2. Download and extract Selenium Python client

  3. Copy the entire py folder under AndroidWebDriver4Python to merge the same one in root directory of AndroidDriver for Python

  4. Back to the root directory of Selenium Python Client, to install this modified version using command:

    $ python setup.py install

What does number 3 mean? It sounds like he's saying to copy the py folder into itself. Shouldn't it go into the Lib folder of your Python27 folder?

Also, I don't understand step 4. Won't this reinstall your Selenium Python client?

0

2 Answers 2

4

I am the author.

Actually this is a patch-like binding. You should know what I said in step 2. You need to download the source code of official Python bindings for Selenium and then copy my patch to the source files and install the patch source code, as mentioned in step 3 and 4.

7
  • Huh? Could you explain Step 3 another way? 'So what you need to do is to download the source code of AndroidWebDriver and then execute step 3 and 4.' just sounds like a repeat of your instructions. I don't understand step 3 or step 4. I have already downloaded the AndroidWebDriver and have used Webdriver with Python for plain web scripts already.
    – StacyM
    Oct 16, 2013 at 5:41
  • @StacyM Sorry, I made typo. I updated the answer.
    – Sean
    Oct 17, 2013 at 2:57
  • What does "copy my patch to the source files" mean?
    – StacyM
    Oct 17, 2013 at 23:37
  • It means copy the dir of github.com/truebit/AndroidWebDriver4Python/tree/master/py to official source of selenium bindings
    – Sean
    Oct 18, 2013 at 0:52
  • What does "official source of selenium bindings" mean? What folder specifically and what directory?
    – StacyM
    Oct 18, 2013 at 2:36
0

Hi @StacyM he is talking about the path C:\Python27\Lib\site-packages\selenium\webdriver you can place the android file there. Also in your __init__.py file you can add the line from android.webdriver import WebDriver as Android if what I have read is correct. Maybe @Sean can confirm this?

EDIT: I did get this working by removing my old Selenium, unpacking the newest selenium in the site-packages, then taking the android package and adding the way I suggested above. After all of this went to command line @ C:\Python27\Lib\site-packages\selenium (this directory might include numbers after selenium) and ran the script python setup.py install. Let me know if this works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.