name mapping ,change the value of an identification property
like the pic attachments
-----------------------------------code start---------------------------------------------------
def clickbutton():
Project.Variables.var1 = "1" #time1
Aliases.LockControlSimulator.xxx.BoxControl.button1.ClickButton()
Project.Variables.var1 = "2" #time2
Aliases.LockControlSimulator.xxx.BoxControl.button1.ClickButton()
-----------------------------------code end---------------------------------------------------
time1 and time2 is click the same button, I wish it can click the button I set
after it run, the value of the button property will always "1" ,until I restart TC
How can I make the value refresh?
this problem makes me cracy, help me please!
This is a mapped object right?
In which case, this: https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/refreshmappinginfo-method.html
.. .might help?
Additional thought, your mapping appears to be to the container object that holds the button yes? That's the part with the dynamic identification property here? In which case, just ignore it. Search for the button directly from "panel1" (whatever that is - the parent object of the button container). Do a 2 level deep search for the button and the properties on the container cease to matter.
Unless there is something I'm not aware of preventing you from doing this ....
(I'm not clear exactly whats going on here. Do you have one button, which has dynamic properties? Or two buttons, with very similar properties, which you are trying to use a single name map for? If it's two buttons, are they present at the same time? Or is only one of them ever present? All these factors affect how you'd approach this ...)