Click here to Skip to main content
15,063,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hii ,

I am new on Selenium ,

I was trying to run one simple selenium class file from my vs 2012 express

I download required selenium we driver and selenium web seriver support classes from nuget pakage manager .

But when i run this console application , it just opens up firefox and not redirecting to google and types the word hello and hits enter

please suggest

below is my code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;

namespace SeleniumhelloWorld
   public class Class1
         static void Main(String[] args)
            IWebDriver driver = new FirefoxDriver();


            IWebElement searchInput = driver.FindElement(By.Id("sb_form_q"));
            searchInput.SendKeys("Hello World");



this is what I got the error

Failed to start up socket within 45000 ms. Attempted to connect to the following addresses:

I am using firefox
Updated 22-Jan-15 18:51pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900