Selenium Test Automation With C# For Beginners

19th of January 2017 | Blog,Enterprise Software Development,Software testing

What is selenium?

Selenium is a widely used test automation framework. There are 3 selenium tools; Selenium RC, Selenium IDE and Selenium Webdriver, out of which the Selenium Webdriver is the most commonly used industry tool. Using the Selenium Wedriver the test cases can be automated with C#.

To learn more about selenium, follow the link below:

https://www.seleniumhq.org/docs/01_introducing_selenium.jsp#introducing-selenium

Environment Setup

First, the Visual Studio IDE needs to be installed on to the PC. Next the Selenium Webdriver for C# must be downloaded .

Follow the link below:

https://www.seleniumhq.org/download/

Example

Step 1: Create a new project through Microsoft Visual Studio

Open Visual Studio and go on to the File tab and click on New Project.

Step 2: Add Selenium to the project

Right click on Project Name in Solution, click on Explore and add reference. Then select all DLL files and follow the steps in the image below.

Step 3

Ensure the following code is used for the required resources in the test.

using System;

using System.Text;

using System.Collections.Generic;

using System.Linq;

using OpenQA.Selenium;

using OpenQA.Selenium.Firefox;

using OpenQA.Selenium.Support.UI;

using Microsoft.VisualStudio.TestTools.UnitTesting;

Step 4

The test can then be written inside the test method, and the test can be run. For example, the following test will direct you to the brandixi3 website.

Click here to download our Software Testing brochure for more information

Click here to read more about Brandix i3’s Software Testing and QA Solution

Author: 
Thimali Wijayathilake

Related Posts

From insights to thought-leadership

View More

Boost Infor CloudSuite’s order capturing efficiency with Fortude Customer Order Manager

From placing a customer order to delivering goods, having robust COM processes ensure a strong bottom line, positive impact to the cash flow, and increased customer satisfaction. Customer order placement—the head of the COM process—is a critical step. At this point, the customer service representatives should have the visibility to information such as inventory availability and the agility to complete order placements fast. Inability to ensure information accuracy at this level can cause issues when allocating, picking, and shipping goods. This blog post explains the means through which Fortude Customer Order Manager can streamline the customer order management in your Infor M3 or CloudSuite ERP solutions.

Crossing Boundaries: Journeying from Diversity to Inclusion

According to McKinsey’s May 2020 report, “Diversity Wins,” or in other words, “D&I is a powerful enabler of business performance. Companies whose leaders welcome diverse talent and include multiple perspectives are likely to emerge from the crisis stronger. In short: diversity wins, now more than ever.” Here at Fortude, we continue to make diversity part of our DNA. The mistake that is commonly made across several industries is that organizations leave it up to HR to foster inclusive environments. D&I is not an HR strategy; it’s a strategy that includes everyone – so, in order to be successful, we have to be successful together.

Extend Infor M3/CloudSuite’s EDI capabilities with Fortude EDI

Can your electronic document interchange (EDI) solution do more than just exchanging information? Fortude’s EDI Framework provides interfaces to hold, review, revise, and consolidate EDI transactions before posting them to Infor M3 and CloudSuite.

Infor GO — The Future of Infor Mobility

Mobility is fast becoming the future of ERP. There is a growing need for mobile apps that extends ERP functionality to its business users, allowing them to make informed business decisions on the go.

Bringing information closer to business users with Infor Ming.le

Infor Ming.le is an action-oriented social collaboration platform designed for business organizations. Simply put, Ming.le’s interface will remind you that of the popular social media platform Facebook, except Ming.le serves a unique purpose: bringing information from disparate systems closer to business users, helping them work smarter and faster.

Manage your business documents seamlessly with Infor Document Management (IDM)

Businesses often struggle to keep track and manage high volumes of physical and digital documents that are being created within an ERP system. Most businesses manage these documents manually, separately from the ERP process and business transaction. With this kind of a disjointed process, documents get saved in different systems and users have to switch between applications or spend time manually searching for documents.