I'm new to this, basically I'm trying to use HtmlUnitDriver, this is my code:
WebDriver driver = new HtmlUnitDriver(); driver.get("http://www.google.com"); System.out.println(driver.getPageSource());
But the source of the page I received is:
<?xml version="1.0" encoding="UTF-8"?> <html> <head/> <body/> </html>
I tried to create a new HtmlUnitDriver (true), but it still does not load Google. I already add the selenium server separately to the class path. Am I doing something wrong? Thanks you
PS: Im using selenium-server-standalone-2.24.1.jar and jre 1.7
source share