public void HT6Test() { Driver1 = CreateDriver(); NavigateToSite(Driver1); var expectedActorsCount = 7; var JamesSpader = "James Spader"; var Mozhan = "Mozhan Marnò"; var Hisham = "Hisham Tawfiq "; var Megan = "Megan Boone"; var headerPage = new NBCHeader(Driver1); var nbcShows = headerPage .ClickSHows(); Assert.That(nbcShows.IsShowBlockByNameExist(nbcSerialName), Is.True, $"Сериала с именем {nbcSerialName} нет"); var serialPage = nbcShows.ClickOnShowBlockByName(nbcSerialName); serialPage.ClickAddToFavorite().ClosePopUpIfPresent().ClickCast(); Assert.Multiple(() => { Assert.That(() => serialPage.GetActorsCount(), Is.EqualTo(expectedActorsCount).After(30 * 1000, 1 * 1000), "Actors count is not as expected"); Assert.That(serialPage.IsActorPresent(JamesSpader), Is.True, $"Actor {JamesSpader} is not present"); Assert.That(serialPage.IsActorPresent(Mozhan), Is.True, $"Actor {Mozhan} is not present"); Assert.That(serialPage.IsActorPresent(Hisham), Is.True, $"Actor {Hisham} is not present"); }); serialPage.ClickOnActor(Megan).ClickMoreButton(); Assert.That(serialPage.IsLessButtonDisplayed(), Is.True, "Button Less is not present"); }
public void ValidateTabsTest() { NBCHeader headerPage = new NBCHeader(driver); ShowsPage showsPage = headerPage .ClickShowsTab() .ClickCurrentTab() .ClickUpcomingTab() .ClickThrowbackTab() .ClickAllTab(); Assert.That(showsPage.IsShowBlockByNameExist(serialName), Is.True, $"Сериала с именем {serialName} нет"); showsPage.ClickOnShowBlockByName(serialName); }
public void HT6Test() { var expectedActorsCount = 7; var JamesSpader = "James Spader"; var Mozhan = "Mozhan Marnò"; var Hisham = "Hisham Tawfiq "; var Megan = "Megan Boone"; Allure.WrapInStep(() => { NavigateToNBCSite(); }, "Step1: Navigate To NBC Site"); Allure.WrapInStep(() => { var nbcShows = new NBCHeader(driver).ClickShows(); Assert.That(nbcShows.IsShowBlockByNameExist(nbcSerialName), Is.True, $"Сериала с именем {nbcSerialName} нет"); }, "Step2: Check if the series exists"); Allure.WrapInStep(() => { var serialPage = new ShowsPage(driver) .ClickOnShowBlockByName(nbcSerialName) .ClickAddToFavorite() .ClosePopUpIfPresent() .ClickCast(); Assert.Multiple(() => { Assert.That(() => serialPage.GetActorsCount(), Is.EqualTo(expectedActorsCount).After(30 * 1000, 1 * 1000), "Actors count is not as expected"); Assert.That(serialPage.IsActorPresent(JamesSpader), Is.True, $"Actor {JamesSpader} is not present"); Assert.That(serialPage.IsActorPresent(Mozhan), Is.True, $"Actor {Mozhan} is not present"); Assert.That(serialPage.IsActorPresent(Hisham), Is.True, $"Actor {Hisham} is not present"); }); }, "Step3: Check number of actors and name of actors in Cast tab"); Allure.WrapInStep(() => { new SerialPage(driver).ClickOnActor(Megan).ClickMoreButton(); }, "Step4: Click on More button"); Allure.WrapInStep(() => { Assert.That(new SerialPage(driver).IsLessButtonDisplayed(), Is.True, "Button Less is not present"); }, "Step5: Check if the Less button exists"); }
public void HT52Test() { Driver1 = CreateDriver(); NavigateToSite(Driver1); var headerPage = new NBCHeader(Driver1); var nbcShows = headerPage .ClickSHows() .ClickCurrent() .ClickUpcoming() .ClickThrowback() .ClickAll(); Assert.That(nbcShows.IsShowBlockByNameExist(nbcSerialName), Is.True, $"Сериала с именем {nbcSerialName} нет"); nbcShows.ClickOnShowBlockByName(nbcSerialName); }
public void HT52Test() { Driver = CreateDriver(); Allure.WrapInStep(() => {}, "Step 1: Check navigation by tabs on Shows Page "); var nbcShows = new NBCHeader(Driver) .ClickSHows() .ClickCurrent() .ClickUpcoming() .ClickThrowback() .ClickAll(); Allure.WrapInStep(() => {}, $"Step 2: Check Serial '{nbcSerialName}' is displayed on Shows Page"); Assert.That(nbcShows.IsShowBlockByNameExist(nbcSerialName), Is.True, $"Сериала с именем {nbcSerialName} нет"); Allure.WrapInStep(() => {}, $"Step 3: Click on Serial by name: '{nbcSerialName}'"); nbcShows.ClickOnShowBlockByName(nbcSerialName); }
public void HT6Test() { Driver = CreateDriver(); var expectedActorsCount = 7; var JamesSpader = "James Spader"; var Mozhan = "Mozhan Marnò"; var Hisham = "Hisham Tawfiq "; var Megan = "Megan Boone"; var headerPage = new NBCHeader(Driver); var nbcShows = headerPage .ClickSHows(); Allure.WrapInStep(() => { }, $"Step 1: Check Serial '{nbcSerialName}' is displayed on Shows Page"); Assert.That(() => nbcShows.IsShowBlockByNameExist(nbcSerialName), Is.True.After(20 * 1000, 1000), $"Сериала с именем {nbcSerialName} нет"); Allure.WrapInStep(() => { }, $"Step 2: Navigate to Cast page of Serial '{nbcSerialName}'"); var serialPage = nbcShows .ClickOnShowBlockByName(nbcSerialName) .ClickAddToFavorite() .ClosePopUpIfPresent() .ClickCast(); Allure.WrapInStep(() => { }, $"Step 3: Check actors on the Cast page of Serial '{nbcSerialName}'"); Assert.Multiple(() => { Assert.That(() => serialPage.GetActorsCount(), Is.EqualTo(expectedActorsCount).After(30 * 1000, 1 * 1000), "Actors count is not as expected"); Assert.That(serialPage.IsActorPresent(JamesSpader), Is.True.After(30 * 1000, 1 * 1000), $"Actor {JamesSpader} is not present"); Assert.That(serialPage.IsActorPresent(Mozhan), Is.True.After(30 * 1000, 1 * 1000), $"Actor {Mozhan} is not present"); Assert.That(serialPage.IsActorPresent(Hisham), Is.True.After(30 * 1000, 1 * 1000), $"Actor {Hisham} is not present"); }); Allure.WrapInStep(() => { }, $"Step 4: Navigate to page of actor '{Megan}' and click on 'More' button"); serialPage.ClickOnActor(Megan).ClickMoreButton(); Allure.WrapInStep(() => { }, $"Step 5: Check 'Less' button is present"); Assert.That(serialPage.IsLessButtonDisplayed(), Is.True, "Button Less is not present"); }
public void HT52Test() { Allure.WrapInStep(() => { NavigateToNBCSite(); }, "Step1: Navigate To NBC Site"); Allure.WrapInStep(() => { var nbcShows = new NBCHeader(driver) .ClickShows() .ClickCurrent() .ClickUpcoming() .ClickThrowback() .ClickAll(); Assert.That(nbcShows.IsShowBlockByNameExist(nbcSerialName), Is.True, $"Сериала с именем {nbcSerialName} нет"); }, "Step2: Check if the series exists"); Allure.WrapInStep(() => { new ShowsPage(driver).ClickOnShowBlockByName(nbcSerialName); }, "Step3: Open series page"); }