Forum Discussion
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();
}
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.)
- lodecesa2 years agoContributor
AlexKaras wrote: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.)
Hello,
to be honest, it is not very knowledgeable about TestComplete, often providing incorrect or inapplicable solutions, probably its information on the subject is scarce and incomplete.
(This post is its translation from italian) 😁
Related Content
- 9 years ago
Recent Discussions
- 20 hours ago
- 21 hours ago
- 5 days ago