You can run your mobile web app on Firefox as well as on chrome with modify header.

Using Firefox:

  1. First close all of the Firefox instances then create new Firefox profile. Profile can be created by following Use the Profile Manager to create and remove Firefox profiles
  2. Install Modify Header
  3. Add user agent string as follows

    • In Firefox, click on the Tools menu, and choose Modify Headers. The Modify Headers dialog appears (it isn’t the most intuitive interface):

    • In the drop-down list at the top-left of the screen, choose Add

    • In the first text box, type ‘User agent Name’

    • In the second box, paste in the User Agent Profile URL for the desired mobile device. UA strings can be found here

    • Click the Add button

  4. Now turn on the Modify Headers and Test whether it works by navigating to any mobile website.
  5. Close the browser
  6. To use this profile in automation with QAF, provide webdriver.firefox.profile=<PROFILE_NAME> in file.
  7. Provide sysproperty in testng task of runtests target in scripts/seleniumtestrunner.xml file as follows.

sysproperty key=”webdriver.firefox.profile” value=”PROFILE_NAME” /

Using Chrome:

1.Provide following property in file

chrome.additional.capabilities={"chromeOptions":{"mobileEmulation":{"deviceName":"Google Nexus 5"}}} = D:/chromedriver.exe

2.Follow the link for specifying a device from the DevTools Emulation panel as the value for “deviceName”.

Another way to run using Chrome :

Create Chrome Profile on which mobile web tests will execute.

Provide following property in file