I am trying to populate the field that is nested within an aura component using DOM elements.
I am able to access the parent with
document.getElementsByTagName; however, I cannot access the child component that is nested in the parent lightning-input. After looking into the documentation, it mentions that we cannot use document or window properties to query these nested DOM elements, but instead, we need to use the template as the root target.
Is it possible to view the nested input tags and modify the text within it?
<div> <lightning-input> <input id="input-0"> </lightning-input> </div>
For more context, the input tag acts as a login field, where I am looking to populate the field when a button is pressed externally (within a mobile app).