Forum Discussion
How should we achieve the same using python in Testcomplete. I understand evaluate() and Eval() can be used for jscript and delphy.
Can somebody please help on this. its an urgent requirement.
Quick google search found that Python supports an "eval()" method as well. have you tried that?
- adithyasekar7 years agoOccasional Contributor
yes . but it didnt work.
Query in detail: I trying to automate notepad.
enter some value in notepad.
the workspace path is = Aliases.notepad2.wndNotepad
if am trying to enter the value as = Aliases.notepad2.wndNotepad.Keys("Hello world"), then it is entering the word . but when i put the path in excel and trying get the path from excel and trying to enter value like = DDT.CurrentDriver.Value["columnName"].Keys("Hello world") >> then its throwing error as string doesnt have keys attribute.
please help in resolving this.
- tristaanogre7 years agoEsteemed Contributor
As mentioned, you need to use eval. I don't know Python so the syntax may be off. But, this is what I would do
var myObject; myObject = eval(DDT.CurrentDriver.Value["columnName"]); myObject.Keys('Hello World');
- adithyasekar7 years agoOccasional Contributor
Thank you Sir. Appreciate your help, That worked.