mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[WinAppDriver tests] Affection on user setting files fix (#4186)
This commit is contained in:
@@ -261,6 +261,9 @@ namespace PowerToysTests
|
||||
public static void ClassInitialize(TestContext context)
|
||||
{
|
||||
Setup(context, false);
|
||||
if (session == null)
|
||||
return;
|
||||
|
||||
ResetSettings();
|
||||
|
||||
if (!isPowerToysLaunched)
|
||||
@@ -281,6 +284,9 @@ namespace PowerToysTests
|
||||
[TestInitialize]
|
||||
public void TestInitialize()
|
||||
{
|
||||
if (session == null)
|
||||
return;
|
||||
|
||||
//create canvas zone
|
||||
OpenCreatorWindow("Create new custom", "Custom layout creator");
|
||||
session.FindElementByAccessibilityId("newZoneButton").Click();
|
||||
@@ -289,6 +295,9 @@ namespace PowerToysTests
|
||||
[TestCleanup]
|
||||
public void TestCleanup()
|
||||
{
|
||||
if (session == null)
|
||||
return;
|
||||
|
||||
new Actions(session).MoveToElement(session.FindElementByXPath("//Button[@Name=\"Cancel\"]")).Click().Perform();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user