Rapise provides several alternatives for setting control text:

  • DoSetText() – this is the best approach if the control supports this method. Not all the control types support DoSetText. However if a control does support this method then the control has explicit support for having its text without having to use the IAccessible API.

  • DoSendKeys() - appropriate for most cases. Rapise mimics the end-user behavior by actually sending the key-strokes. This approach is less dependent on a specific control library’s implementation of the IAccessible API.

  • SetValue() – this works for some controls, but not for all. This is because Rapise sets the Value property of the controls using their IAccessible accessibility interface and this depends on the IAccessible implementation of that specific control.

  • SetWindowText – this approach performs a Win32 API call for setting the text. Again, some edit controls accept this SetWindowText call, others do not.

If the text is not changed using the SetValue/SetWindowText command, Rapise will not report an issue. This is because these controls are like Password boxes, you may change the value using these methods, but you cannot query the control to determine what the value is (black-box testing).