Home > other >  How to write XPath expression with @attribute
How to write XPath expression with @attribute

Time:09-16

How to write XPath expression for @input. I'm trying this expression:

//input[@input='onSearchInput']. 

This expression not found.

HTML input tag:

<input type="text" class="input" @input="onSearchInput" placeholder="Word search" style="">

CodePudding user response:

Your markup is not well-formed due to the @ character in @input. Remove the @ character if you want to use XML-based tools such as XPath.

See also Is the at-sign (@) a valid HTML/XML tag character?

  • Related