Adding and removing project items

In TestComplete, a lot of features are implemented as project items, which implies the need to add a corresponding element to the project prior to using "this or that" functionality.

In this recipe, we will look into an example for adding a Manual Tests element to the project (the element is meant to store the tests that are necessary to run manually). Additions of other elements to the project are done similarly.

How to do it...

In order to add a project item, we need to perform the following steps:

  1. Right-click on the name of the project in the Project Explorer panel and select the Add | New Item menu item:
    How to do it...
  2. In the opened Create Project Item dialog window, select the necessary element (Manual Tests in our case):
    How to do it...
  3. Click on OK.

    As a result there will appear in our project a new element Manual Tests, which is workable as if from within TestComplete as well as directly from the scripts (if such a possibility is in store for the element in view).

  4. To delete the project item from the project, right-click on it and select the Remove menu item.
  5. In the opened window, select one of the removal methods: Remove or Delete.

How it works...

It is necessary to use the same action (Add | New Item) for adding elements to the project and for addition of other sibling elements. For example, to add a new test to the Manual Tests group, right-click on the Manual Tests element and go for the Add | New Item menu item.

  • The Remove operation removes only the element of the project, while the element itself remains on your HDD. Later on, it could be added back into the project by selecting Add | Existing Item from the contextual menu of the project.
  • The Delete operation will remove the elements of the project and all the project-related files.

There's more...

Support of different components (.NET, Java, Win API, and others) as well as of third-party controls (Infragistics, DevExpress, and others) is implemented in TestComplete with the help of extensions. To look up the list of supported and included extensions, and to disable those which you don't use, opt for the File | Install Extension menu item and uncheck the unnecessary ones.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.106