I work with c# and selenium nunit I decalred test method and when i want to get the name I get 'AdhocTestMethod'
[TestClass]
public class tryTest : SeleniumTestBase
{
[TestMethod]
public void CreateTaskTest()
{
IWebElement mail = driver.FindElement(By.Name("phoneOrMail"));
mail.SendKeys("Kesher.zipi@gmail.com");
}
}
[TestFixture]
public abstract class SeleniumTestBase
{
[SetUp]
[TestInitialize]
public virtual void TestSetup()
{
if (NUnit.Framework.TestContext.CurrentContext.CurrentRepeatCount == 0)
{
if (reportingManager == null)
reportingManager = new ReportingManager();
string testMethodName = NUnit.Framework.TestContext.CurrentContext.Test.Name;
_reportingTasks = new ReportingTasks(ReportingManager.Instance);
// _reportingTasks.InitializeTest();
}
}
}
I tried to look for solutions in google but i didn't find any solution