Creating getText function for Selenium 2 in C Sharp

As most of you know there is no getText() function in Selenium 2 C#; I have created a function that you can use to get the text associated with a element/xpath. public String getText(String xpath) { String x = driver.FindElement(By.XPath(xpath)).Text; return x; } Here is how I have used the getText() function in my test […]

Using getAttribute in Selenium 2 Webdriver

In this example I will tell you how you can use selenium command getAttribute in Selenium 2 Webdriver. I had to use this as selenium.getAttribute was not working on Webdriver when I was using HtmlUnitDriver. It was working when I was using FirefoxDriver. I had to convert the selenium.getAttribute to make it work on both […]

Using getText in Selenium 2 Webdriver

In this example I will tell you how you can use selenium command getText in Selenium 2 Webdriver. I had to use this as selenium.getText() was not working on Webdriver when I was using HtmlUnitDriver. It was working when I was using FirefoxDriver. I had to convert the selenium.getText() to make it work on both […]