Tests fail due to incorrect browser control on first iteration

2 posts, 0 answers
  1. Cedric
    Cedric avatar
    1 posts
    Member since:
    Oct 2012

    Posted 06 Jan 2011 Link to this post

    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:

    1. Clear Browser Cookies
    2. Navigate to http://localhost
    3. RadInput('ctl00_LoginControl_textUserName_wrapper'): value '' enetered. - DataDriven: [$(UserName)]
    4. Keyboard (KeyPress) - Tap (1 times) on 'LoginControlTextCompanyAccountTextText'
    5. RadInput('ctl00_LoginControl_textCompanyAccount_wrapper'): value '' entered. - DataDriven: [$(Account)]
    6. ...
    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.
  2. Stoich
    Stoich avatar
    1 posts

    Posted 10 Jan 2011 Link to this post

    Hi Cedric,

     Thank you for choosing to evaluate WebUI Test Studio.

    I'm not sure I'll be able to help you based only on this description. The first thing that comes to mind is that you might want to try to re-record the login without using the Tab button - but his is pretty much a stab in the dark.

    Could you please provide some (the more the better) of the following:
    -your actual WebUI test and if possible the login page you run it against
    -a video demonstrating the problem (Jing is really good for this)
    -the log of the failure error

    Hope to hear from you soon!

    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Back to Top