druhy pom v LukanPom

This commit is contained in:
Lukáš Kaňka 2023-08-25 07:41:57 +02:00
parent 7ad075bd58
commit 58abc6ebfe
14 changed files with 45 additions and 8 deletions

View File

@ -22,6 +22,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"));

View File

@ -0,0 +1,34 @@
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;
namespace LukanPOM.PageObjects
{
public class HomeTwo
{
private IWebDriver driver;
IWebElement ClickDeclineCookie2 => driver.FindElement(By.XPath("//div[3]/span"));
public HomeTwo(IWebDriver driver)
{
this.driver = driver;
}
public void DeclineCookie2()
{
ClickDeclineCookie2.Click();
}
}
}

View File

@ -9,7 +9,8 @@ namespace LukanPOM.Common
{
internal class TestBase
{
public HomePage home { get; private set; }
protected HomePage Home { get; private set; }
protected HomeTwo HomeTwo { get; private set; }
protected IWebDriver Driver { get; private set; }
@ -20,7 +21,8 @@ namespace LukanPOM.Common
Driver.Manage().Window.Maximize();
Driver.Navigate().GoToUrl("https://lukan.cz");
Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
home = new HomePage(Driver);
Home = new HomePage(Driver);
HomeTwo = new HomeTwo(Driver);
}

View File

@ -28,7 +28,7 @@ namespace LukanPOM.Tests
{
home.AcceptCookie();
Home.AcceptCookie();
}

View File

@ -28,7 +28,7 @@ namespace LukanPOM.Tests
{
home.DeclineCookie();
HomeTwo.DeclineCookie2();
}

View File

@ -26,7 +26,7 @@ namespace LukanPOM.Tests
[Test]
public void TitleVerifiTest()
{
home
Home
.Titulek()
.TestProsel();
}

View File

@ -1 +1 @@
1937693263
2100255613

View File

@ -1 +1 @@
92923a155e21ca4813613c0fdb76c81efc35edc7
4545ca77f2720299ce8f736cc3ec05ba9ee1bf97