Reputation: 57966
I am trying to get the CaptureEntirePageScreenshot
working for IE9. I have read a lot of docs and wikis to get this working but nothing has worked for me so far.
So I thought I would use snapsie directly. So I downloaded the dll and registered it using these instructions. I then used it directly:
selenium.GetEval(js_code + "this.browserbot.getUserWindow().Snapsie.saveSnapshot('C:\\pic\\test.png');");
However, I get the error:
automation server can't create object
Any ideas?
I would appreciate any general help on getting snapsie.js to work. I am using the latest selenium server (2.9.0) on a Windows 7 machine with IE9 and FF4. I am using C#.
Upvotes: 0
Views: 1012
Reputation: 1589
I am not sure why you are using Snapsie, but the most simple way to get an Screenshot from an Internetexplorer is to use the InternetExplorerDriver itself:
IWebDriver driver;
driver = new InternetExplorerDriver();
// change this line if you want to use an different Browser / WebDriver Implementation
//driver = new FirefoxDriver();
driver.Navigate().GoToUrl("http://www.google.com/");
IWebElement query = driver.FindElement(By.Name("q"));
query.SendKeys("Cheese");
// TODO: wait
((ITakesScreenshot)driver).GetScreenshot().SaveAsFile(@"screenIE.png", ImageFormat.Png);
Upvotes: 1