{{announcement.body}}
{{announcement.title}}

Top 28 Selenium WebDriver Commands in NUnit For Test Automation

DZone 's Guide to

Top 28 Selenium WebDriver Commands in NUnit For Test Automation

In this NUnit tutorial, I’ll take deep dive into various Selenium WebDriver Commands for web browsers, browser elements and drop down.

· Performance Zone ·
Free Resource

Selenium Framework interacts with the web browser via the Selenium WebDriver. It does so with the help of certain commands to automate browser actions such as open, close, or maximize the browser window. Also, you can handle different web elements or drop down elements browser to perform Selenium test automation.

Different programming languages such as Python, Java, C#, etc uses an interface to interact with the browser. In this Nunit tutorial, I’ll be exploring Selenium commands for NUnit, which is a Selenium test automation framework for C#, the interface used through which the browser is controlled is the IWebDriver.

In this NUnit tutorial on Selenium WebDriver Commands in NUnit, I’ll take deep dive into various Selenium WebDriver Commands for web browsers, browser elements, and drop down. In case you’re not familiar with ‘what is Selenium?’, you can refer to our detailed page on the topic.

What Are Selenium WebDriver Commands?

Selenium Webdriver commands are the methods used to run your Selenium test automation scripts. You can use these browser commands to automate different browser actions to perform testing.

Selenium WebDriver commands in NUnit are divided into three different categories on the basis of different kinds of browser interactions. The commands are categorized based on the type of interaction and the element/application on which action is being performed. Automated browser testing involves the following Selenium commands:

  1. Web Browser Commands – Performs actions on the web browser (e.g. open, close, maximize, etc.)

  2. Web Element Commands – Performs actions on the web elements in the current window (e.g. checking a button, entering text in a textbox, clicking a button, etc.)

  3. Drop Down Commands – Performs actions on the drop-down elements in the current window (e.g. selecting or deselecting a value from drop-down window).

Web Browser Commands

When C# is used along with the Selenium testing framework, the IWebDriver interface is used to perform actions on the web browser. To access the methods of the IWebDriver interface, an instance/driver object from IWebDriver should be created. The complete list of methods for iWebDriver comes up as soon as you press the dot key.

webdriver

Below are the Selenium WebDriver Commands in Nunit for handling browsers:

1. URL

Using this Selenium Webdriver command you can Get or Set the URL/web page that needs to be displayed.

Syntax:

C#
 




x


1
string IWebDriver.Url { get; set;}



Example:

C#
 




xxxxxxxxxx
1
15
9


 
1
 /* Selenium Webdriver command for URL*/
2
String URL;
3
driver = new ChromeDriver();
4
/* Set Operation */
5
driver.Url = "https://www.lambdatest.com";
6
/* Get Operation */
7
URL = driver.Url;
8
 
          



2. Title

This Selenium webdriver command gets the title of the current browser window.

Syntax:

C#
 




xxxxxxxxxx
1


 
1
string IWebDriver.Title{get;}



Example

C#
 




xxxxxxxxxx
1


 
1
 /* Selenium Webdriver command for getting title */
2
String page_title;
3
driver = new ChromeDriver();
4
driver.Url = "https://www.lambdatest.com";
5
page_title = driver.Title;
6
 
          



3. PageSource

You can get the source of the page that is loaded by the web browser with this Selenium Webdriver command.

Syntax:

C#
 




xxxxxxxxxx
1


1
string IWebDriver.PageSource{get;}



Example

C#
 




xxxxxxxxxx
1


 
1
 
2
/* Selenium Webdriver command for getting page source*/
3
String page_source;
4
driver = new ChromeDriver();
5
driver.Url = "https://www.lambdatest.com";
6
page_source = driver.PageSource;
7
 
          



4. Quit

You can quit the driver and close every browser window associated with this Selenium Webdriver command in NUnit.

Syntax:

C#
 




xxxxxxxxxx
1


1
void IWebDriver.Quit()



Example

C#
 




xxxxxxxxxx
1


 
1
 /* Selenium Webdriver command for URL*/
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* Sleep for 4 seconds after page is displayed */
5
System.Threading.Thread.Sleep(4000);
6
/* Quit the window for this NUnit tutorial*/
7
driver.Quit();
8
 
          



5. Close

With close() Selenium Webdriver command, you can close the current window, quit the browser in case if it is the last window open. In case you want more detailed information on how to handle browser windows, you can refer to our blog.

Syntax:

C#
 




xxxxxxxxxx
1


1
void IWebDriver.Close()



Example

C#
 




xxxxxxxxxx
1


 
1
 /* Selenium Webdriver command for Closing window*/
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
driver.Close();
5
 
          



6. Navigate

With this Selenium WebDriver command in NUnit you can navigate the browser to another location i.e. Refresh the current window/Go Back to the previous window/Go to the next page as per browsing history/Go to a particular URL.

navigate

Syntax:

C#
 




xxxxxxxxxx
1


 
1
INavigation IWebDriver.Navigate()



Shown below are the different options available with the Navigate() command:

Back()

Move back a single entry as per the browser’s history.

Syntax:

C#
 




xxxxxxxxxx
1


1
void INavigation.Back()



Example:

C#
 




xxxxxxxxxx
1


 
1
driver.Navigate().Back();



Forward()

Move a single item forward as per the browser’s history

Syntax:

void INavigation.Forward()

Example:

driver.Navigate().Forward();

GoToUrl()

Navigate to a particular URL which is passed as a parameter to the Navigate() command

Syntax:

C#
 




xxxxxxxxxx
1


1
void INavigation.GoToUrl(string url)



Example:

C#
 




xxxxxxxxxx
1


 
1
driver.Navigate().GoToUrl("https://www.lambdatest.com")
2
  



Refresh()

Refresh the current browser window

Syntax:

C#
 




xxxxxxxxxx
1


1
void INavigation.Refresh()



Example:

C#
 




xxxxxxxxxx
1


1
driver.Navigate().Refresh();



Web Element Commands

While performing Selenium Test automation with NUnit you’ll often have to rely on Selenium Webdriver command to perform operations on web elements (e.g. textboxes, radio buttons, hyperlinks, etc.) on a page, that are triggered via the IWebElement interface.

OpenQA

To find the details of a web element e.g. XPath, outerHTML, etc.; you can make use of the Inspect Tool available in web browsers like Chrome, Firefox, etc. Once the web element is located, you can perform the corresponding operation on that element. To know more about how to access web elements, you can refer to our detailed article on Selenium locators.

lambdatest

Shown below in this Nunit tutorial is the Selenium Webdriver command for web elements.

[Note – For demonstrating the usage of the web element commands, we have used the test URL as https://www.lambdatest.com]

1. Click

Using the Click() Selenium Webdriver command, you can click on a particular web element present on the web page. The Click operation can be performed on hyperlinks, buttons, checkboxes, or any other element that is clickable on the page. The element is first located on the page, after which the Click operation is performed.

Syntax:

C#
 




xxxxxxxxxx
1


 
1
void IWebElement.Click()



Example:

C#
 




xxxxxxxxxx
1


 
1
 
2
/*Selenium Webdriver command for click*/
3
driver = new ChromeDriver();
4
driver.Url = "https://www.lambdatest.com";
5
/* The Xpath of the Login Button on LambdaTest homepage */
6
IWebElement web_element = driver.FindElement(By.XPath("//*[@id="navbarSupportedContent"]/ul/li[6]/a"));
7
web_element.Click();
8
 
          



2. Enabled

You can check whether a particular web element is enabled or not with the Enabled Selenium Webdriver command. It returns True if the web element on the page is enabled else it returns False.

Syntax:

C#
 




xxxxxxxxxx
1


 
1
Bool IWebElement.Enabled{get;}



Example:

C#
 




xxxxxxxxxx
1


 
1
 
2
/*Selenium Webdriver command to check whether a particular web element is enabled */
3
driver = new ChromeDriver();
4
driver.Url = "https://www.lambdatest.com";
5
/* The Xpath of the Login Button on LambdaTest homepage */
6
IWebElement web_element = driver.FindElement(By.XPath("//*[@id="navbarSupportedContent"]/ul/li[6]/a"));
7
Boolean element_enabled = web_element.Enabled;
8
 
          



3. Displayed

This Selenium Webdriver command checks whether a particular web element is displayed or not. It returns True if the web element on the page is displayed else it returns False.

Syntax:

C#
 




xxxxxxxxxx
1


1
Bool IWebElement.Displayed{get;}



Example:

C#
 




xxxxxxxxxx
1


1
 /*Selenium Webdriver command to check whether a particular web element is displayed */
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* The Xpath of the Login Button on LambdaTest homepage */
5
IWebElement web_element = driver.FindElement(By.XPath("//*[@id="navbarSupportedContent"]/ul/li[6]/a"));
6
Boolean element_enabled = web_element.Displayed;
7
 
          



4. Clear

The Clear() Selenium WebDriver command clears the content in the web element present on the page. It is used for clearing the pre-loaded contents in a text box.

Syntax:

C#
 




xxxxxxxxxx
1


1
void IWebElement.Clear()



Example:

C#
 




xxxxxxxxxx
1


 
1
 
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* The Xpath of the Email address text box on LambdaTest homepage */
5
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='useremail']");
6
web_element.Clear();
7
 
          



5. SendKeys

This Selenium Webdriver command Inputs the values in an element like a textbox on the web page.

Syntax:

C#
 




xxxxxxxxxx
1


1
void IWebElement.SendKeys(string text)



Example:

C#
 




xxxxxxxxxx
1


1
 
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* The Xpath of the Email address text box on LambdaTest homepage */
5
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='useremail']");
6
web_element.SendKeys("test@email.com");
7
 
          



6. GetAttribute

There may be attributes and properties associated with web elements present on a web page. These are added by the website developer. WIth GetAttribute you get the value of a certain attribute as a string of the webelement.

Syntax:

C#
 




xxxxxxxxxx
1


1
string IWebElement.GetAttribute(string attributename)



Example:

C#
 




xxxxxxxxxx
1


1
 driver = new ChromeDriver();
2
driver.Url = "https://www.lambdatest.com";
3
/* The Xpath of the Email address text box on LambdaTest homepage */
4
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='navbarSupportedContent']/ul/li[6]/a"));
5
String titleValue = web_element.GetAttribute("class");
6
 
          



7. GetCssValue

Gets the value of a CSS property of a web element present on the web page. Color values are returned in the form of rgba string. For example, a “background-color” property set as “green” in the HTML source, will return “#008000” for its value.

Syntax:

C#
 




xxxxxxxxxx
1


1
string IWebElement.GetCssValue(string propertyname)



Example:

C#
 




xxxxxxxxxx
1


 
1
 
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* The Xpath of the Login Button on LambdaTest homepage */
5
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='navbarSupportedContent']/ul/li[6]/a"));
6
/* returns #000000 */
7
String cssvalue = web_element.GetCssValue("background-color");
8
 
          



To get the background color of the ‘Login’ button on LambdaTest homepage, we check the properties associated with the element using Inspect Tool.

lambdatest

As seen in the snapshot, background-color is the property associated with the Login button. The same is used with GetCssValue().

8. Submit

Performs a click on a button which is of the type submit.

Syntax:

C#
 




xxxxxxxxxx
1


1
void IWebElement.Submit()



Example:

C#
 




xxxxxxxxxx
1


1
 driver = new ChromeDriver();
2
driver.Url = "https://accounts.lambdatest.com/login";
3
/* The Xpath of the Login Button on which is of the type submit */
4
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='app']/section/form/div/div/button"));
5
web_element.Submit();



9. Text

Gets the innerText of a web element, without any leading or trailing whitespace & other whitespaces collapsed.

Syntax:

C#
 




xxxxxxxxxx
1


1
string IWebElement.Text{get;}



Example:

C#
 




xxxxxxxxxx
1


1
 
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* The Xpath of the Login Button on LambdaTest homepage */
5
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='navbarSupportedContent']/ul/li[6]/a"));
6
String text_value = web_element.Text;
7
 
          



10. TagName

Gets the tag name of a web element on the web page.

Syntax:

C#
 




xxxxxxxxxx
1


1
string IWebElement.TagName{get;}



Example:

C#
 




xxxxxxxxxx
1


 
1
 driver = new ChromeDriver();
2
driver.Url = "https://www.lambdatest.com";
3
/* The Xpath of the Login Button on LambdaTest homepage */
4
IWebElement web_element = driver.FindElement(By.XPath("//*[@id='navbarSupportedContent']/ul/li[6]/a"));
5
String tag_name = web_element.TagName;
6
 
          



11. Selected

Checks whether a web element is selected or not. The web element can be a radio button, checkbox, etc.

Syntax:

C#
 




xxxxxxxxxx
1


1
bool IWebElement.Selected{get;}



Example:

C#
 




xxxxxxxxxx
1


1
 driver = new ChromeDriver();
2
driver.Url = "https://lambdatest.github.io/sample-todo-app/";
3
IWebElement web_element = driver.FindElement(By.XPath("/html/body/div/div/div/ul/li[1]/input"));
4
bool selected_status = web_element.Selected;
5
 
          



12. Size

Gets the height and width associated with a web element or the current browser window. The return type is of type struct Size.

Syntax:

C#
 




xxxxxxxxxx
1


1
Size IWebElement.Size{get;}



Example:

C#
 




xxxxxxxxxx
1


 
1
 
2
driver = new ChromeDriver();
3
driver.Url = "https://www.lambdatest.com";
4
/* Get the window size */
5
Console.WriteLine(driver.Manage().Window.Size);
6
 
          



Drop Down Commands

Drop down elements are common in web pages, especially when a user is registering on a website and has to enter the country/city-related information. In C#, drop down operations are performed using the SelectElement class. SelectElement is declared in using OpenQA.Selenium.Support.UI package is imported before performing any operation on the drop down box.

OpenQA

[Note – For demonstrating the usage of the web element commands, we have used the test URLs http://demos.dojotoolkit.org/dijit/tests/test_Menu.html and http://www.tizag.com/phpT/examples/formex.php].

Below are drop down operations in C#:

1. SelectByIndex

Select a value based on the index value. The starting index in drop down is 0.

Syntax:

C#
 




xxxxxxxxxx
1


1
void SelectElement.SelectByIndex(int index)



Example:

C#
 




xxxxxxxxxx
1
15


 
1
 driver = new ChromeDriver();
2
 
          
3
driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
4
IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
5
SelectElement select_elem = new SelectElement(element);
6
 
          
7
 
          
8
/* Sleep for 4 seconds after page is displayed */
9
System.Threading.Thread.Sleep(4000);
10
 
          
11
 
          
12
select_elem.SelectByIndex(1);
13
 
          



2. DeselectByIndex

Deselect a selected value based on the index.

Syntax:

C#
 




xxxxxxxxxx
1


 
1
void SelectElement.DeselectByIndex(int index)



Example:

C#
 




xxxxxxxxxx
1
15


1
 driver = new ChromeDriver();
2
driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
3
IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
4
SelectElement select_elem = new SelectElement(element);
5
 
          
6
/* Sleep for 4 seconds after page is displayed */
7
System.Threading.Thread.Sleep(4000);
8
 
          
9
select_elem.DeselectByIndex(1);
10
 
          



3. SelectByText

Select an option based on the text of the options available in the drop down. There is an option to do partial matching of the text and by default partial matching is False.

Syntax:

C#
 




xxxxxxxxxx
1


 
1
void SelectElement.SelectByText(string text, [bool partialMatch = false])



Example:

C#
 




xxxxxxxxxx
1
15


1
 driver = new ChromeDriver();
2
 
          
3
driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
4
IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
5
SelectElement select_elem = new SelectElement(element);
6
 
          
7
/* Sleep for 4 seconds after page is displayed */
8
System.Threading.Thread.Sleep(4000);
9
 
          
10
select_elem.SelectByText("on IE6");
11
 
          



4. DeselectByText

Deselect an already selected option based on the text of the options available in the drop down.

Syntax:

C#
 




xxxxxxxxxx
1


1
void SelectElement.DeselectByText(string text)



Example:

C#
 




xxxxxxxxxx
1
15


 
1
 driver = new ChromeDriver();
2
driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
3
IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
4
SelectElement select_elem = new SelectElement(element);
5
 
          
6
/* Sleep for 4 seconds after page is displayed */
7
System.Threading.Thread.Sleep(4000);
8
 
          
9
select_elem.DeselectByText("on IE6");
10
 
          



5. SelectByValue

Select an option based on the value supplied as input.

Syntax:

C#
 




xxxxxxxxxx
1


1
void SelectElement.SelectByValue(string value)



Example:

C#
 




xxxxxxxxxx
1
17
9


1
 driver = new ChromeDriver();
2
driver.Url = "http://www.tizag.com/phpT/examples/formex.php";
3
IWebElement element = driver.FindElement(By.XPath("//*[@id='examp']/form/select[1]"));
4
SelectElement select_elem = new SelectElement(element);
5
/* Sleep for 4 seconds after page is displayed */
6
System.Threading.Thread.Sleep(4000);
7
select_elem.SelectByValue("HighSchool");
8
 
          



6. DeselectByValue

Deselect an already selected option based on the value supplied as input.

Syntax:

C#
 




xxxxxxxxxx
1


1
void SelectElement.DeselectByValue(string value)



Example:

C#
 




xxxxxxxxxx
1
17
9


1
 driver = new ChromeDriver();
2
driver.Url = "http://www.tizag.com/phpT/examples/formex.php";
3
IWebElement element = driver.FindElement(By.XPath("//*[@id='examp']/form/select[1]"));
4
SelectElement select_elem = new SelectElement(element);
5
/* Sleep for 4 seconds after page is displayed */
6
System.Threading.Thread.Sleep(4000);
7
select_elem.DeselectByValue("HighSchool");
8
 
          



7. DeselectAll

Used to clear the selected options in multi select drop down menus.

Syntax:

C#
 




xxxxxxxxxx
1


 
1
void SelectElement.DeselectAll()



Example:

C#
 




xxxxxxxxxx
1


 
1
 
2
driver = new ChromeDriver();
3
driver.Url = "http://www.example-site.com";
4
IWebElement element = driver.FindElement(By.XPath("x-path"));
5
SelectElement select_elem = new SelectElement(element);
6
select_elem.DeselectAll();
7
 
          



8. IsMultiple

This Selenium Webdriver command gets a value showing if the parent element supports multiple selections. If the drop down is multi select capable it returns True else otherwise it returns False.

Syntax:

C#
 




xxxxxxxxxx
1


1
bool SelectElement.IsMultiple{get;}



Example:

C#
 




xxxxxxxxxx
1
12
9


 
1
 driver = new ChromeDriver();
2
driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
3
IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
4
SelectElement select_elem = new SelectElement(element);
5
bool is_multi_select = select_elem.IsMultiple;
6
Console.WriteLine("Multi Select {0}", is_multi_select);
7
 
          



9. Options

You can get the list of options for the select element with this Selenium WebDriver command.

Syntax:

C#
 




xxxxxxxxxx
1


1
IList<IWebElement> SelectElement.Options{ get; }



Example:

C#
 




xxxxxxxxxx
1
60


1
 using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading;
6
using System.Threading.Tasks;
7
using System.Drawing;
8
using NUnit.Framework;
9
using OpenQA.Selenium;
10
using OpenQA.Selenium.Chrome;
11
using OpenQA.Selenium.Support.UI;
12
 
          
13
 
          
14
namespace NUnitDemo
15
{
16
   class NUnit_Demo
17
   {
18
       IWebDriver driver;
19
 
          
20
 
          
21
       [Test]
22
       public void cssDemo()
23
       {
24
           driver = new ChromeDriver();
25
           driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
26
 
          
27
 
          
28
           IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
29
 
          
30
 
          
31
           SelectElement select_elem = new SelectElement(element);
32
           /* Sleep for 4 seconds after page is displayed */
33
           System.Threading.Thread.Sleep(4000);
34
 
          
35
 
          
36
           select_elem.SelectByText("on IE6");
37
 
          
38
 
          
39
           /* List will contain details of all the options */
40
           IList<IWebElement> avail_options = select_elem.Options;
41
 
          
42
 
          
43
           int ListSize = avail_options.Count;
44
 
          
45
 
          
46
           for (int loop_var = 0; loop_var < ListSize; loop_var++)
47
           {
48
               String text_value = select_elem.Options.ElementAt(loop_var).Text;
49
               System.Diagnostics.Debug.WriteLine("Selected item is " + text_value);
50
           }
51
 
          
52
 
          
53
       }
54
 
          
55
 
          
56
       driver.Close();
57
   }
58
}
59
 
          



10. AllSelectedOptions

Gets all of the selected options within the select element. It is similar to Options except that it should be used on a multi select drop down menu.

Syntax:

C#
 




xxxxxxxxxx
1


1
IList<IWebElement> AllSelectedOptions { get; }



Example:

C#
 




xxxxxxxxxx
1
59


 
1
 
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Text;
6
using System.Threading;
7
using System.Threading.Tasks;
8
using System.Drawing;
9
using NUnit.Framework;
10
using OpenQA.Selenium;
11
using OpenQA.Selenium.Chrome;
12
using OpenQA.Selenium.Support.UI;
13
 
          
14
 
          
15
namespace NUnitDemo
16
{
17
   class NUnit_Demo
18
   {
19
       IWebDriver driver;
20
 
          
21
 
          
22
       [Test]
23
       public void cssDemo()
24
       {
25
           driver = new ChromeDriver();
26
           driver.Url = "http://demos.dojotoolkit.org/dijit/tests/test_Menu.html";
27
 
          
28
 
          
29
           IWebElement element = driver.FindElement(By.XPath("//select[@aria-label='select']"));
30
 
          
31
 
          
32
           SelectElement select_elem = new SelectElement(element);
33
           /* Sleep for 4 seconds after page is displayed */
34
           System.Threading.Thread.Sleep(4000);
35
 
          
36
 
          
37
           select_elem.SelectByText("on IE6");
38
 
          
39
 
          
40
           /* List will contain details of all the options */
41
           IList<IWebElement> avail_options = select_elem.AllSelectedOptions;
42
 
          
43
 
          
44
           int ListSize = avail_options.Count;
45
           System.Diagnostics.Debug.WriteLine("List size is " + ListSize);
46
 
          
47
 
          
48
           for (int loop_var = 0; loop_var < ListSize; loop_var++)
49
           {
50
               String text_value = avail_options.ElementAt(loop_var).Text;
51
               System.Diagnostics.Debug.WriteLine("Selected item is " + text_value);
52
           }
53
 
          
54
 
          
55
       }
56
       driver.Close();
57
   }
58
}
59
 
          



It’s A Wrap!

The IWebDriver interface is the base on which the browser interactions for Selenium test automation happens. In this NUnit tutorial, I had a look at the most widely used Selenium WebDriver commands in Nunit for automated browser testing.

Using these Selenium WebDriver commands in Nunit, you can interact with different types (and categories) of Web Elements such as text boxes, drop-downs, radio buttons, and more. This forms the basis of automated browser testing with Selenium, C#, and NUnit framework.

I hope you found this NUnit tutorial informative, In case of any questions feel free to t reach out to us in the comment section down below. That’s all for now.

Happy Testing!

Topics:
automation testing, csharp 6.0, nunit, performance, selenium, selenium automation testing, selenium web driver, webdriver

Published at DZone with permission of Himanshu Sheth . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}