Thursday, January 20, 2011

Web Application Testing in Ruby: How to get Watir to return actual HTM, when site is redirecting??

Web Application Testing in Ruby: How to get Watir to return actual HTM, when site is redirecting??

Watir is working correctly in that case. There is no special user-agent or anything used by Watir because plain old IE is used and it's user-agent is sent by the IE itself of course.

The reason why you cannot find the checkbox with Watir or from the HTML is that the checkbox is in a frame :) Look for a frame tag in that html and you can understand why you were not able to find it before.

You can access it from the frame instead:

b.frame(:id, "download-frame").checkbox(:name, "21.1.9.12.3.1.3.0").clear
If you're getting access denied errors when trying to access frames

No comments:

Post a Comment