title: Playwright Fixture or Config file for Android Device testing via ADB connection
body: <p>I would like to execute our existing tests on a physical android device. Currently, we can execute tests on an emulator via this CLI command:
  <code>npx playwright test --config=qe/configs/playwright.config.ts</code>
  I am hoping that I can create another config file and execute all our tests on a physical android device connected to my laptop via USB (ADB connection) through CLI command, maybe like this:
  <code> npx playwright test --config=qe-ui/configs/playwright-android.config.ts</code></p>
  <p>How do I create a config specific for android execution? And if that is not possible how do I create a Fixture so I can have tests use that fixture to execute tests on a physical android device?</p>
  <p>Here is an example of a test spec file executed on android device:
  I would like to put all the setup like browser context in a config or fixture so all my specs will not have to do this:</p>
  <pre><code>
  (async () =&gt; {
    // Connect to the device.
    const [device] = await android.devices();
    console.log(`Model: ${device.model()}`);
    console.log(`Serial: ${device.serial()}`);
    // Take screenshot of the whole device.
    await device.screenshot({ path: 'device.png' });
  
    {
      // --------------------- Browser -----------------------
  
      // Launch Chrome browser.
      await device.shell('am force-stop com.android.chrome');
      const context = await device.launchBrowser();
  
      // Use BrowserContext as usual.
      const page = await context.newPage();
      await page.goto('https://webkit.org/');
      console.log(await page.evaluate(() =&gt; window.location.href));
      await page.screenshot({ path: 'page.png' });
  
      await context.close();
    }
  
    // Close the device.
    await device.close();
  })();
  </code></pre>