Interview Question: How do you identify objects in Selenium WebDriver?

How do you identify application objects in Selenium WebDriver?

What are the different locators available in Selenium WebDriver?

Interviewer:    Do you know the locating strategies in selenium webdriver?

Candidate:  Yes Sir. I know it. There are different element locators  available in selenium . They are as follows:

driver.findElement(By.className(” “));

driver.findElement(By.cssSelector(” “));

driver.findElement(” “));

driver.findElement(By.linkText(” “));

driver.findElement(” “));




Interviewer:   What is driver in this?

Candidate:  WebDriver driver=new FirefoxDriver();

Be First to Comment

Leave a Reply

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