Hi,
in order to understand my question I’ll provide you my scenario:
- Mobile Phone is setup on a tripod/stand wherein the camera is facing the desktop monitor.
<starting here, every step is automated>
- Website for QR Generation opens in the browser. [Desktop]
- Input URL/Text into the textbox and generate the qr code.[Desktop]
- Mobile Opens QR Scanning App. [Mobile]
- Scans QR Code. [Mobile]
- Redirected to next page. [Mobile]
- Repeat Step 3 but a different URL/Text is used.[Desktop]
- Verify . [Mobile]
- Tap OK, returns to QR Scanner. [Mobile]
- 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.