Verify Browser Title

package usinghtmlunit;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

public class verifybrowsertitle {

public static void main(String[] args) {

WebDriver driver = new HtmlUnitDriver();

driver.get(“http://facebook.com”);

System.out.println(driver.getTitle());

}

}

Leave a Reply

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