Quick start Html
Here is an simple example on how to write a web test case. It will test, that if you enter
"Yawet" in the Google search, the InforMatrix homepage will be found by Google. The example
can be downloaded from
http://www.informatrix.ch/yawet/examples/google.ywt
-
See Installation if you don't know how to start Yawet.
-
Set up a new Project:
- In the menu select [File]->[New Web Project].
- Enter the server base url (ex. http://www.google.ch/).
- If you need a proxy to access the internet, click on the [Browser] tab and configure the proxy host and port
- Optionally go to the [System] tab, configure your web browser and select "use request url".

-
Create a Html test page:
- In the tree view, click with the right mouse button on the project.
Select [Add child]->[Html Doc]
- Enter the main page url (ex. index.html).
- Click [Run]. The page is loaded and the page icon turns (hopefully) green. If not, check the [Log] tab

-
Create an input field test node:
- Select the [Dom] tab. Enter "input" in the search combo box field.
Click [Search]
- Click [Search] again to cycle through the available input fields
on the page. After two clicks you should be on the search input field.
- Click with the right mouse button on the found input field and
select [Add Element]
- In the tree view, click with the left mouse button on the newly created Html Tag icon.
On the right view the properties of the Html Tag test node are shown
- Click on the [Attributes] tab. Verify that the name attribute is set to "equals" "q"
- Click on the [Action] tab. Select "set text" from the combo box. Enter "Yawet" in the
appearing text field.
- Click [Run]. The Html Tag icon should now turn green and internaly the input field now has the value "Yawet".


-
Create a submit button test node:
- In the tree view, click again on the page icon (named "Html Doc")
and select the [Dom] tab
- Enter "submit" in the search combo box field. Click [Search].
- Click with the right mouse button on the found submit button and select [Add Element]
- In the tree view, click with the left mouse button on the newly created Html Tag icon.
- Click on the [Action] tab. Select "click" from the combo box.
- Click [Run]. The element icon should now turn green.

-
Verify the result page:
- In the tree view, click with the right mouse button on the existing Html Doc icon
and select [Add next]->[Html Doc].
- Click [Run] to load the result page into Yawet.
- In the tree view, click with the right mouse button on the new page icon and select [Add child]->[Html Tag]
- Select the [Html Tag] tab. In the Type combo box select "A".
We are looking for an anchor element. Click the [Ok] button.
- In the Position combo box select "first". There might be more than one link to our company.
- Select the [Attributes] tab. Click the [Add] button.
- In the new row click in the attribute field. Select "href" from the combo box.
- Select "contains" from the relation field.
- Enter "www.informatrix.ch" in the value field.

-
Save and run the test:
- In the menu select [File]->[Save]. Enter a file name (ex. googletest) and save the test.
- Press [F3] to run the whole test.
- In the tree view, now all icons should hopfully turn gree.
- If not, click on the lowest red element, and check the error message in the Log tab.
- If yes, start testing your real web applications. ;-)