Pom
This commit is contained in:
@ -17,10 +17,13 @@ namespace LukanPOM.PageObjects
|
||||
public class HomePage
|
||||
{
|
||||
private IWebDriver _driver;
|
||||
/*
|
||||
[FindsBy(How = How.XPath, Using = "//div[2]/span")]
|
||||
*/
|
||||
|
||||
[FindsBy(How = How.ClassName, Using = "eu-cookies-bar-tick")]
|
||||
|
||||
private IWebElement _clickcookieaccept;
|
||||
|
||||
[FindsBy(How = How.Id, Using = "menu-item-439")]
|
||||
private IWebElement _clickzasadyochrany;
|
||||
|
||||
public HomePage(IWebDriver driver)
|
||||
{
|
||||
@ -29,7 +32,13 @@ namespace LukanPOM.PageObjects
|
||||
|
||||
public void AcceptCookie()
|
||||
{
|
||||
_clickcookieaccept.FindElement(By.XPath("//div[2]/span")).Click();
|
||||
_clickcookieaccept.Click();
|
||||
|
||||
}
|
||||
public void ZasadyOchrany()
|
||||
{
|
||||
_clickzasadyochrany.Click();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,13 +25,14 @@ namespace LukanPOM.Tests
|
||||
{
|
||||
new DriverManager().SetUpDriver(new ChromeConfig());
|
||||
_driver = new ChromeDriver();
|
||||
_driver.Manage().Window.Maximize();
|
||||
}
|
||||
[Test]
|
||||
public void TestCookie()
|
||||
{
|
||||
HomePage hp = new HomePage(_driver);
|
||||
_driver.Navigate().GoToUrl("https://lukan.cz");
|
||||
hp.AcceptCookie();
|
||||
hp.ZasadyOchrany();
|
||||
|
||||
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
1071702459
|
||||
385966025
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user