firstly I'd like to point out I'm at "Hello, World!" level, with VERY limited coding abilities, I'm looking to progress in automated testing (currently manual only) and I've just encountered an issue with presumably my selenium webdriver, this is the issue I get: This is my code:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
namespace UnitTestProject2
{
[TestClass]
public class FirstSoftwareAuto
{
[TestMethod]
public void First_Software_Login()
{
IWebDriver driver = new FirefoxDriver();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));
driver.Navigate().GoToUrl("//companyproductwebsite");
IWebElement addUser = driver.FindElement(By.Name("Username"));
addUser.SendKeys("//email");
}
}
}
I am honestly not sure as to what the issue is, here's the error I get bottom left of microsoft visual studio:
One of the helpful programmers at my company mentioned it's because it is trying to connect to localhost, however I do not understand why it isn't connecting to the internet.
Test Name: First_Name_Login
Test FullName: UnitTestProject2.FirstVantAuto.First_Software_Login
Test Source: c:\users\Name\documents\visual studio 2015\Projects\UnitTestProject2\UnitTestProject2\UnitTest1.cs : line 15
Test Outcome: Failed
Test Duration: 0:00:49.1936095
Result StackTrace:
at OpenQA.Selenium.Firefox.FirefoxDriverServer.ConnectToBrowser(TimeSpan timeToWait)
at OpenQA.Selenium.Firefox.FirefoxDriverServer.Start()
at OpenQA.Selenium.Firefox.FirefoxDriverCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile)
at OpenQA.Selenium.Firefox.FirefoxDriver..ctor()
at UnitTestProject2.FirstSoftwareAuto.First_Software_Login() in c:\users\name\documents\visual studio 2015\Projects\UnitTestProject2\UnitTestProject2\UnitTest1.cs:line 16
Result Message:
Test method UnitTestProject2.FirstSoftwareAuto.First_Software_Login threw exception:
OpenQA.Selenium.WebDriverException: Failed to start up socket within 45000 milliseconds. Attempted to connect to the following addresses: 127.0.0.1:7055
Any input would be much appreciated.