Software Testing & Quality Assurance
Saturday, October 20, 2018
Using 'text()' Method in 'contains()' Method
Syntax to use text() method in contains() method is given below:
//div[contains(text(), 'text')]
For example:
//a[contains(text(), 'ac')]
Here,
//a[contains(text(), 'ac')]
searches all the 'a' elements which contains 'ac' as attribute text value.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Double Slash ' // ' After Double Slash ' // ' In XPath
XPath Using 'or'
'or' expression uses two conditions and one of the two conditions must be true to locate a web element. It will fail to locate an ...
What is XPath?
XPath is defined as XML path. As XPath is a query language which is based on the tree representation of the XML document, it provides th...
Absolute XPath
The easiest way of finding the XPath is to use the Browser Inspector tool to locate an element and get the XPath of it. Absolute XPath...
No comments:
Post a Comment