Forum Discussion
Julia_K
12 years agoSmartBear Alumni (Retired)
Hello Rajat,
TestComplete cannot simulate user actions over disabled controls.
As a workaround, you can modify your recorded script in the following way: obtain the coordinates of the disabled text box relatively to its parent control and simulate a click over the parent control at the specified point.
For example, the following script obtains the coordinates of the text box control relatively to its parent form control and them simulates a click at those coordinates:
' Obtains the text box
Set edit = Aliases.SampleApp.mainForm.textBox
' Obtains the parent control that holds the text box
Set parent = edit.Parent
' Determines the coordinates of the text box center relatively to the text box's parent control
x = edit.Left + edit.Width / 2
y = edit.Top + edit.Height / 2
' Simulates a click
Call parent.Click(x, y)
Please let us know if this information does not help or if you have any additional questions.
Thank you.
Related Content
Recent Discussions
- 2 days agoMW_Didata