Assuming you're using the Google Developer Console:
Open the Developer Tools console.
From the Console panel, select the Page context menu icon.
In the drop-down menu, select the frame you want to inspect. The console will now evaluate expressions in the context of that frame.
If you're not using the Google Developer Console:
Open the Developer Tools console.
From the Console panel, select the Frame menu icon.
In the drop-down menu, select the frame you want to inspect. The console will now evaluate expressions in the context of that frame.