{"id":10649,"date":"2017-01-19T06:35:52","date_gmt":"2017-01-19T06:35:52","guid":{"rendered":"https:\/\/fortude1.wpenginepowered.com\/blog\/selenium-test-automation-with-c-for-beginners\/"},"modified":"2026-05-07T05:51:09","modified_gmt":"2026-05-07T04:51:09","slug":"selenium-test-automation-with-c-for-beginners","status":"publish","type":"blog","link":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/","title":{"rendered":"Selenium Test Automation With C# For Beginners"},"content":{"rendered":"<h6> What is selenium? <\/h6>\n<p>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#.<\/p>\n<p>To learn more about selenium, follow the link below:<\/p>\n<p><a href=\"https:\/\/www.seleniumhq.org\/docs\/01_introducing_selenium.jsp%23introducing-selenium\">https:\/\/www.seleniumhq.org\/docs\/01_introducing_selenium.jsp#introducing-selenium<\/a><\/p>\n<h6><strong>Environment Setup <\/strong><\/h6>\n<p>First, the Visual Studio IDE needs to be installed on to the PC. Next the Selenium Webdriver for C# must be downloaded .<\/p>\n<p>Follow the link below:<\/p>\n<p><a href=\"https:\/\/www.seleniumhq.org\/download\/\">https:\/\/www.seleniumhq.org\/download\/<\/a><\/p>\n<p><strong>Example<\/strong><\/p>\n<p><strong>Step 1: Create a new project through Microsoft Visual Studio<\/strong><\/p>\n<p>Open Visual Studio and go on to the File tab and click on New Project.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/fortude.co\/wp-content\/uploads\/2017\/01\/Selenium-1-1024x558-2.png\" alt=\"\" \/><\/p>\n<p><strong>Step 2: Add Selenium to the project<\/strong><\/p>\n<p>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.<\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/fortude.co\/wp-content\/uploads\/2023\/05\/Selenium-2.png\" alt=\"\" \/><\/p>\n<p>Ensure the following code is used for the required resources in the test.<\/p>\n<p>using System;<\/p>\n<p>using System.Text;<\/p>\n<p>using System.Collections.Generic;<\/p>\n<p>using System.Linq;<\/p>\n<p>using OpenQA.Selenium;<\/p>\n<p>using OpenQA.Selenium.Firefox;<\/p>\n<p>using OpenQA.Selenium.Support.UI;<\/p>\n<p>using Microsoft.VisualStudio.TestTools.UnitTesting;<\/p>\n<p><strong>Step 4<\/strong><\/p>\n<p>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.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/fortude.co\/wp-content\/uploads\/2023\/04\/Selenium-3-300x261-1.png\" alt=\"\" \/><\/p>\n<p>Click here to download our Software Testing brochure for more information<\/p>\n<p>Click <a href=\"https:\/\/fortude.wpenginepowered.com\/\" target=\"_blank\" rel=\"noopener\">here<\/a> to read more about Brandix i3\u2019s Software Testing and QA Solution<\/p>\n<p><em>Author: <\/em><br \/><strong>Thimali Wijayathilake<\/strong><\/p>\n","protected":false},"featured_media":14387,"template":"","meta":{"_acf_changed":false,"content-type":""},"industry":[],"service":[69,68],"class_list":["post-10649","blog","type-blog","status-publish","has-post-thumbnail","hentry"],"acf":{"blog_render_type":"legacy_acf","sections":[{"section_title":"What is selenium?","section_content":"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#.\n\nTo learn more about selenium, follow the link below:\n\n<a href=\"https:\/\/www.seleniumhq.org\/docs\/01_introducing_selenium.jsp%23introducing-selenium\">https:\/\/www.seleniumhq.org\/docs\/01_introducing_selenium.jsp#introducing-selenium<\/a>","section_image":"","table_rows":null,"pro-tip":""},{"section_title":"Environment Setup","section_content":"<p>First, the Visual Studio IDE needs to be installed on to the PC. Next the Selenium Webdriver for C# must be downloaded .<\/p><p>Follow the link below:<\/p><p><a href=\"https:\/\/www.seleniumhq.org\/download\/\">https:\/\/www.seleniumhq.org\/download\/<\/a><\/p><p><strong>Example<\/strong><\/p><p><strong>Step 1: Create a new project through Microsoft Visual Studio<\/strong><\/p><p>Open Visual Studio and go on to the File tab and click on New Project.<\/p><p><strong>Step 2: Add Selenium to the project<\/strong><\/p><p>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.<\/p><p><strong>Step 3<\/strong><\/p><img src=\"https:\/\/fortude.co\/wp-content\/uploads\/2023\/05\/Selenium-2.png\" alt=\"\" \/><p>Ensure the following code is used for the required resources in the test.<\/p><p>using System;<\/p><p>using System.Text;<\/p><p>using System.Collections.Generic;<\/p><p>using System.Linq;<\/p><p>using OpenQA.Selenium;<\/p><p>using OpenQA.Selenium.Firefox;<\/p><p>using OpenQA.Selenium.Support.UI;<\/p><p>using Microsoft.VisualStudio.TestTools.UnitTesting;<\/p><p><strong>Step 4<\/strong><\/p><p>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.<\/p><img src=\"https:\/\/fortude.co\/wp-content\/uploads\/2023\/04\/Selenium-3-300x261-1.png\" alt=\"\" \/><p>Click here to download our Software Testing brochure for more information<\/p><p>Click <a href=\"https:\/\/fortude.wpenginepowered.com\/\" target=\"_blank\" rel=\"noopener\">here<\/a> to read more about Brandix i3\u2019s Software Testing and QA Solution<\/p><p><em>Author: <\/em><br \/><strong>Thimali Wijayathilake<\/strong><\/p>","section_image":14211,"table_rows":null,"pro-tip":""}],"bottom_sections":null},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.7 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Selenium Test Automation With C# For Beginners | Fortude<\/title>\n<meta name=\"description\" content=\"Explore Selenium test automation using C#. Learn about Selenium Webdriver, environment setup, and more for beginners in software testing.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Selenium Test Automation With C# For Beginners\" \/>\n<meta property=\"og:description\" content=\"Explore Selenium test automation using C#. Learn about Selenium Webdriver, environment setup, and more for beginners in software testing.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Fortude\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-07T04:51:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/fortude.co\/wp-content\/uploads\/2017\/01\/i3-labs-logo-1.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/\",\"url\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/\",\"name\":\"Selenium Test Automation With C# For Beginners | Fortude\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fortude.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fortude.co\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/i3-labs-logo-1.jpg\",\"datePublished\":\"2017-01-19T06:35:52+00:00\",\"dateModified\":\"2026-05-07T04:51:09+00:00\",\"description\":\"Explore Selenium test automation using C#. Learn about Selenium Webdriver, environment setup, and more for beginners in software testing.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fortude.co\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/i3-labs-logo-1.jpg\",\"contentUrl\":\"https:\\\/\\\/fortude.co\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/i3-labs-logo-1.jpg\",\"width\":1250,\"height\":729},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fortude.co\\\/blog\\\/selenium-test-automation-with-c-for-beginners\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fortude.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Selenium Test Automation With C# For Beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fortude.co\\\/#website\",\"url\":\"https:\\\/\\\/fortude.co\\\/\",\"name\":\"Fortude\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/fortude.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fortude.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fortude.co\\\/#organization\",\"name\":\"Fortude\",\"url\":\"https:\\\/\\\/fortude.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/fortude.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fortude.co\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/Fortude-Logo.svg\",\"contentUrl\":\"https:\\\/\\\/fortude.co\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/Fortude-Logo.svg\",\"width\":100,\"height\":15,\"caption\":\"Fortude\"},\"image\":{\"@id\":\"https:\\\/\\\/fortude.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Selenium Test Automation With C# For Beginners | Fortude","description":"Explore Selenium test automation using C#. Learn about Selenium Webdriver, environment setup, and more for beginners in software testing.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/","og_locale":"en_GB","og_type":"article","og_title":"Selenium Test Automation With C# For Beginners","og_description":"Explore Selenium test automation using C#. Learn about Selenium Webdriver, environment setup, and more for beginners in software testing.","og_url":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/","og_site_name":"Fortude","article_modified_time":"2026-05-07T04:51:09+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/fortude.co\/wp-content\/uploads\/2017\/01\/i3-labs-logo-1.jpg","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/","url":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/","name":"Selenium Test Automation With C# For Beginners | Fortude","isPartOf":{"@id":"https:\/\/fortude.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/fortude.co\/wp-content\/uploads\/2017\/01\/i3-labs-logo-1.jpg","datePublished":"2017-01-19T06:35:52+00:00","dateModified":"2026-05-07T04:51:09+00:00","description":"Explore Selenium test automation using C#. Learn about Selenium Webdriver, environment setup, and more for beginners in software testing.","breadcrumb":{"@id":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/#primaryimage","url":"https:\/\/fortude.co\/wp-content\/uploads\/2017\/01\/i3-labs-logo-1.jpg","contentUrl":"https:\/\/fortude.co\/wp-content\/uploads\/2017\/01\/i3-labs-logo-1.jpg","width":1250,"height":729},{"@type":"BreadcrumbList","@id":"https:\/\/fortude.co\/blog\/selenium-test-automation-with-c-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fortude.co\/"},{"@type":"ListItem","position":2,"name":"Selenium Test Automation With C# For Beginners"}]},{"@type":"WebSite","@id":"https:\/\/fortude.co\/#website","url":"https:\/\/fortude.co\/","name":"Fortude","description":"","publisher":{"@id":"https:\/\/fortude.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fortude.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/fortude.co\/#organization","name":"Fortude","url":"https:\/\/fortude.co\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/fortude.co\/#\/schema\/logo\/image\/","url":"https:\/\/fortude.co\/wp-content\/uploads\/2026\/02\/Fortude-Logo.svg","contentUrl":"https:\/\/fortude.co\/wp-content\/uploads\/2026\/02\/Fortude-Logo.svg","width":100,"height":15,"caption":"Fortude"},"image":{"@id":"https:\/\/fortude.co\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/blog\/10649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/types\/blog"}],"version-history":[{"count":0,"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/blog\/10649\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/media\/14387"}],"wp:attachment":[{"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/media?parent=10649"}],"wp:term":[{"taxonomy":"industry","embeddable":true,"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/industry?post=10649"},{"taxonomy":"service","embeddable":true,"href":"https:\/\/fortude.co\/wp-json\/wp\/v2\/service?post=10649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}