I am running test scripts on android application in TestComplete version 11. Everything works fine but when the same scripts are being executed on testComplete 12 then it doesnt refresh the entire Object tree whenever process.Refresh() is called .
Everything works fine in both the version but whenever the application navigates to other page or the entire current view is changed then Process.Refresh() don't updates the object tree as per new view but if I re-initialize the process variable instead of using refresh function then it works fine,
PFB the python script:
process = Mobile.Device("GT-I9500").Process(testProcessName)
mainPageCollectionView = process.Find("ViewID","recycler",8,True)
#Get Volume Cell
volumeCell = mainPageCollectionView.Find("ViewID", "container",5,True)
Log.Message("volumeCell does not exist")
#Get Volume Setting Screen
volumeMenuBar = volumeCell.FindChild("ViewID", "container_title")
volumeSettingBtn = volumeMenuBar.FindChild("ViewID", "img_more")
### HERE screen changes to volume settings page
# Refresh Process variable as current screen has changed
process = Mobile.Device(testDevice).Process(testProcessName) # working fine
process.Refresh() # persist the old value, so unable to fetch new objects
I am unable to fetch objects of current view if latter process variable is used.
So, can anyone let me know is there any settings or conditions for using refresh function or why TC 12 is behaving so with process.Refresh() ??
I suggest that you create a support case and send us your non-instrumented Android app. Please describe the steps to reproduce when creating the case. Thanks!
And the answer is still to contact Support directly:
While Marsha's reply is probably the best way to go, if you are using NameMapping/Aliasing in your test code, check if this help article is relevant: https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/refres...