in Testing by
Briefly explain what does below code snippet indicate?

1 Answer

0 votes
by
WebElement sample = driver.findElement(By.xpath("//*[contains(text(), 'data')]"));

It defines a variable sample of type WebElement, and uses an XPath search to initialize it with a reference to an element that contains the text value “data”.

This brings us to the end of this article on Top 50 Software Testing Interview Questions. Hope it helped in adding up to your knowledge. Wishing you all the best for your interview. Happy learning.

If you found this “Software Testing Interview Questions” article relevant, check out the Software Testing Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe.

Related questions

0 votes
asked Mar 27, 2021 in Testing by rajeshsharma
0 votes
asked Nov 13, 2020 in Testing by sharadyadav1986
+1 vote
asked Jun 24, 2019 in Testing by gsharma31
...