Extension methods for table handling and using certain controls in the table
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using EATestFramework.Driver;
|
||||
using EATestFramework.Extensions;
|
||||
using OpenQA.Selenium;
|
||||
|
||||
namespace EATestProject.Pages
|
||||
@ -6,6 +7,7 @@ namespace EATestProject.Pages
|
||||
public interface IHomePage
|
||||
{
|
||||
void CreateProduct();
|
||||
void PerformClickOnSpecialValue(string name, string operation);
|
||||
}
|
||||
|
||||
public class HomePage : IHomePage
|
||||
@ -18,11 +20,18 @@ namespace EATestProject.Pages
|
||||
|
||||
IWebElement lnkProduct => _driver.FindElement(By.LinkText("Product"));
|
||||
IWebElement lnkCreate => _driver.FindElement(By.LinkText("Create"));
|
||||
IWebElement tblList => _driver.FindElement(By.CssSelector(".table"));
|
||||
|
||||
|
||||
public void CreateProduct()
|
||||
{
|
||||
lnkProduct.Click();
|
||||
lnkCreate.Click();
|
||||
}
|
||||
|
||||
public void PerformClickOnSpecialValue(string name, string operation)
|
||||
{
|
||||
tblList.PerformActionOnCell("5", "Name", name, operation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user