Skip Test Error | Selenium Webdriver Tutorial with c# |Selenium C# training
10% July Month Discount Avail now

Selenium C# Training Forum

Skip Test Error

C
Christopher Ugochukwu Anajemba Post on 27/04/2019

Whenever I run my test as well as the test from the downloaded code i do get this error once a test is skipped:

Message: Skipping test with RunMode of No
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

 

here is my code on TearDown

 

public class BaseLink
{
    public ExtentReports ExtentReports = ExtentManager.GetReport();
    public Link Link = null;

 

    [TearDown]
    public void Quit()
   {
      if (ExtentReports != null)
      ExtentReports.Flush();
      if (Link != null)
      Link.GetGenericKeywords().CloseBrowser();
   }
}

 

Please, what am I doing wrong?

G

Instructor

gunjan Reply on 28/04/2019

Please share the complete code so that I can have better understanding of it.

C
Christopher Ugochukwu Anajemba Reply on 29/04/2019

attached above is the code where the error navigates me to

C
Christopher Ugochukwu Anajemba Reply on 29/04/2019

That's the complete code to the linked files. 

C
Christopher Ugochukwu Anajemba Reply on 29/04/2019

The full project is below

G

Instructor

gunjan Reply on 30/04/2019

Please share the zip code of the project. The solution is not opening.

C
Christopher Ugochukwu Anajemba Reply on 30/04/2019

couldn't upload it, it keeps bringing error to upload here

S
Support Team Reply on 06/05/2019

You can mail us at info@qtpselenium.com

C
Christopher Ugochukwu Anajemba Reply on 09/05/2019

Hi, I have compressed and emailed it to you. Pls, check your email. thanks 

A

Instructor

Ashish 1 days go

is the issue resolved?