cancel
Showing results for 
Search instead for 
Did you mean: 

RefreshMappingInfo() not working

SOLVED
Highlighted
Valued Contributor

RefreshMappingInfo() not working

My application is written in delphi.
when i run below code gets error "Python runtime error.
RuntimeError: 0x847ceed2" in Log.Message(childtab.Text) line...

by debugging found that RefreshMappingInfo() did not working
the code is below..

def closeAll(self):
 tabCount = Aliases.App.Browser.MDIClient.ChildCount
 for i in range (0,tabCount):
   Aliases.App.Browser.MDIClient.RefreshMappingInfo()
   Delay(5000,"Waiting everything to be refreshed...................")
   childtab = Aliases.App.Browser.MDIClient.Child(0)
   Log.Message(childtab.Text)
   childtab.close()


while debugging , when go to object browser ..could see deleted tab is there even though RefreshMappingInfo() runs.

So child(0) still refers to closed tab

 

when RMB and manually refreshed mapping infor, script runs correctly.

always first tab is closed correctly problem starts subsequent tabs .

any ideas..?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: RefreshMappingInfo() not working

Hi @NisHera . I found your support ticket for this issue. I am glad to know you've solved it! Smiley Happy

 

Let me post the solution here for other community members to see:

 

Basically, the “Refresh()” method should be used before “RefreshMappingInfo” and it will update the child objects. 

 

Great job!



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: RefreshMappingInfo() not working

This is likely a timeing issue. I would suggest doing something along the lines of WaitAliasChild to wait for the tab to not exist.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Valued Contributor

Re: RefreshMappingInfo() not working

No use Waited for around a one and half minute...... Smiley Frustrated

 

Highlighted
Community Manager

Re: RefreshMappingInfo() not working

Hi @NisHera . I found your support ticket for this issue. I am glad to know you've solved it! Smiley Happy

 

Let me post the solution here for other community members to see:

 

Basically, the “Refresh()” method should be used before “RefreshMappingInfo” and it will update the child objects. 

 

Great job!



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post