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
12 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 7,160 points

Related Questions In Selenium

0 votes
1 answer

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

Download the executable driver from: ChromeDriver Download Before ...READ MORE

answered Mar 29, 2018 in Selenium by nsv999
• 5,050 points
145 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
• 2,520 points
13 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
12 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,050 points
135 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
527 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
129 views
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
• 7,160 points
17 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.