Skip to content
Amol Dakhane edited this page Mar 2, 2017 · 24 revisions

Welcome to the SampleSeleniumPOMFramework wiki! This framework is designed to kick start automation in any team,using Selenium Webdriver and C# with NUnit 2.6.4. framework I am in process of creating a documentation on how to use this framework.

 ` public static string dateTimeStamp { get; }`

    `public static void AcceptAndCloseAlert();`
    `public static Actions ActionBuilder();`
    `public static void ClearTextIgnoringStaleElementException(IWebElement Element, int numberOfTries = 5);`
    `public static void ClickOnCellTextFromTable(string txtTOBeClicked);`
    `public static void ClickOnElement(By locator);`
    `public static void ClickOnElementIgnoringStaleElementException(IWebElement Element, int numberOfTries = 5);`
    `public static void ClickOnSpecificCellFromTable(By tableIdentifier, int rowIndex, int colIndex);`
    `public static string CloseAlertAndGetItsText();`
    `public static void DragAndDrop(IWebElement sourceElement, IWebElement destinationElement);`
    `public static SelectElement Dropdown(By selectDrpDwnLocator);`
    `public static SelectElement Dropdown(IWebElement element);`
    `public static void EnterText(By locator, string requiredText);`
    `public static void EnterTextIgnoringStaleElementException(IWebElement Element, string text, int numberOfTries = 5);`
    `public static IWebElement FindElement(By locator);`
    `public static List<string> GetAllItemsToStringList(List<IWebElement> allElements, string textFromWhereToTrim = "AmolDakhane");`
    `public static List<string> GetAllItemsToStringListExcludingBlank(By locator, string textFromWhereToTrim = "AmolDakhane");`
    `public static string GetAttributeValue(By locator, string attributeName);`
    `public static List<IWebElement> GetCollection(By locator);`
    `public static List<string> GetCollectionFromPageToStringList(By locator, string textFromWhereToTrim = "AmolDakhane");`
    `public static List<string> GetCollectionFromPageToStringListWit(By locator, string textFromWhereToTrim = "AmolDakhane");`
    `public static List<IWebElement> GetCollectionToList(By locator);`
    `public static int GetIndexOfRowContainingSpecificText(By locatorForRows, string stringToBeSearched);`
    `public static int GetIndexOfTableRowContainingSpecificText(By tableIdentifier, string stringToBeSearched);`
    `public static List<string> GetIwebElementTextToStringList(By locator);`
    `public static int GetNumberOfRowsInTable(IWebElement tableElement);`
    `public static int GetNumberOfRowsInTable(By tableLocator);`
    `public static string GetText(By locator);`
    `public static string GetValueFromSpecificCellFromTable(IWebElement tableIdentifier, int rowIndex, int columnIndex);`
    `public static string GetValueFromSpecificCellFromTable(By tableIdentifier, int rowIndex, int columnIndex);`
    `public static List<string> GetValuesOfColumnFromTable(IWebElement tableIdentifier, string columnName);`
    `public static List<string> GetValuesOfSpecificColumnFromTable(By tableIdentifier, int columnNumber);`
    `public static List<string> GetValuesOfSpecificColumnFromTable(IWebElement tableIdentifier, int columnNumber);`
    `public static void HandleNotNullInnerException(Exception exp);`
    `public static void HandleNullInnerException(Exception exp);`
    `public static void ImplicitWait(int seconds);`
    `public static bool IsAlertPresent();`
    `public static bool IsElementPresent(By by);`
    `public static bool IsElementPresent(IWebElement element);`
    `public static void JsClick(string identifier);`
    `public static IJavaScriptExecutor JsExecutor();`
    `public static void JsScrollTillEnd();`
    `public static void JsScrollToTop();`
    `public static void LoginWithDifferentUser(string siteUrl, string domainName, string userName, string passWord);`
    `public static void ManageFailure(Exception exp);`
    `public static void MoveCursor(int Xcoordinate, int Ycoordinate);`
    `public static void NavigateToURL(string url);`
    `public static void PrintStringList(List<string> listName);`
    `public static void SelectFromDrpDwnIgnoringStaleElementException(IWebElement Element, string option, int numberOfTries = 5);`
    `public static void SelectFromListDropDown(IList<IWebElement> IWebElementsCollection, string itemName);`
    `public static void SelectFromListDrpDwnIgnoringStaleElementException(IList<IWebElement> IWebElementsCollection, string itemName, int numberOfTries = 5);`
    `public static void SetfocusAndClickOnIWebElement(IWebElement element);`
    `public static void SetfocusOnIWebElement(IWebElement element);`
    `public static void Setup();`
    `public static List<string> SplitEachItemInStringCollectionAndAddtoList(List<string> collection, string[] splitByCharacter);`
    `public static void SwitchToDilog();`
    `public static void SwitchToWindow(Expression<Func<IWebDriver, bool>> predicateExp);`
    `public static string TakeScreenshot();`
    `public static void Teardown();`
    `public static WebDriverWait Wait();`
    `public static void WaitForElementIsClickable(By locator, int seconds = 30);`
    `public static void WaitForElementIsClickable(IWebElement element, int seconds = 30);`
    `public static void WaitForElementToGetInVisible(By locator, int seconds = 30);`
    `public static void WaitForElementVisible(By locator, int seconds = 30);`
Clone this wiki locally