How to access an element inside an external iframe in watir?
<iframe src="externalurl">
<html>
<body>
<div class="hello">hello</div>
<form src="externalurl">
<div class="classInFormInIframe"></div>
</form>
</body>
</iframe>
How can i access the div inside the form with the external url too?
This code will access the div
b.iframe(src: 'externalurl').form(src: 'externalurl').div
If you want to trigger any action like click
then
b.iframe(src: 'externalurl').form(src: 'externalurl').div.click