Automate mobile app and website in desktop alternately

Hi,
in order to understand my question I’ll provide you my scenario:

  1. Mobile Phone is setup on a tripod/stand wherein the camera is facing the desktop monitor.
    <starting here, every step is automated>
  2. Website for QR Generation opens in the browser. [Desktop]
  3. Input URL/Text into the textbox and generate the qr code.[Desktop]
  4. Mobile Opens QR Scanning App. [Mobile]
  5. Scans QR Code. [Mobile]
  6. Redirected to next page. [Mobile]
  7. Repeat Step 3 but a different URL/Text is used.[Desktop]
  8. Verify . [Mobile]
  9. Tap OK, returns to QR Scanner. [Mobile]
  10. Repeat Step 5 to 10 until all QR Code Test Data is scanned.

…i’d like to know if it’s possible to send commands to the desktop web browser and mobile app alternately? and how? Thanks!

1 Like

OK! i get it !

So the think is your trying to create kind of bridge/sync between Mobile and Web desk.

To do this irrespective of your scenario, group the web actions separately , execute it ( pass/write data in a global file or excel )

Group the mobile actions separately , once the web is done read values and execute it.

A switch between both is as such not possible without an reliable unified framework.

Thanks,
SathyaNarayan

Start two different WebDrivers from your test. Start a FirefoxDriver (or ChromeDriver, or whatever driver you want to automate the web browser porition), and start your second driver as some AppiumDriver (e.g. AndroidDriver).

Use your desktop driver to navigate to your website and enter the needed details to generate the QR code. Then, have your AppiumDriver start the QR reader application on your device. Use Appium’s tools to wait for when the QR code has been read in and your app is ready to continue.

This should give you the basic idea. There’s no rule saying you can’t use two different drivers at the same time. Just make sure your phone has a decent camera to pick up the QR code.

Of course, this does seem like a rather unstable setup for testing. Perhaps there might be a tighter way to send QR codes to your phone.