Configure android project with Selenium libraries

Configure android project with Selenium libraries
Like Tweet Pin it Share Share Email

Once you have created the project in android studio by following the article: how to create project in android studio, your next step is to configure the android project with selenium libraries, in order to work with selenium WebDriver based test automation script. We are focusing more on Java code as reference.

Steps to configure android project with selenium libraries

  1. Select Project View in android studio
  2. Assuming that you have downloaded all the libraries as specified in the article: Mobile app testing automation using appium and android studio, you should have the following list of libraries. 
  3. Navigate to folder “selenium-java-3.0.1”> “lib”
  4. Select all libraries and copy them to clipboard.
  5. Expand your Project structure tree nodes to {ProjectName}>app>libs
  6. Paste all the libraries.
  7. You would be asked to specify the “copy file location” in a small dialog window, click OK button to continue. It might take a while to paste all the libraries. 
  8. Now go back to the folder location where you downloaded all your libraries.
  9. Copy selenium-server-standalone jar file
  10. Paste in the same location as mentioned above   {ProjectName}>app>libs 
  11. Once it is done you will be having all libraries added.
  12. Select all the libraries and right click to select the menu “Add As Library”, it will take a while to get added. 
  13. You might be presented with a Proxy Settings window, you need to provide ipaddress and port to HTTP Proxy and Enable HTTPS Proxy sections and click OK button, if you are in office location or behind a firewall. 
  14. You can see that new code is added @ gradle.build file.

Now you are ready with configuring all the libraries to android project, please share any of your queries in form of comments, we would try our best to provide any solutions. In the next step you will be creating a selenium webdriver script to automate the mobile app testing of a calculator.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *