# Creating A Path File¶

## Test Scenario¶

Write your first path file using the test scenario below:

You would like to test that your name does not appear on any learn.liferay.com article. The steps you would take are the following. Follow along manually on a separate browser to test the steps.

1. Navigate to the Liferay Learn site.

2. Click on the Search input field.

3. Type in your name as the search term.

4. Press the enter key to enter the search term.

5. Assert that there are no search results. If searching for your name returns results, please pick a different name.

6. Assert that a message appears saying there are no articles available.

## Gathering the Locators¶

From the given test scenario, gather the elements that your test needs to interact with.

1. You will need the URL for the Liferay Learn site: http://learn.liferay.com.

2. Open the browser’s Web Developer Console (F12; this displays the DOM). The console will have an icon with an arrow that allows you to inspect the search bar to get the locator. This is called the selector.

3. Using the selector icon, click on the search bar and determine the locator from the highlighted portion of the DOM. In this case, use //input[@id="docsSearch"].

4. Search for your name to navigate to the search results page.

5. Again, using the selector icon from the Web Developer Console, click on the “No Results” message and determine the path. In this case, use //h4[@id="noResultsMessage"].

<td></td>
</tr>
</tbody>

</table>
</body>
</html>