Solved
Forum Discussion
8 Replies
Sort By
- AlexKaras
Champion Level 2
Hi Anumolu,
If I got the question right:
Use eval() or evaluate() function (depending on the language of your test project, e.g.: http://www.w3schools.com/asp/func_eval.asp) :
I.e.:
VBScript - Set aliasName = Eval("Aliases.page.button")
Other languages - aliasName = evaluate("Aliases.page.button")
- anumolu9999ContributorHi Alex, Thanks for the reply.... Actually, I want to find whether the screen control exists or not in a windows application screen. So I kept all the aliases names of objects in excel and want to read the aliase name, and want to find whether the object exists or not in the screen. This is the hierarchy of the control in the namemapping: Aliases.MCFConfigTool.MCTWindow.MainWindow.workspace.LogDurationValue I passed this as text to a variable as below aliasName="Aliases.MCFConfigTool.MCTWindow.MainWindow.workspace.LogDurationValue" Can i make the aliasName as an object variable from string variable to perform actions on the object(Exists, click, settext) as Below: if(aliasName.Exists==true) Is there any way to do like this Thanks, Anumolu.
- baxatobCommunity Hero
You can simply do:
element = eval("Aliases.MCFConfigTool.MCTWindow.MainWindow.workspace.LogDurationValue") if element.Exists: do_something()