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
- Select Project View in android studio
- 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.
- Navigate to folder “selenium-java-3.0.1”> “lib”
- Select all libraries and copy them to clipboard.
- Expand your Project structure tree nodes to {ProjectName}>app>libs
- Paste all the libraries.
- 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.
- Now go back to the folder location where you downloaded all your libraries.
- Copy selenium-server-standalone jar file
- Paste in the same location as mentioned above {ProjectName}>app>libs
- Once it is done you will be having all libraries added.
- Select all the libraries and right click to select the menu “Add As Library”, it will take a while to get added.
- 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.
- 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.
Founder of TestingTools.co, constantly shares knowledge on different test automation tools. Has experience in building proof of concepts, solutions, frameworks, platforms & implementation of test automation projects.
In pursuit of building a platform with inbuilt framework and reusable components for Oracle Cloud applications ( Oracle HCM, CX, SCM, Financials clouds, Salesforce and other cloud applications )
Major accomplishments in his career:
- Product architect and development manager for test automation platforms
- Oracle Flow Builder @ Oracle
- CloudTestr @ Suneratech
- 2 times to oracle open world
- More than 20 successful POCs ( Proof of concepts )
- 100 demos
- Designed pricing models.
- Trained more than 50 members.
- Built more than 100 re-usable functions.
Worked with tools: