Contributions
Layout background color
Hi all, Is it possible to get layout background color of android app ?Solved3.1KViews0likes2CommentsRe: Android: enumerating all items in a ListView (even the off-screen ones).
Hi Kriz. Everytime when I scroll down I'm checking if desired object is visibleOnScreen(). I use following code snippet for scrolling down: while (!objFound) { obj = searchForDesiredObj(listView) if (obj.Exists) { objFound = true return true } if (listView.canScrollVertically(1)) { listView.smoothScrollByOffset(1) listView.Refresh() } else { Log.Error("Cannot scroll down anymore.") return false } }1.5KViews0likes0CommentsConnected device
I'musing approachdescribed in https://support.smartbear.com/viewarticle/74782/. If I disconnect some deviceduring playback(not used at that moment)TestComplete does not realize that device was disconnected and test will fail. It would be nice if TestComplete check if device is connected before switching to it. The same for situation when some new device is connected during test playback.2.6KViews0likes1CommentStandalone object spy
It was veeeeery painful to find the root cause of one error in mobile Android application because programmer doesn't have Object Spy in his computer so he had to create at least 15 builds of application in order to find out what is causing problem and when new version of app was created I had to verify with Object Spy if it is OK or not. So standalone Object Spy tool would be greatly appreciated. Since this tool is already created in TestComplete I think that it should not be huge effort.6.4KViews13likes5CommentsRe: Close android application with jscript
Hi, I use following function to restart native android app. If you need to just close android app then do not start app using last command "TestedApps.XXXXXXX.Run()" function restartAndroidApp(device) { var PackManagerObj = device.PackageManager; var Num = PackManagerObj.InstalledPackageCount; var PackObj for (var i = 0; i < Num; i++) { PackObj = PackManagerObj.InstalledPackage(Num - i - 1); Log.Message("Package number = " + i + ". Package name = " + PackObj.Name) if (PackObj.Name == "com.XXXXXX.... !!!!! this must be replaced with your package name !!!!!!!!!"){ break } } try{ while (device.PackageManager.IsActivePackage(PackObj)) { device.ShellExecute("am force-stop com.XXXXXXX") } } catch (e) { Log.Error("Following error occured during closing application: " + e) } TestedApps.XXXXXXX.Run() } Test script(example): //USEUNIT<nameOfScriptWithCommonFunctionsWhereFunction_restartAndroidApp_isPlaced> function ExampleTest123() { var deviceEnum = new Enumerator(Mobile) if (deviceEnum.atEnd()) { Log.Error("No connected device !!!") } while (!deviceEnum.atEnd()) { var device = deviceEnum.item(); // Setting the current device Mobile.SetCurrent(device.DeviceName, device.Index) //restart android app restartAndroidApp(device) //move to next connected device deviceEnum.moveNext(); }1.7KViews1like0CommentsRe: Ability To Check Network Connection Status On iOS (Wi-Fi Status, Etc.)
I wanted to create new topic, but actually it is same as this one, but for Android. There is no easy way to check if there is internet connection on connected device. It is only possible to check if Wifi is ON or OFF2.5KViews0likes0Comments