Solved
Forum Discussion
lodecesa
3 years agoContributor
AlexKaras wrote:Hi,
Assuming that you have:
var aStr = "Aliases.browser.page.form.mappedName";
Are you looking for this:
var anObj = eval(aStr);
?
Yes, this solution works as I was suggested by ChatGPT after several attempts. The final form I used is this:
function (elementAlias) {
// The prefix to be added before the alias of the element
var aliasPrefix = "Aliases.browser.page.form.";
// Retrieve the element through the alias
var element = eval(aliasPrefix + elementAlias);
// Interact with the element
element.Click();
}
AlexKaras
3 years agoCommunity Hero
Hi,
> as I was suggested by ChatGPT after several attempts.
Funny 🙂
Just curious what your request succeeded? (I.e. whether ChatGPT already processed this Community or it was solution from some other forum/for some other language.)