Forum Discussion
Hi,
It is my guess that the following occurs:
-- TestComplete clicks the checkbox for the default language to clear (unselect) it;
-- Some JScript code attached to the OnStateChange/OnClick/etc. event for the checkbox on the web page detects that the check box cannot be cleared, selects it again and displays the warning message;
-- TestComplete detects that the checkbox was clicked successfully but its state did not change and posts an error to the log.
If the above sounds reasonable for the given case, I would try not to click the checkbox, but to set a focus to it and emulate pressing the Space key (which should uncheck the checkbox). Something like oChkBox.Keys(" "). .Keys() method just sends corresponding key code(s) to the message queue and does not perform any additional verifications, so this should not post any error to the test log and you should be able to check if the warning message was shown or not.
Yes, it is closer to the scenario you have provided. The language box is already defaulted. When I proceed to uncheck the box, an alert message appears which tells me that a default language has to be selected. In which the checkbox will then be left checked. However, testcomplete gets confused because it does not seem to notice that the box was left in the checked state. This throws back an error. I am working strictly with keyword testing but willing to give anything a try. Thanks.
Edit:
First, I was wondering if we can delete posts. I am new to this forum and double posted.
Next. The space key does in fact uncheck the box but it functions just like a left-click. The alert still comes up in which makes it so testcomplete is unable to find the value. Is there a way to check/uncheck boxes while ignoring the values?
Related Content
- 2 years ago
- 2 years ago
- 4 years ago
Recent Discussions
- 7 minutes ago
- 19 hours ago