In this section we are going to look at using the find Element call that is on the WebDriver object. This is how we can normally find elements using Selenium WebDriver.
Open your Java IDE. Intellij or Eclipse are the most used that you could use.
We are going to use the command:driver.get("http://book.theautomatedtester.co.uk") driver.findElement(By.linkText("Chapter1"));
Run your test.
What just happened?
We have just seen that we can find an element by passing in the By object. This is a static class that gives people a mechanism for finding elements, as we did earlier in the chapter. This will throw a No Such Element Exception if it cannot find the element.
Let's now have a look at finding multiple elements.
Selenium Related Interview Questions
|SILK TEST Interview Questions||QTP Interview Questions|
|JMeter Interview Questions||Automation Testing Interview Questions|
|Software testing Interview Questions||JUnit Interview Questions|
|TestNG Interview Questions||SAP Testing Interview Questions|
|Selenium WebDriver Interview Questions||Selenium IDE Interview Questions|
|QUnit Testing Interview Questions||Performance Testing Interview Questions|
|Hadoop Testing Interview Questions|
Getting Started With Selenium Ide
Overview Of Selenium Webdriver
Working With Webdriver
Getting Started With Selenium Grid
Advanced User Interactions
Working With Html5
Migrating From Remote Control To Webdriver
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.