Help me with the steps to write first Selenium C# test case.

0 votes
Please anyone help me with the steps to write first Selenium C# test case.
Jun 10, 2019 in Selenium by Wareena
130 views

1 answer to this question.

0 votes

Hey Wareena, you can use following steps to write your first Selenium C# test case:

1) At the top of your project code after the last ‘using’ namespace add the following Selenium namespaces:

using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;

2) Add the following code in your static void Main section:

 IWebDriver driver = new FirefoxDriver();
 driver.Url = "http://www.google.com";

Now the Code window of the project should look like this:

3) Run the test by clicking on the Start button given on the top bar:

answered Jun 10, 2019 by Anvi
• 14,010 points

Related Questions In Selenium

0 votes
2 answers

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

You first need to download chrome driver ...READ MORE

answered Aug 26, 2019 in Selenium by Abha
• 27,720 points
385 views
0 votes
1 answer

How to write a test case in Selenium IDE?

Hey Sam, to write a test case ...READ MORE

answered May 13, 2019 in Selenium by Pratibha
• 3,690 points
61 views
0 votes
1 answer

What are the steps to install PhantomJS with Selenium?

Hello Rizwan, steps to install PhantomJS with ...READ MORE

answered May 17, 2019 in Selenium by Pritesh
148 views
0 votes
1 answer

How to create a test case with TestNG in Selenium?

Hey Deepak, to create a Test Case ...READ MORE

answered May 21, 2019 in Selenium by Abha
• 27,720 points
95 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
1,485 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,850 points
1,462 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,850 points
1,222 views
0 votes
1 answer
0 votes
1 answer

How can I write test scripts in Selenium with python?

Hey Khushi, writing test scripts in Selenium ...READ MORE

answered May 9, 2019 in Selenium by Anvi
• 14,010 points
108 views