Selenium WebDriver is used to automate browsers. We can code in Java using Eclipse IDE to automate testing web applications in various browsers.
package org.openqa.selenium.example;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
public class Example {
public static void main(String[] args) {
WebDriver driver = new HtmlUnitDriver();
driver.get(http://www.google.com);
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("Selenium!");
element.submit();
System.out.println("Page title is: " + driver.getTitle());
}
}
}
We can use Qualitia tool to make this automation task easier. It is an application created in java to help with the testing purpose.
Switching from one language to another is cumbersome task, I agree. I myself work in java so all my next coding in selenium on this blog will be in java.
ReplyDeleteAlso do remember that websites behavior may change based on the browser it is being run on. Accordingly we have to make testcases.
XPath is one of the important things to learn in Selenium testing whether it is Selenium IDE, Java, Perl, Ruby etc., So give some time to learn about XPath properly.
The site you mentioned seems good, I have gone through the topics.