Selenium sel = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.com"); sel.windowMaximize();
But how do I do this using WebDriver? The solution is to use a WebDriver instance to create a WebDriverBackedSelenium instance. Here is the code:
WebDriver driver = new FirefoxDriver(); Selenium sel = new WebDriverBackedSelenium(driver, "http://www.google.com"); sel.windowMaximize();
and it is that simple. If I want to use Selenium 2.0 features, I access things via the driver variable. If I want to use Selenium 1.0 features, I access things via the sel variable.
Quite simple.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.