Forum Discussion
TanyaYatskovska
9 years agoSmartBear Alumni (Retired)
Hi Chopper_elation,
You can do the following:
- You need to add the images of your app icon and the menu icon to TestComplete’s Image Repository. TestComplete will search for objects based on these images and touch them on the screen. Please read the Image-Based Testing Principles ( http://smartbear.com/viewarticle/75229/ ) article for details.
- To swipe the menu window, you can call the Swipe method of the AndroidDevice object. So your test may look like this (this is a sample app that is looking for the GPSTest application on Sony):
function Test() { var nameAndroidDevice = "*"; var AndroidDevice = Mobile.Device(nameAndroidDevice); Mobile.SetCurrent(nameAndroidDevice); var SonyLaunchApp = ImageRepository.SonyLaunchApp; // find the menu icon and touch it SonyLaunchApp.MenuButton.Touch(); // swipe the window until the needed app is found AndroidDevice.Swipe(700, 200, 100, 600, 1); var GPSTestButton = SonyLaunchApp.GPSTest; if (GPSTestButton.Exists()) // the app was found GPSTestButton.Touch(); AndroidDevice.Swipe(700, 200, 100, 600, 1); if (GPSTestButton.Exists()) GPSTestButton.Touch(); }
Related Content
- 2 years ago
- 2 years ago
- 10 months ago
Recent Discussions
- 2 days ago