How can I get screenshots from the remotewebdriver
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
{
get
{
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("http://hub.browserstack.com/wd/hub/"), caps);
return driver;
}
}
}
}
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Feodor Fitsner on 03 Dec, 2014 05:25 PM
Found that: http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#taking-a-...
2 Posted by Rifat Erdem Sah... on 04 Dec, 2014 01:44 PM
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 Posted by Rifat Erdem Sah... on 04 Dec, 2014 04:02 PM
it works :)
This was great news .
Now when the systems fail we get a nice screenshot in the artifacts and see why it failed.
Rifat Erdem Sahin closed this discussion on 26 Dec, 2014 01:34 PM.