Forum Discussion
8 Replies
- Marsha_RChampion Level 3
Take a look here. One of these options should work for you.
- DaniellovesmithContributorHi Marsha, I use android application.If you see swipe method values Ex: Mobile.device(). Swipe (34,56,677,6,50).So how to get these coordinate values (do not want use record and get the numbers).Can we get these values in anyway?
- AlexKarasChampion Level 3
Hi,
Just to rephrase Marsha:
As per documentation - first four parameters of the .Swipe() method are start and end coordinates on the screen. If you like to do swipe for some object, its absolute screen coordinates of the top-left corner can be obtained from the .ScreenTop and .ScreenLeft properties. End coordinates can be calculated from the start ones by adding the desired swipe shift.
If I remember it correctly, end coordinates must be within the screen of the device. The size of the screen can be obtained using the <device>.Desktop.Height, .Width and .Density properties.
Does the above help?
- DaniellovesmithContributor
Hi,
Actually, i'm trying automate Camera and Gallery in Mobile. I used normal Record and Playback but it is unreliable. So, follwing Image based Approach.
EX: While trying to automate Gallery(contains 300 images) the test case is i should click at 200th image you know how many times i have to swipe to the exact location of the image.
I thought Swipe() method would automatically give the values(Swipe(233,525,262,77)) when we do Object Spy or On Screen Action. yes, It won't return any values and how to proceed for this scenario.
Please guide me. Thank you and sorry for the confusion Marsha. Attached Scrrenshot.
- AlexKarasChampion Level 3
Hi,
It looks like you are testing instrumented application and TestComplete can access application's internals, aren't you?
Also https://community.smartbear.com/t5/TestComplete-Mobile-Application/How-do-I-create-a-swipe-routine-that-looks-for-an-app-on-mobile/m-p/109652#M835 might be of some interest...
Related Content
Recent Discussions
- 26 minutes agoSvetaG