Contributions
Handling Chinese text values
I have a query on handling Chinese text values in TestComplete. I have one weird scenario : Variable which has value in Chinese traditional (zh_TW) changes string format to Chinese simplified (zh_CN) on its own. I wrote code as : Project.Variables.var1 = “幻燈片播放” //zh_TW Log.Event(Project.Variables.var1) printed in logs as “幻灯片放映”. //zh_CN I am not able to understand how come there is a change in string encodings. Looks like TestComplete does not support traditional Chinese , it only supports Simplified Chinese. Could you please suggest me some solution which can maintain the string encoding formats?737Views0likes1CommentIs it possible to set the Default values and Local values of a project variable by a function call?
Please consider the following scenario: 1.We created a function abc (temp) to retrun a string (say testvalue). 2. We added avariable with Name=Var1, Type=String, Default Value=abc ("xyz"),LocalValue=abc ("xyz") 3. We printed the value forvariable Var1. Expected: String "testvalue" should be printed. Actual: abc ("xyz") is printed. Is there a possibility of setting variable value via functiuon call?Solved1.1KViews0likes1CommentRe: Testcomplete:NameMapping: Can we read & write properties for mapped objects in NameMapping by code?
Hi Tanya, Thanks for your response!!! We checked the 'Update Name Mapping during test run' checkbox. However when we run the scripts on application with modified objects, the script fails to recognize/modify object at runtime. Also as per the description for this option "If this option is selected, TestComplete prompts you to update invalid mapping criteria found during the test run.". It looks like the user would be prompted to update the namemapping. What we are looking to do is modify the name mapping before automatically. Please cosider the following scenario... 1. Theere is a button 'Ok' (WndCaption=OK)in our application which is already mapped. 2. Now name of the button has changed to 'Ok1'(WndCaption=Ok1). 3. We want the name mapping to either get updated via a setting in TC OR if there is a possibilty changing the properties directly into namemapping by code. Current: OBJ1.WndCaption=OK Expected: OBJ1.WndCaption=Ok1 I tried storing the Oject property as a variable and updated it during execution. However this is not efficien for the high no. changes that we need to handle. Regards, Tushar1.7KViews0likes1CommentTestcomplete:NameMapping: Can we read & write properties for mapped objects in NameMapping by code?
We need to update properties for a large number of mapped ojects in an existing NameMapping. Is there a way to do this via a script? eg. I have an object NameMapping.Sys.WerFault.dlgMicrosoftWindows.DirectUIHWND.CtrlNotifySink.btnCancel Properties of btnCancel: WndClass: Button Wndcaption: Cancel In want to read Wndcaption 'Cancel' and change it to 'Close'. Is this possible to do this via code. Please note that I need to do this for more than 3000 objects...pls do not suggest storing the object property value as variables.... Need this urgently...Please help...1.8KViews0likes3Comments