We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

mortenb123's avatar
mortenb123
Frequent Contributor
3 years ago
Solved

SetText() exception not caught

How can I catch this exception? function setControlText(control, text) { //usage example 1: setControlText(txtUName, userName); //usage example 2: setControlText(passwordBox, ("1234[Enter]")...
  • rraghvani's avatar
    3 years ago

    Not all methods throw an exception, and SetText doesn't throw an exception.

     

    See https://support.smartbear.com/testcomplete/docs/reference/events/index.html, OnLogError Event which can capture the message.