Faced the problem of passing parameters to the test method using the dotnet test console command. I tried to type dotnet test Final.sln - BrowserName = Chrome, but in the test method I couldn't catch the passed value. Maybe someone came across this? Help, please.
I tried like this :
$Set "BrowserName=Chrome" && dotnet test Final.sln
and
$dotnet test Final.sln -- BrowserName:Chrome
Try to cath this value in my code like this :
string executionBrowser=System.Environment.GetEnvironmentVariable("BrowserName");
Aucun commentaire:
Enregistrer un commentaire