How do I launch firefox on android device for my automation test cases?

Viewed 1071

I am good with Selenium and worked on many projects of automation but first time I need to automate Web app specifically on firefox with Android. I have used appium successfully for Chrome but could not find a way to launch a firefox gecko driver just like desktop web app in selenium.It is very simple in selenium btw. This is very strange for me that appium does not support firefox capability. Can any one help me on how to run my automated test cases on firefox with Android platform. Thanks in Advance.

2 Answers

First, to use appium android we should first know the package name and the package activity of the application to be tested.

Install manual first via play store your apps or install via your APK.

Please visit this site to understand more:

http://www.automationtestinghub.com/apppackage-and-appactivity-name/

Now, for the issue in this thread I can get information that firefox on android has a package name org.mozilla.firefox and package activity .App.

Just put them in capabilities like this:

DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("appPackage", "org.mozilla.firefox");
dc.setCapability("appActivity", ".App");

Note : The above, assumptions using the java language

http://appium.io/docs/en/writing-running-appium/caps/

When you call driver.launchApp();, it has launched the firefox you have installed.

If you want to install directly via code, add the following capabilities:

dc.setCapability("app", "theAbsoluteLocalPath/firefox.apk");

Appium does support Geckdriver to automate tests on firefox on a mobile device

To run selenium tests on below the below have to be configured

1.Firefox Browser, 2.Android SDK (incase you want it to on a virtual device) 3.Geckodriver

Follow the documentation from the appium website : http://appium.io/docs/en/drivers/gecko/

Related