I'm new to TestComplete and I've been having problems with what should be very simple code. I'm at the end of an order flow and select a radio button to pay by Credit Card. All is well up to there. In the pop-up I select the card type, enter the cardholder name, then the card number, and, finally, select the Exp Month and Year. This all works when I enter values manually. For some odd reason, the OK button never enables when I run my script. When the script fails (and stops) and I try to click the application pop-up's Cancel button, the application returns an error: "Unable to convert variant type of null to a string". I've attached this code snippet and I welcome any ideas. Thanks! Kat
You can try one of the following approaches:
1. Add the Enabled property with the value equal to true to the "OK" button's mapping criteria. To learn how to do this, see the "Adding Identification Properties to Mapping Criteria" help topic. Insert a call to the RefreshMappingInfo method of your application process into your script before it clicks the "Ok" button.
2. Insert a call to the WaitAliasChild method of the Ok button's parent with the button's alias as the first parameter. For additional information, see the "WaitAliasChild Method" help topic.
If my suggestions do not help, please submit a request via our Contact Support form (http://www.automatedqa.com/support/message/). Attach the problematic project suite along with results of the test execution to your request (zip the entire project suite folder).