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
388 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,110 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,930 points
770 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
338 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
655 views
0 votes
2 answers

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,520 points
3,824 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,805 views
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,890 points
2,770 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,147 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,110 points
193 views