Skip Test Error | Selenium C# Forum
C
Christopher Ugochukwu Anajemba Posted 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
gunjan Replied on 28/04/2019

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


C
Christopher Ugochukwu Anajemba Replied on 29/04/2019

Responsive image

attached above is the code where the error navigates me to


C
Christopher Ugochukwu Anajemba Replied on 29/04/2019

Responsive image

Responsive image

That's the complete code to the linked files. 


C
Christopher Ugochukwu Anajemba Replied on 29/04/2019

The full project is below


G
gunjan Replied on 30/04/2019

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


C
Christopher Ugochukwu Anajemba Replied on 30/04/2019

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


A
Ashish Thakur Replied on 06/05/2019

You can mail us at info@qtpselenium.com


C
Christopher Ugochukwu Anajemba Replied on 09/05/2019

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


S
Support Desk Replied on 15/07/2019

is the issue resolved?