Tests updates (#1793)

* updated tests for v0.16.0
Co-Authored-By: Yevhenii Holovachov <55396981+yevhenii44@users.noreply.github.com>
This commit is contained in:
Seraphima Zykova
2020-04-01 17:05:01 +03:00
committed by GitHub
parent b5f2c8b583
commit ea18fa95ad
4 changed files with 816 additions and 789 deletions

View File

@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Windows;
using OpenQA.Selenium.Interactions;
@@ -55,10 +56,12 @@ namespace PowerToysTests
trayButton.Click();
isTrayOpened = true;
WindowsElement pt = session.FindElementByName("PowerToys");
Assert.IsNotNull(pt);
WindowsElement notificationOverflow = session.FindElementByName("Notification Overflow");
AppiumWebElement overflowArea = notificationOverflow.FindElementByName("Overflow Notification Area");
AppiumWebElement powerToys = overflowArea.FindElementByName("PowerToys");
Assert.IsNotNull(powerToys);
new Actions(session).MoveToElement(pt).ContextClick().Perform();
new Actions(session).MoveToElement(powerToys).ContextClick().Perform();
ShortWait();
//exit
@@ -66,10 +69,12 @@ namespace PowerToysTests
ShortWait();
//check PowerToys exited
pt = null;
powerToys = null;
try
{
pt = session.FindElementByName("PowerToys");
notificationOverflow = session.FindElementByName("Notification Overflow");
overflowArea = notificationOverflow.FindElementByName("Overflow Notification Area");
powerToys = overflowArea.FindElementByName("PowerToys");
}
catch (OpenQA.Selenium.WebDriverException)
{
@@ -79,7 +84,7 @@ namespace PowerToysTests
LaunchPowerToys();
ShortWait();
Assert.IsNull(pt);
Assert.IsNull(powerToys);
}
[ClassInitialize]