druhy pom v LukanPom
This commit is contained in:
@ -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"));
|
||||
|
||||
|
||||
@ -36,7 +37,7 @@ namespace LukanPOM.PageObjects
|
||||
ClickAcceptCookie.Click();
|
||||
|
||||
}
|
||||
public void DeclineCookie()
|
||||
public void DeclineCookie()
|
||||
{
|
||||
ClickDeclineCookie.Click();
|
||||
}
|
||||
|
34
LukanNUnitProject/LukanPOM/Source/Pages/HomeTwo.cs
Normal file
34
LukanNUnitProject/LukanPOM/Source/Pages/HomeTwo.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user