How can I get screenshots from the remotewebdriver

Rifat Erdem Sahin's Avatar

Rifat Erdem Sahin

03 Dec, 2014 03:38 PM

We are using a remote webdriver to simply the acceptance test running environment.

How could we get artifacts from the remotewebdriver even in the case of failure? As we want to debug the acceptance tests easily.

Our code;

using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;

namespace Acceptance_Test.Tools
    public static class Config
        public static TimeSpan WaitSeconds = TimeSpan.FromSeconds(20);
        public static IWebDriver DefaultDriver
                var caps = DesiredCapabilities.Firefox();

                caps.SetCapability("browserstack.debug", "true");
                caps.SetCapability("browserstack.user", "xxxxx");
                caps.SetCapability("browserstack.key", "yyyyyyyyyyyy");

                caps.SetCapability("browser", "Firefox");
                caps.SetCapability("browser_version", "32.0");
                caps.SetCapability("os", "Windows");
                caps.SetCapability("os_version", "8.1");
                caps.SetCapability("resolution", "1024x768");

                IWebDriver driver = new RemoteWebDriver(new Uri(""), caps);
                return driver;

  1. Support Staff 1 Posted by Feodor Fitsner on 03 Dec, 2014 05:25 PM

    Feodor Fitsner's Avatar
  2. 2 Posted by Rifat Erdem Sah... on 04 Dec, 2014 01:44 PM

    Rifat Erdem Sahin's Avatar

    Great resource I will try that.

    But the question remains how can I put those results to the Appveyor artifacts part when the tests fail?*

    * I would like to see why tests fail in Appveyor UI

  3. 3 Posted by Rifat Erdem Sah... on 04 Dec, 2014 04:02 PM

    Rifat Erdem Sahin's Avatar

    it works :)

    This was great news .

    Now when the systems fail we get a nice screenshot in the artifacts and see why it failed.

  4. Rifat Erdem Sahin closed this discussion on 26 Dec, 2014 01:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac