Tag: <span>selenium</span>

Selenium versus HP LeanFT

Selenium has carved a niche in the software testing tools world and has a dedicated user base with consistently increasing adoption in the last few years. While this tool was always popular with Open Source enthusiasts since the RC days, we now have increased acceptance in enterprises as well. In the last couple of years, quite a few Fortune 500 companies and banks have diversified their skill-base and tool portfolio with Selenium, in addition to traditional HP toolset. Let’s look at a recent product offering in the market-place, which could be very relevant to the continued growth of Selenium user …

Jenkins and Continuous Test Execution

Continuous test execution is an essential part of automation testing, especially in regression run. If you need to start execution manually means your return on investment is not as good as needed. There are multiple ways to do this. Developers in many companies use Continuous Integration (CI) tool like Hudson, Rational Team Concert for building application multiple times in a day where codes are checked in from multiple locations. You can use the same feature of building application to perform testing as well. You can build your own in-house application to perform the same task. I will give an idea …

How to use WebDriver to handle dropdown or select tag

We can use regular webdriver command to handle most of webelements like check box, text box etc. but to handle dropdown or select element as given below [sourcecode language=”htm”] <select id="sel123"> <option value="my">My</option> <option value="name">Name</option> <option value="is">Is</option> <option value="admin">Admin</option> </select> [/sourcecode] you can use following code. [sourcecode language=”csharp”] IWebElement sTag = driver.FindElement(By.Id("sel123")); OpenQA.Selenium.Support.UI.SelectElement selectTag = new OpenQA.Selenium.Support.UI.SelectElement(sTag); selectTag.SelectByValue("admin"); //Or selectTag.SelectByText("Admin"); //Or selectTag.SelectByIndex(3); [/sourcecode] In case if you want to verify how many options are available in select tag then use following: [sourcecode language=”csharp”] var availableOptions = selectTag.Options; foreach (IWebElement item in availableOptions) { Console.WriteLine(item.Text); } [/sourcecode]