Forum Discussion
Rashmi,
As far as I understand, after the application starts and you click the "click here to start" link, you need to determine if the Login dialog is shown or not. You do this using the If Object keyword-test operation. This operation lets you check properties of test objects: windows, controls and others.
Follow these steps:
* Log off from your tested application (so you can see the Login dialog on start).
* Launch the application. Wait until the Login dialog appears.
* Switch to TestComplete, open your keyword test for editing (the keyword test that contains operations working with the Login dialog).
* Drag the "If Object" operation to the appropriate place in your test. Most likely, it should reside after the instruction that clicks the "click here to start" link. After you release the mouse button, TestComplete will display the Operation Properties wizard.
* On the first page of the wizard, you specify the object to be checked. To do this, drag the target icon to the Login dialog. While dragging, a red frame will highlight the object under the mouse cursor. Pause the cursor over the Login dialog's title and wait until the red frame highlights the dialog. Leave the mouse button.
This will "select" the dialog and TestComplete will display the name of the appropriate test object in the Operation Properties wizard. Click Next to switch to the next page of the wizard.
* On the next page, select Exists. Click Finish. TestComplete will add the operation to the test. You will see it in the keyword test editor.
* Now, place all the operations which work with the Login dialog under the If Object operation you added (that is, make these operations child operations of your If Object). You can do that by dragging the operations to the needed location or using the arrow items on the test editor toolbar. Please keep the operation sequence. Else, the operations will be simulated in a wrong order.
Now the operations that work with the Login dialog will be simulated only if the Login dialog is visible on screen.