Forum Discussion

rashmidiwakar's avatar
rashmidiwakar
Occasional Contributor
14 years ago

Windows based application keyword testing,

Hi,



I am new to this tool,.

Basically i'm automating the test for one of the windows based application n its like a windows explorer.

Here i am recording the test using keyword test, 

the very first test is Login,

i recorded the test for login but here i have a problem in putting the condition that if application is already logged in it should show the message that you are already logged in,

the very first step is

double click the application,

the page open with the icon called "click here to start"

the second step is to click on "click here to start" button,

once it is clicked the login screen will pop up 

the next step is to fill user name and password and then click log in.



i could record these easily, but my question is how will i put the condition that if the  "click here to start" icon does not exist after the first step, then the application is already  logged in.

so how will i recognize that the button "click here to start" exists or not.



Thanks,

Rashi

1 Reply

  • 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.