I am trying to get a text inside a tag in a html of an iframe inside another custom tag.
For example, as shown in the pic, the force-record-layout-section is a custom tag inside a div and there is a iframe that I am trying to get element from.
But it seems when the iframe is inside the custom tag, neither jquery nor Document.GetElementsById/Name/Class/Tag are returns anything instead , all returned undefined.
var frame = document.getElementById("matchClassicStyleText");
console.log("iframe "+frame);
It just logged iframe undefined in the console.
When using jquery, it can locate the custom tag, but .html() returned empty.
Please help me understand if anything I have done wrong or there is other workaround.
The iframe
<iframe force-alohapage_alohapage="" height="220px" width="100%" scrolling="yes" allowtransparency="true" name="vfFrameId_1641796894366" title="accessibility title" allowfullscreen="true" lang="en-US" allow="geolocation *; microphone *; camera *" tabindex="0"></iframe>
Tried document.getElementsByName("vfFrameId_1641796894366") and it is also not working.
matchClassicStyleText is one of the div inside the loaded html of the iframe.
Thanks.