Find IComponent by id

Faruk Yazıcı shared this question 3 years ago
Answered

How can I find an element (IComponent) by its ID in API? The screen grows like a huge tree with getApiChildren() method. I need to find a button with id button1 from the screen. What is the easiest method of getting an IComponent in an ICanvas, instead of traversing all the components in the screen?

Comments (1)

photo
1

Hi Faruk,


Unfortunately, we do not have any method of getting an IComponent in a ICanvas without traversing all the components, however we will take into consideration for future updates. Meanwhile, you can creating your own "findcomponent" method to avoid repetitions.


Sorry for any inconveniece.


Best,


Sonai Durán