Forum Discussion
Hi Deksha,
could you tell me the "touch" action is on instrumented object or black-box image ( image captured and saved in ImageRepository)?
If for instrumented object, try to find the deepest object of the object you will touch, some object is covered by other object. Somehow, you can hight-line the object but you are unable to touch it with TestComplete.
If black-box image, I usually use method below:
Mobile["Device"]("Your Device Go Here")["ShellExecute"]("adb shell input tap x y")
Hope this will help.
- Daksha9 years agoOccasional Contributor
Hi anhvu,
Thanks for quick response. I am using touch action on instrumented object.
What you mean by deepest object, say currently getting error on pressing back button on mobile device, which did not get simulated on device.
Code I used is :
Mobile.Device(<devicename>).PressBack() ;
- anhvu9 years agoFrequent Contributor
Hi,
1- could you try to use this Mobile["Device"](device)["PressBack"]();
2- Deepest object means the latest object in the object tree. Ex:
Object1
Object1a
Object1aa <--This is the deepest object.Example: The button object may be covered by the text of the button, so try to touch/click on the "text" of the button instead of the button.
- AlexKaras9 years agoChampion Level 3
Hi,
> Code I used is :
> Mobile.Device(<devicename>).PressBack() ;
What if you try
Mobile.Device.PressButton(MobileButtonKey.mbkBack)
Does it work?
- Daksha9 years agoOccasional Contributor
Thanks anhvu and Alex.
My problem got resolved(hopefully as it was intermittent) after adding few more Delays between the actions.
So basically issue is not related to press button but the latency between the action response and actual playback on the screen.
I will try out Mobile.Device.PressButton(MobileButtonKey.mbkBack) as well when face similar issue again.
Related Content
- 5 months agommaloney
- 2 years agoFrits
- 3 years agoLRuoc
- 3 years agoStephenWoolhead
Recent Discussions
- 2 hours agodhundley