![]() |
|
Selenium Not Installing - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Selenium Not Installing (/Thread-Selenium-Not-Installing) |
Selenium Not Installing - Biglad465 - 06-23-2019 Ok so I'm trying to install Selenium onto a C# project. I've Installed the Selenium.WebDriver Nugget Package , then Installed Selenium.Webdriver.chromedriver . I ran the following code just to investigate : Code: // Create a driver instance for chromedriver
IWebDriver driver = new ChromeDriver();
//Navigate to google page
driver.Navigate().GoToUrl("http:www.google.com");
//Maximize the window
driver.Manage().Window.Maximize();
//Find the Search text box using xpath
IWebElement element = driver.FindElement(By.XPath("//*[@title='Search']"));
//Enter some text in search text box
element.SendKeys("learn-automation");
//Close the browser
driver.Close();I get errors : Code: "The type or namespace name 'IWebDriver' could not be found (are you missing a using directive or an assembly reference?)Then get 2 more errors exactly the same but instead of IWebDriver it says ChromeDriver and IWebElement. I've tried uninstalling and reinstalling the packages multiple times , no change. I then uninstalled Selenium.WebDriver.Chromedriver and instead installed Selenium.Chrome.WebDriver , no luck there either. RE: Selenium Not Installing - DashingDave - 06-25-2019 Hi, mate. I really hope that i can help you. Please, have a look if it helps you. I'll be truly honoured. https://www.guru99.com/installing-selenium-webdriver.html RE: Selenium Not Installing - Biglad465 - 06-25-2019 (06-25-2019, 06:26 AM)DashingDave Wrote: Hi, mate. Thanks for trying to help , unfortunately im using C# and VS instead of Java and Eclipse. But thanks for the guide nonetheless . RE: Selenium Not Installing - DashingDave - 06-26-2019 No, problem Sir. You're welcome and a big thanks to you for appreciating that. Have a very great day. RE: Selenium Not Installing - Napoleon - 08-18-2019 Hey mate, I struggled with this too when I was writing a C# program with Selenium. There's actually three separate packages you have to install before it works, looks like you're missing the Selenium.Support package. Here's a screenshot of all of them installed: https://gyazo.com/3c50a6f3176611b3abdfaad492b1c537 Hope this helps! RE: Selenium Not Installing - RootDeveloper - 08-23-2019 Selenium ist shit! Don't use it, code your own Method's, belive me it will be better than Selenium. |