My organization is developing a site using .NET MVC 3, and we have a regression testing suite rigged up using SpecFlow and WatiN.
The test we have involving a user entering payment profile information (using the iframe popup) consistently fails when it attempts to press the 'Save' button in the iframe. A script error is displayed as follows:
'g_CustProf.paymentProfiles' is null or not an object
Line: 284
Char: 5
URI: https://test.authorize.net/profile/scripts/profile.js
If we pause the test run immediately before it hits the 'Save' button and manually press it, it works fine and payment profile information is sent successfully. If we attempt to press the 'Save' button manually after allowing the regression test to attempt to press it, nothing at all happens.
It's also worth noting that we've determined in our tests that this is *not* an issue with WatiN attempting to click a button inside an iframe from an outside domain (XSS), WatiN is able to handle this scenario.
Any ideas?