In browser console I can't find element inside iframe(after page reload) until I make some clicks in it. After clicks it works perfectly. Does anybody know how to deal with it?
Thanks in advance for any help.
In browser console I can't find element inside iframe(after page reload) until I make some clicks in it. After clicks it works perfectly. Does anybody know how to deal with it?
Thanks in advance for any help.
If you need to access the iframe elements :
window.frames['myIFrame'].contentDocument.getElementById('myIFrameElemId')
As mentioned here Access iframe elements in JavaScript, be careful that the src of the iframe is in the same domain as the parent page.
You may need to wait for the iframe to fully load. Check out this post on how to use the iframe onload event : Capture iframe load complete event.
If you just want to access them from the console, inspect one of the iframe's elements, then the browser will append the whole iframe content on the current page.
I hope this could help you.