Forum Discussion

rafiqque's avatar
rafiqque
Occasional Contributor
12 years ago

Cannot update PropertyGrid



I am trying to set a value of one of the items in property grid. This will have either true or false. By double clicking it will change values. I got this code from record and play. But win I put it in my script and run it is throwing error. "Value" is undefined and  it is TypeError.



mConfigGrid.wItems("Stock Setup").DblClickValue("Stock Repairs Only");



I dont understand why when I run it from script it throws error whereas when I run the piece code generated by reocord and play doesnt.



  • ananddave123's avatar
    ananddave123
    Occasional Contributor
    Can  you paste the piece of code here where u defined mConfigGrid

    also 

    paste the 
    piece code generated by reocord and play to define mConfigGrid
  • rafiqque's avatar
    rafiqque
    Occasional Contributor
    Sorry for the late response as I was away on holidays.



    This["Properties"]("objpropertyGrid") = "Sys.Process(\"RAL.EnterpriseClient\").WinFormsObject(\"Startup\").WinFormsObject(\"tctlMain\").WinFormsObject(\"{RAL.UI.WinForms.Stock}.{S20Config.S20StockConfigGrid}0\").WinFormsObject(\"S20ConfigGrid\").WinFormsObject(\"pnlUpper\").WinFormsObject(\"propertyGrid\")";



    mConfigGrid = eval(This["Properties"]("objpropertyGrid")["Value"]);



    Our product can be customised based on the customer's need. So the application will be same for 2 different customers but their internal menu options will varry with its names. So to test it for two different customers I have to have different projects as the objects will vary for each customer. (For example a Stock steup screen will have different suffixes based on where they have been placed in the menu hierarchy).





    The same piece of code works well for another project but for the current one it fails. Although both the projects are same (Test Complete Project files). It is something to do with the object mapping or so I am  not sure.