Forum Discussion

Yannick_FRINDEL's avatar
Yannick_FRINDEL
Copper Contributor
Jul 28, 2022

Create (in C#) steps with screenshots for a test case in Azure DevOps

In Azure DevOps I can create in C# the test cases with the steps, but I don't know how to integrate directly the screenshots in the fields.

By chance, do you know how to insert (with a C# code) directly the screenshot in the "Action" field or the "expected result" field of the steps ?

Like this for example : 

I tried with a code like this, but it doesn't work :

ITestStep newStep = testCase.CreateTestStep();
newStep.ExpectedResult = @"<p><img src='data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...=' alt/></p>";
testCase.Actions.Add(newStep);

Thanks for your help... 

No RepliesBe the first to reply

Resources