druhy pom v LukanPom
This commit is contained in:
parent
7ad075bd58
commit
58abc6ebfe
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace LukanPOM.Tests
|
||||
{
|
||||
|
||||
|
||||
home.AcceptCookie();
|
||||
Home.AcceptCookie();
|
||||
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace LukanPOM.Tests
|
||||
{
|
||||
|
||||
|
||||
home.DeclineCookie();
|
||||
HomeTwo.DeclineCookie2();
|
||||
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace LukanPOM.Tests
|
||||
[Test]
|
||||
public void TitleVerifiTest()
|
||||
{
|
||||
home
|
||||
Home
|
||||
.Titulek()
|
||||
.TestProsel();
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
1937693263
|
||||
2100255613
|
@ -1 +1 @@
|
||||
92923a155e21ca4813613c0fdb76c81efc35edc7
|
||||
4545ca77f2720299ce8f736cc3ec05ba9ee1bf97
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user