You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
////>>>>>>>> This code for 1st application
AppiumOptions desiredCapabilities = new AppiumOptions();
desiredCapabilities.AddAdditionalCapability("app", @"C:\Program Files (x86)\Symtrax\Compleo Hybrid\XMLMapperV6.exe");
CompleoXmlSession = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), desiredCapabilities);
Assert.IsNotNull(CompleoXmlSession);
var currentWindowHandle = CompleoXmlSession.CurrentWindowHandle;
Thread.Sleep(TimeSpan.FromSeconds(15));
var allWindowHandles = CompleoXmlSession.WindowHandles;
CompleoXmlSession.SwitchTo().Window(allWindowHandles[0]);
//////>>>>>> This is for 2nd application
AppiumOptions ao = new AppiumOptions();
ao.AddAdditionalCapability("app", @"C:\Program Files (x86)\Symtrax\Compleo Hybrid\AdminSupervisor.exe");
ao.AddAdditionalCapability("ms:waitForAppLaunch", $"{30}");
ao.AddAdditionalCapability("ms:experimental-webdriver", false);
supervisor = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), ao);
Thread.Sleep(TimeSpan.FromSeconds(10));
//supervisor.Manage().Window.Maximize();
var process = Process.GetProcessesByName("AdminSupervisor").FirstOrDefault();
IntPtr hWnd = FindWindow(null, "Symtrax - Compleo Supervisor");
if (process != null)
{
// Bring the process window to the front
SetForegroundWindow(process.MainWindowHandle);
SetForegroundWindow(hWnd);
//IReadOnlyCollection<string> windowHandles = supervisor.WindowHandles;
supervisor.SwitchTo().Window(supervisor.CurrentWindowHandle);
}
else
{
Console.WriteLine("Process not found.");
}
No description provided.
The text was updated successfully, but these errors were encountered: