Forum Discussion

lk_infy's avatar
lk_infy
Visitor
8 years ago

process.Refresh() not working in TestComplete 12

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)


process.Refresh()
mainPageCollectionView = process.Find("ViewID","recycler",8,True)

#Get Volume Cell
volumeCell = mainPageCollectionView.Find("ViewID", "container",5,True)
if(volumeCell.Exists):
Log.Message("volumeCell exists")
volumeCell.Touch()
else:
Log.Message("volumeCell does not exist")

#Get Volume Setting Screen

volumeMenuBar = volumeCell.FindChild("ViewID", "container_title")
volumeSettingBtn = volumeMenuBar.FindChild("ViewID", "img_more")
volumeSettingBtn.Touch()
 ### 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() ??

 

Thanks
Lovish 

4 Replies