Selenium with C

0 votes

I want to use Selenium WebDriver with C#. I have downloaded C# client drivers and the IDE. I added all relevant DLLs (Firefox) to the project, but I don't have Selenium Class. Kindly give me an example to do this.

May 31, 2018 in Selenium by Atul
• 10,240 points
1,116 views

1 answer to this question.

0 votes

using OpenQA.Selenium.Firefox;
using OpenQA.Selenium;

class Demo
{
    static void Main(string[] args)
    {
        WebDriver driver = new FirefoxDriver();
        driver.Navigate().GoToUrl("http://www.google.com/");
        WebElement find = driver.FindElement(By.Name("xyz")).SendKeys("hello");
        System.Console.WriteLine("Page title: " + driver.Title);
        driver.Quit();
    }
}
answered May 31, 2018 by Meci Matt
• 9,460 points

Related Questions In Selenium

0 votes
2 answers

How to open a browser window in full screen using Selenium WebDriver with C#

Hi , we have inbuilt method Maximize(). driver.Manage().Wind ...READ MORE

answered Sep 6, 2020 in Selenium by Sri
• 3,190 points
15,528 views
0 votes
1 answer
0 votes
1 answer

Help me with the steps to write first Selenium C# test case.

Hey Wareena, you can use following steps ...READ MORE

answered Jun 10, 2019 in Selenium by Anvi
• 14,150 points
1,065 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
973 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
12,619 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
8,572 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
6,629 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,519 views
0 votes
1 answer

XPath for the elements with no ID or Name in Selenium Webdriver

Use like this or similar to this: //div[@id="top-level-menu-item-3"]/div[@class="filter-label"] //div[@id="top-level-menu1"] ...READ MORE

answered Apr 17, 2018 in Selenium by Meci Matt
• 9,460 points
6,847 views
0 votes
1 answer

Binding Selenium Javadoc with eclipse

First, you need to go to:- project properties ...READ MORE

answered Apr 17, 2018 in Selenium by Meci Matt
• 9,460 points
1,733 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