general selenium questions

By | April 29, 2019

1. Find element using xpath and cssSelector.

Html code: <a class=”shopicon relative”>Shopping</a>


//a[@class=’shopicon relative’]   –> using xpath in firefox

.shopicon.relative   –> using cssSelector in chrome

//a[text()=’Shopping’] –> text() method

2. In the “” website, ways to find NEWS link are:

Using cssSelector:



Using xpath:



Related articles:

Waits in Selenium WebDriver

Leave a Reply

Your email address will not be published. Required fields are marked *