public void ClickOnBottomMenu() { IList <IWebElement> list = objBaseTestClass.GetObjdriver().FindElements(bottomMenubar); Console.WriteLine(list.Count); objBaseTestClass.GetObjUtilityClass().wait(2000); foreach (IWebElement element in list) { if (element.Displayed) { if (element.Text.Trim().Equals("Karmallys")) { Console.WriteLine("Karmallys " + element.Text); objBaseTestClass.GetObjUtilityClass().logReporter("Click On Bottom Menu", objBaseTestClass.GetObjWrapperClass().clickOnElement(element)); break; } } } }
public Boolean ClickByJavaScriptExecutor(By locator) { try { objBaseTestClass.GetObjIJavaScriptExecutor().ExecuteScript("arguments[0].click(true)", objBaseTestClass.GetObjdriver().FindElement(locator)); return(true); } catch (Exception exception) { Console.WriteLine("Got Exception : " + exception.Message); return(false); } }