Selenium WebDriver - compile HTML string

Viewed 2367

I want to use Selenium WebDriver to compile html String, the only examples i found are for opening files like :

WebDriver driver = new FirefoxDriver();
driver.get("file:///C:/Users/jgong/Desktop/a.html");

I need:

WebDriver driver = new FirefoxDriver();
driver.get(htmlString);

and then use the getPageSource() method, is it possible?

Thanks.

1 Answers
Related