public FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile) {
super(new LazyCommandExecutor(binary, profile), DesiredCapabilities.firefox());
this.binary = binary;
this.profile = profile;
setElementConverter(new JsonToWebElementConverter(this) {
@Override
protected RemoteWebElement newRemoteWebElement() {
return new FirefoxWebElement(FirefoxDriver.this);
}
});