Is there any built in method to close the app?
Where I am running the tests in Scenario Outline for different user roles, at the end I am trying to use dispose or close and tried quit also. Finally I used to command line Chromedriver kill, where it clears from the task manager, but still chrome browser remains.
Could you please anyone help me.
code snippet for close app:
public static XrmApp CloseApp(BrowserOptions options = null)
{
//trace.Log($"Start ({CrmUrl})");
options = options ?? TestSettings.Options;
SetOptions(options);
_client = new WebClient(options);
_xrmApp = new XrmApp(_client);
_xrmApp.Dispose();
_xrmApp = null;
//_client.Browser.Driver.Close();
_client.Browser.Driver.Quit();
_client.Browser.Dispose();
_client = null;
//trace.Log("Success");
System.Diagnostics.ProcessStartInfo p;
p = new System.Diagnostics.ProcessStartInfo("cmd.exe", "/C " + "taskkill /f /im chromedriver.exe");
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo = p;
proc.Start();
proc.WaitForExit();
proc.Close();
return _xrmApp;
}
Is there any built in method to close the app?
Where I am running the tests in Scenario Outline for different user roles, at the end I am trying to use dispose or close and tried quit also. Finally I used to command line Chromedriver kill, where it clears from the task manager, but still chrome browser remains.
Could you please anyone help me. code snippet for close app: public static XrmApp CloseApp(BrowserOptions options = null) { //trace.Log($"Start ({CrmUrl})"); options = options ?? TestSettings.Options; SetOptions(options);
thanks, Chandra.