Lukan Pom VSCode
This commit is contained in:
parent
bec7a83b2e
commit
8c14e872ab
@ -21,6 +21,7 @@ namespace LukanPOM.PageObjects
|
||||
|
||||
|
||||
IWebElement ClickAcceptCookie => driver.FindElement(By.XPath("//div[2]/span"));
|
||||
IWebElement ClickDeclineCookie => driver.FindElement(By.XPath("//div[3]/span"));
|
||||
IWebElement ClickZasady => driver.FindElement(By.Id("menu-item-439"));
|
||||
|
||||
|
||||
@ -35,15 +36,28 @@ namespace LukanPOM.PageObjects
|
||||
ClickAcceptCookie.Click();
|
||||
|
||||
}
|
||||
public void DeclineCookie()
|
||||
{
|
||||
ClickDeclineCookie.Click();
|
||||
}
|
||||
public void ZasadyOchrany()
|
||||
{
|
||||
|
||||
ClickZasady.Click();
|
||||
}
|
||||
|
||||
public void TitleTest()
|
||||
public HomePage Titulek()
|
||||
{
|
||||
|
||||
string actualTitle = driver.Title;
|
||||
string expectedTitle = "Lukáš bloguje - Blog o všem možném i nemožném";
|
||||
Assert.AreEqual(expectedTitle, actualTitle);
|
||||
return this;
|
||||
}
|
||||
|
||||
public HomePage TestProsel()
|
||||
{
|
||||
Console.Write("Test prošel");
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,12 +21,14 @@ namespace LukanPOM.Common
|
||||
Driver.Navigate().GoToUrl("https://lukan.cz");
|
||||
Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
|
||||
home = new HomePage(Driver);
|
||||
|
||||
}
|
||||
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
|
||||
Driver.Quit();
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ namespace LukanPOM.Tests
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
41
LukanNUnitProject/LukanPOM/Tests/DeclineCookie.cs
Normal file
41
LukanNUnitProject/LukanPOM/Tests/DeclineCookie.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Remote;
|
||||
using NUnit.Framework;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OpenQA.Selenium.Support.UI;
|
||||
using SeleniumExtras.PageObjects;
|
||||
using System.Net;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using LukanPOM.PageObjects;
|
||||
using LukanPOM.Common;
|
||||
|
||||
namespace LukanPOM.Tests
|
||||
{
|
||||
|
||||
|
||||
//private IWebDriver? _driver;
|
||||
internal class DeclineCookie : TestBase
|
||||
{
|
||||
[Test]
|
||||
public void DeclineCookieTest()
|
||||
{
|
||||
|
||||
|
||||
home.DeclineCookie();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
43
LukanNUnitProject/LukanPOM/Tests/TitlteTest.cs
Normal file
43
LukanNUnitProject/LukanPOM/Tests/TitlteTest.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Remote;
|
||||
using NUnit.Framework;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OpenQA.Selenium.Support.UI;
|
||||
using SeleniumExtras.PageObjects;
|
||||
using System.Net;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using LukanPOM.PageObjects;
|
||||
using LukanPOM.Common;
|
||||
|
||||
namespace LukanPOM.Tests
|
||||
{
|
||||
|
||||
|
||||
//private IWebDriver? _driver;
|
||||
internal class TitleTest : TestBase
|
||||
{
|
||||
[Test]
|
||||
public void TitleVerifiTest()
|
||||
{
|
||||
|
||||
|
||||
home
|
||||
.Titulek()
|
||||
.TestProsel();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
1695163839
|
||||
2038838343
|
@ -1 +1 @@
|
||||
cc6aed74361c6473bdc4ce34a0da9dfb4ecb0290
|
||||
522f0d163e35eed9582db35738b4b15520a680ec
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user