public void DataStoringBetweenLaunchesTest() { var locationName = "New York"; var itemsPage = new ItemsPage(DriverInstance); Assert.IsTrue(itemsPage.IsOppened()); var selectedItemName = itemsPage.ClickAddLocationButton() .SetValueToSearch(locationName).ClickSearchButton() .SelectFirstLocationNameItem(); Assert.IsTrue(itemsPage.IsOppened()); var resultList = itemsPage.WaitForValueAddedInList(selectedItemName, 5).GetLocationsList(); Assert.IsTrue(resultList.Contains(selectedItemName)); DriverInstance.CloseApp(); DriverInstance.Quit(); SetupSession(); var reloadedItemsPage = new ItemsPage(DriverInstance); Assert.IsTrue(reloadedItemsPage.IsOppened()); resultList = reloadedItemsPage.WaitForValueAddedInList(selectedItemName, 5).GetLocationsList(); Assert.IsTrue(resultList.Contains(selectedItemName)); reloadedItemsPage.SelectLocationInList(selectedItemName).ClickDeleteLocationButton(); }
public void AddAndDeleteLoactionTest() { var cityName = "New York"; var itemsPage = new ItemsPage(DriverInstance); Assert.IsTrue(itemsPage.IsOppened()); var selectedItemName = itemsPage.ClickAddLocationButton() .SetValueToSearch(cityName).ClickSearchButton() .SelectFirstLocationNameItem(); Assert.IsTrue(itemsPage.IsOppened()); var resultList = itemsPage.WaitForValueAddedInList(selectedItemName, 5).GetLocationsList(); Assert.IsTrue(resultList.Contains(selectedItemName)); itemsPage.SelectLocationInList(selectedItemName).ClickDeleteLocationButton(); resultList = itemsPage.GetLocationsList(); Assert.IsFalse(resultList.Contains(selectedItemName)); }
public void SearchLoactionByLocationNameTest() { var cityName = "New York"; var itemsPage = new ItemsPage(DriverInstance); Assert.IsTrue(itemsPage.IsOppened()); var firstItem = itemsPage.ClickAddLocationButton() .SetValueToSearch(cityName).ClickSearchButton() .GetSearchResultLocationNames().First(); Assert.AreEqual(cityName, firstItem); }
public void SearchLoactionByPostalCodeTest() { var postalCode = "16801"; var itemsPage = new ItemsPage(DriverInstance); Assert.IsTrue(itemsPage.IsOppened()); var firstItem = itemsPage.ClickAddLocationButton() .SetValueToSearch(postalCode).ClickSearchButton() .GetSearchResultPostalCodes().First(); Assert.AreEqual(postalCode, firstItem); }