I have created a few tests for the authentication portion of our website by recording authentication in IE and substituting data driven authentication credentials. We have three inputs, two RadTextBoxes with empty messages and an asp:TextBox with TextMode="Password" Each test begins as follows:
- Clear Browser Cookies
- Navigate to http://localhost
- RadInput('ctl00_LoginControl_textUserName_wrapper'): value '' enetered. - DataDriven: [$(UserName)]
- Keyboard (KeyPress) - Tap (1 times) on 'LoginControlTextCompanyAccountTextText'
- RadInput('ctl00_LoginControl_textCompanyAccount_wrapper'): value '' entered. - DataDriven: [$(Account)]
When I run the tests in IE, on the first iteration the test runner puts the UserName in the UserName box and tabs to the password box (this is incorrect since, when recording I tabbed once from the username box to the account box, but is insubstantial since the test still runs correctly on later iterations), it then enters something into the password box, puts the focus on the account text box entering no data, continues with the rest of the test, and fails bacause it never entered the account value in the second RadInput. On later iterations it correctly inserts the text into the account RadTextBox. If I run it through a debugger, it inserts the text into the correct text box. If I remove the tab keypresses the test still fails. Changing the delay between 400 and 1000 milliseconds doesn't change whether or not the test fails.