Issue
When I need to see my doctor I have to:
- Call to 666666666
- Wait 5 seconds
- Press 1
- Wait 5 seconds
- Press 20301990
- Wait 5 secondos
- Press 1
So I want to automatizate all this steps
I know that I can fire the call doing:
adb shell am start -a android.intent.action.CALL -d tel:666666666
and I can simulate a input by:
sleep 5
adb shell input text "1"
sleep 5
adb shell input text "20*30*1990"
sleep 5
adb shell input text "1"
but It can't work if I don't open de dial pad after adb shell am start -a android.intent.action.CALL -d tel:666666666
and before adb shell input text "1"
So my question is: How can I open the dial pad during a call using adb?
Solution
You can find the coordinates of the dial's pad button and then simulate a press by sending input tap x y
.
If your automation will be used on multiple devices from different types, I would advise you to write a simple python script that uses uiautomator to do that task.
Answered By - TDG
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.