WebDriver driver = new RemoteWebDriver(new URL(remoteUrl), desiredCapabilities);
WebDriver augmentedDriver = new Augmenter().augment(driver);
File screenshot = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE);
When I try to cast it to I get: java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebDriver cannot be cast to org.openqa.selenium.TakesScreenshot
When I print the driver class name I get RemoteWebDriver although it was declared as WebDriver.
What am I missing?
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4c4764ca-4a3b-46e2-a82e-5f08e8ab0a2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
RemoteWebDriver does implement TakesScreenshot for a long time that I can remember. So can you please try accessing getScreenshotAs() directly via the RemoteWebDriver instance ?
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/My Technical Scribbings @ http://rationaleemotions.wordpress.com/
On Tue, Feb 14, 2017 at 12:46 PM, Zvi Fried <zvik...@gmail.com> wrote:
I'm trying to take a screenshot with RemoteWebDriver of Winium.Desktop. As RemoteWebDriver does not implement TakesScreenshot I declared the object as WebDriver.
WebDriver driver = new RemoteWebDriver(new URL(remoteUrl), desiredCapabilities);
WebDriver augmentedDriver = new Augmenter().augment(driver);
File screenshot = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE);When I try to cast it to I get: java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebDriver cannot be cast to org.openqa.selenium.TakesScreenshot
When I print the driver class name I get RemoteWebDriver although it was declared as WebDriver.
What am I missing?
--
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-user...@googlegroups.com.
RemoteWebDriver does implement TakesScreenshot for a long time that I can remember. So can you please try accessing getScreenshotAs() directly via the RemoteWebDriver instance ?
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/My Technical Scribbings @ http://rationaleemotions.wordpress.com/
On Tue, Feb 14, 2017 at 12:46 PM, Zvi Fried <zvik...@gmail.com> wrote:
I'm trying to take a screenshot with RemoteWebDriver of Winium.Desktop. As RemoteWebDriver does not implement TakesScreenshot I declared the object as WebDriver.
WebDriver driver = new RemoteWebDriver(new URL(remoteUrl), desiredCapabilities);
WebDriver augmentedDriver = new Augmenter().augment(driver);
File screenshot = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE);When I try to cast it to I get: java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebDriver cannot be cast to org.openqa.selenium.TakesScreenshot
When I print the driver class name I get RemoteWebDriver although it was declared as WebDriver.
What am I missing?
--
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-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c8ecc109-275c-45a3-932b-364cd2d3d694%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
File screenShot = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE)