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 in Selenium by Wareena
74 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 by Anvi
• 13,400 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 in Selenium by Abha
• 24,980 points
282 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 in Selenium by Pratibha
• 3,360 points
34 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 in Selenium by Pritesh
66 views
0 votes
1 answer
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,090 points
770 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,130 points
1,012 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,130 points
719 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 in Selenium by Anvi
• 13,400 points
66 views