DWQA Ask QuestionCategory: SeleniumCan you please tell me, if Inhertance structure is correct here and how to achieve multiple inhertance
Akash asked 6 years ago

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using selenium_root.core;
namespace selenium_root
{
class UIEvents:LogAndReport
{
public void click(IWebElement obj) { /*Definition Yet to be Written*/}
public void sendKeys(IWebElement obj) { /*Definition Yet to be Written*/}
public void selectList(IWebElement obj) { /*Definition Yet to be Written*/}
public string getText(IWebElement obj) { /*Definition Yet to be Written*/ return “”; }
public void getAttributeValue(IWebElement obj) { /*Definition Yet to be Written*/}
public void rightMouseClick(IWebElement obj,int iX, int iY) { /*Definition Yet to be Written*/}
public void moveMouse(IWebElement obj, int iX, int iY) { /*Definition Yet to be Written*/}
public void dragAndDrop(IWebElement obj, int iX, int iY) { /*Definition Yet to be Written*/}
}
class UIControls:UIEvents
{
}
class UITable : UIControls
{
public string getTableText(IWebElement obj)
{
return getText(obj);
}
public void getTableCellTextInRowAndClm(IWebElement obj, int iRow, int iClm)
{
//code to written
}
public void getTableRowWithCellTextAs(IWebElement obj) { /*Definition Yet to be Written*/ }
public List<IWebElement> getTableCellElementsInRowAndClm(IWebElement objTable,int iRow, int iClm) { return null; }
}
class UIList : UIControls
{
public void selectListByValue(IWebElement obj, string sValue)
{
}
public void selectListByIndex(IWebElement obj, string sValue)
{
//code to written
}
public string getListText(IWebElement obj)
{
return getText(obj);
}
}
class UILink : UIControls
{
public void clickLink(IWebElement obj)
{
click(obj);
}
public void setValueInTextBox(IWebElement obj)
{
sendKeys(obj);
}
}//end class
}//end name space