Page Objects video 9 4:30 NUnit Visual Studio 2022

This commit is contained in:
Lukáš Kaňka
2023-08-23 19:04:12 +02:00
parent 68f5082d13
commit 962794bdf1
50 changed files with 1843 additions and 6 deletions

View File

@ -0,0 +1,30 @@
using OpenQA.Selenium;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PageObjects.PageObjects
{
public class WebFormPage
{
// locators
IWebElement TextArea => driver.FindElement(By.Name("my-textarea"));
IWebDriver driver;
public WebFormPage(IWebDriver driver)
{
this.driver = driver;
}
// methods
public WebFormPage WriteTextToTextArea(string text)
{
TextArea.SendKeys(text);
return this;
}
}
}