I am trying to take a screen shot that shows the contents of a drop down list with selenium webdriver on a selenium grid in C# on firefox with the 2.35 version of Selenium Webdriver. I am able to take the screenshot but the drop down list is not shown in expanded state despite it showing that way on screen.
Is it possible to take screenshots of the dropdown contents ?
To take the screen shot I am using
Webdriver.GetScreenshot().SaveAsFile(fileName, ImageFormat.Png);
along with the following
public class ScreenShotRemoteWebDriver : RemoteWebDriver, IScreenshotEnabledWebDriver
{
public ScreenShotRemoteWebDriver(Uri remoteAdress, ICapabilities capabilities)
: base(remoteAdress, capabilities)
{
}
public Screenshot GetScreenshot()
{
// Get the screenshot as base64.
var screenshotResponse = Execute(DriverCommand.Screenshot, null);
var base64 = screenshotResponse.Value.ToString();
// ... and convert it.
return new Screenshot(base64);
}
}
Thanks
Andy