Forum Discussion
- AlexKarasChampion Level 3
Hi,
Assuming that you have:
var aStr = "Aliases.browser.page.form.mappedName";
Are you looking for this:
var anObj = eval(aStr);
?
- lodecesaContributor
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(); }
- AlexKarasChampion Level 3
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.)
- rraghvaniChampion Level 3
See Find Mapped Objects by Aliases, WaitAliasChild Method
Can you not use?
var elementReference = Aliases.browser.page.form.mappedName;
Related Content
- 6 years ago
- 9 years ago
- 6 years ago