How can I implement Selenium using C

0 votes
Recently I installed C# client drivers and the IDE. I ran some tests and executed it using IDE but how can I use C#.I have added all the firefox DLLs.If someone could provide the basic progeam that would be very helpful.
Apr 9, 2018 in Selenium by Atul
• 10,240 points
946 views

1 answer to this question.

0 votes

Reference https://www.seleniumhq.org/docs/03_webdriver.jsp#the-5-minute-getting-started-guide

using OpenQA.Selenium.Firefox;

using OpenQA.Selenium;

class GoogleSuggest

{

    static void Main(string[] args)

    {

        IWebDriver driver = new FirefoxDriver();

        //Notice navigation is slightly different than the Java version

        //This is because 'get' is a keyword in C#

      driver.Navigate().GoToUrl("http://www.google.com/");

        IWebElement query = driver.FindElement(By.Name("q"));

        query.SendKeys("Cheese");

        System.Console.WriteLine("Page title is: " + driver.Title);

        driver.Quit();

    }

}

answered Apr 9, 2018 by Neville

Related Questions In Selenium

0 votes
1 answer

How can I download the *.jar file from http:// seleniumhq.org using selenium WebDriver?

For Selenium Standalone Server use this: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); and ...READ MORE

answered Apr 9, 2018 in Selenium by Martin
• 4,320 points
3,573 views
+4 votes
1 answer

How can I configure Eclipse for using Selenium?

Follow the following steps to configure your ...READ MORE

answered Dec 12, 2018 in Selenium by Nabarupa
1,904 views
0 votes
1 answer
0 votes
1 answer

How can I login to flipkart using selenium?

Hey @Jino, glad you are liking selenium ...READ MORE

answered Dec 20, 2018 in Selenium by Nabarupa
13,787 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,765 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,184 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,258 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,896 views
0 votes
2 answers

How can we take screenshots of tests in Selenium 2 using C#

Hey, try using following code command to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,140 points
1,462 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