Karthik Deepan
2018-11-28 11:19:00 UTC
Can anyone tell whether taking screenshot using selenium(casting
takesScreenshot type to driver instance) is up casting or down casting?
<https://stackoverflow.com/questions/53493356/can-anyone-tell-whether-taking-screenshot-using-seleniumcasting-takesscreenshot>
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com/");
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("c:\\tmp\\screenshot.png"));
takesScreenshot type to driver instance) is up casting or down casting?
<https://stackoverflow.com/questions/53493356/can-anyone-tell-whether-taking-screenshot-using-seleniumcasting-takesscreenshot>
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com/");
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("c:\\tmp\\screenshot.png"));
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/30991710-70e4-4a01-8484-ca867895a799%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/30991710-70e4-4a01-8484-ca867895a799%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.