How to get name of the current test/spec/method/scenario etc. in Pytest?

How to get name of the current test/spec/method/scenario etc. in Pytest?

Hello Devan,

To get name of the current test/spec/method/scenario in Pytest, you can refer to sample code snippet below :

{
     driver = new FirefoxDriver();
     driver.Url = test_url;
     driver.Manage().Window.Maximize();
     System.Threading.Thread.Sleep(2000);
}