Coded UI test cases doesn't respond well on time if they encounter any field having JavaScript validation.

Issue: Currently I am facing some issues with the time taken by Coded UI in execution of Functional Test cases. On doing some research (hit and trial) I found that whenever there comes a field which have some client side validations, execution slows down e.g. I have fields like 'Start Date' and 'End Date', when user enters start date and focus is moved from that field, application verified if the Start Date is less than Current Date, same happens for End Date field too. Manually this works fine, but when Coded UI test cases are executed for forms containing such fields, then it takes a lot of time to fill value of the field which have client side validations and the overall execution time increases if there are 4-5 such fields on a page.

Is there a way to resolve this issue in Coded UI test cases written in VS 2013 like executing the JavaScript through test code etc.

For more information all the fields are using (or implemented) Bootstrap.

1 Answer 1


You can try focusing the field and using SendKeys to send the values instead of using SetProperty on the controls.

  • Tried the same but still same issue.
    – Dhiman
    Mar 4, 2016 at 14:35
  • 1
    What is the verbosity level of your logs? It will give you a lot of information on what is taking so long. Mar 4, 2016 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.