Let me explain first , Watir is an open source library of Ruby . It's very easy to write and execute test cases with the help of this library . for automating we applications we need an address path which is XPath.
How to create XPath :
Let's take an example , this is a heading
Now test case is to click on this heading.
so the xpath will be :
For more deatils, pls refer this document .