w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
WatirWebdriver using Xpath to find children of a given node

The problem is that the inner XPath says to search for the h1 element anywhere in the document. To only search within the context of the current node, you need to tell the XPath by starting with a .:

panel.element(xpath: './/h1[@class="thing_title"]/a')




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.