Prior points to consider - Selenium

When working through the following examples we are going to assume that you have instantiated a WebDriver object by doing:

WebDriver driver = new FirefoxDriver()

You can use the following example class with JUnit 4. The test is a stub that we can use through the chapter.

We should also note that finding elements can also be achieved from an element. For example, if we wanted to find the first link after a button called button we would do something like the following:
WebElement element =((FindsById)driver).findElementById("button"); WebElementchildElement = element.findElement(By.tagName("a"));

We will go into what this means in depth as we go through the chapter.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Selenium Topics