What is the difference between this:
RemoteWebDriver driver = new FirefoxDriver();
Object result = driver.executeScript("somefunction();");
and this:
RemoteWebDriver driver = new FirefoxDriver();
Selenium seleniumDriver = new WebDriverBackedSelenium(driver, driver.getCurrentUrl());
String result = seleniumDriver.getEval("somefunction();");
I have an example when first command works and second hangs Firefox and other way around. I’d like to understand what is the difference between these two functions.
I think all you want to know is in the Selenium Webdriver Documentation.
Especially the part How Does WebDriver ‘Drive’ the Browser Compared to Selenium-RC ?