How to access element inside iframe in Java?
I want to get an element's id attribute that is inside of an iframe through Java. How do I access an element inside of an iframe in Java?
emmalee last edited by user
In my experience the simplest way to manipulate elements inside of an iframe with web automation is to treat the iframe src URL as a separate page and call the driver to visit that URL instead of the parent page. From the example in the screenshot, I would have an automated step that would visit the URL in the
srcattribute wasn't visible in the screenshot), then I would call the appropriate step or
findElement()function as normal.