Question: xpath when to use contains?
Answer: Contains() is a method used in XPath expression. It is used when the value of any attribute changes dynamically, for example, login information. The contain feature has an ability to find the element with partial text as shown in below example.