0

In python I want to know if i can test phone call service with appium so as Wifi or bluetooth . the point is i can with appium press phone call button and dial number but how actually i can test that phone call is established ? same is for bluetooth - wifi - phone pairing

one dumb way is to press dial button and compare dial screen with a presaved screen but this is only UI testing, not connection service testing. if it can't be done with appium,do you know how it can be done ?

1 Answers1

0

After clicking the call button via appium, you can check the call state via adb:

    >>> import subprocess
    >>> output = subprocess.check_output("adb shell dumpsys telephony.registry | grep mCallState", shell=True)
    >>> print(output)
    b'  mCallState=0\n'

From here.

Community
  • 1
  • 1
import random
  • 3,054
  • 1
  • 17
  • 22