One of the goals in creating a solid architecture is to create testcases that are not only easy to write, but are also easy to read. One situation that may occur is a window declaration which contains the objects that you are interested in, but does not categorize the objects in ways that best meet the business logic or application structure. Within the 4Test language, a "dummy" object can be created in order to categorize or group these declarations together. The child objects of dummy object "Introduction" (seen above) can now only be referenced following the "Introduction" object. This technique allows for the window objects to be recognized only if the script follows a logical path. As a result, the script writing team will be less likely to reference the wrong object in their script. For example, the HtmlText2 object Welcome would be referenced like so ; HomePage.Introduction.Welcome.Exists() Old KB# 21801
↧