cancel
Showing results for 
Search instead for 
Did you mean: 

process.Refresh() not working in TestComplete 12

Highlighted
Visitor

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 4
Highlighted

Re: process.Refresh() not working in TestComplete 12

Hi,

 

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!

Regards,
Yuriy Peshekhonov
Customer Care Engineer
Highlighted
Contributor

Re: process.Refresh() not working in TestComplete 12

I'm havingg the same issue with TC 12.60.5545.7 x64 while testing Android app

Highlighted
Community Hero

Re: process.Refresh() not working in TestComplete 12

And the answer is still to contact Support directly:

 

https://support.smartbear.com/message/?prod=TestComplete

Highlighted
Community Hero

Re: process.Refresh() not working in TestComplete 12

Hi,

 

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...

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!