Ask a question of xpath, need according to the text, check out the following nodes:
Blog
I write xpath://div [contains (text (), 'Blog')], why the query fails? This node, in addition to the text, there are other child nodes, should judge how to write text xpath?
CodePudding user response:
See the MSDN inside, the xpath path usage, not for a long time
CodePudding user response:
Check the documentation, found no way,
CodePudding user response:
Use the string () function convert all the contents of the div node to text, then the contains no, For example, //div [contains (string (), 'Blog')]