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
1,279 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,150 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
• 28,140 points
2,012 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 14, 2019 in Selenium by Pratibha
• 3,690 points
2,864 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
2,652 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,500 points
13,776 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,190 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,910 points
7,267 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 3, 2020 in Selenium by Sri
• 3,190 points
7,904 views
0 votes
1 answer

Can anyone help me with Zomato login test script using Python Selenium Webdriver?

Hi Laxmikant, if you want to write ...READ MORE

answered Jul 29, 2019 in Selenium by Anvi
• 14,150 points
2,150 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, 2019 in Selenium by Anvi
• 14,150 points
915 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP