mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
add Session Init in UITestBase.cs
This commit is contained in:
@@ -27,17 +27,20 @@ namespace Microsoft.PowerToys.UITest
|
||||
public UITestBase()
|
||||
{
|
||||
SessionManager.Init();
|
||||
Session = SessionManager.Current;
|
||||
}
|
||||
|
||||
public UITestBase(PowerToysModule scope)
|
||||
{
|
||||
SessionManager.SetScope(scope);
|
||||
SessionManager.Init();
|
||||
Session = SessionManager.Current;
|
||||
}
|
||||
|
||||
~UITestBase()
|
||||
{
|
||||
SessionManager.UnInit();
|
||||
Session = null;
|
||||
}
|
||||
|
||||
public static void Enable_Module_from_Dashboard(string moduleName, PowerToysModuleWindow module = PowerToysModuleWindow.None)
|
||||
|
||||
@@ -20,9 +20,6 @@ namespace UITests_FancyZones
|
||||
public void RunFancyZones()
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
Session = SessionManager.Current;
|
||||
Assert.IsNotNull(Session, "Session is null");
|
||||
|
||||
Session?.FindElementByName<Element>("Launch layout editor").Click();
|
||||
Thread.Sleep(4000);
|
||||
Session = SessionManager.AttachSession(PowerToysModuleWindow.Fancyzone);
|
||||
|
||||
Reference in New Issue
Block a user