Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. (Selenium web driver using c#)How to make the webdrivers.exe path to environment varibales in my local machine

(Selenium web driver using c#)How to make the webdrivers.exe path to environment varibales in my local machine

Scheduled Pinned Locked Moved C#
helpcsharpai-testingtestingbeta-testing
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11975128
    wrote on last edited by
    #1

    Hi Gautham, Nice to see your article on Selenium webdriver using C# I have gone through one of your article-(Automated Testing Of Web Pages Using Selenium-Web Driver).In that i have few doubts 1.How to add the all(chrome,iedriver exe) files folder to enviornment variables in my local machine.Please take a look and help me on this issue. 2.I have written n ran code like below,getting error as source code not found.please see the screen shot also. public static IWebDriver InitializeDriver() { //if (WebDriver == null) // { //string DRIVER_PATH = @"C:\Web drivers\IEDriverServer.exe"; string browser = Convert.ToString(ConfigurationManager.AppSettings["BrowserType"]); switch (browser) { case "ie": WebDriver = new InternetExplorerDriver(@"C:\Web drivers\IEDriverServer.exe"); return WebDriver; //break; //case "FF": // WebDriver = new FirefoxDriver(DRIVER_PATH); // break; case "chrome": WebDriver = new ChromeDriver(@"C:\Drivers\BrowserDrivers\chromedriver"); return WebDriver; //break; default: WebDriver = new FirefoxDriver(); return WebDriver; //break; } // } }

    P 1 Reply Last reply
    0
    • U User 11975128

      Hi Gautham, Nice to see your article on Selenium webdriver using C# I have gone through one of your article-(Automated Testing Of Web Pages Using Selenium-Web Driver).In that i have few doubts 1.How to add the all(chrome,iedriver exe) files folder to enviornment variables in my local machine.Please take a look and help me on this issue. 2.I have written n ran code like below,getting error as source code not found.please see the screen shot also. public static IWebDriver InitializeDriver() { //if (WebDriver == null) // { //string DRIVER_PATH = @"C:\Web drivers\IEDriverServer.exe"; string browser = Convert.ToString(ConfigurationManager.AppSettings["BrowserType"]); switch (browser) { case "ie": WebDriver = new InternetExplorerDriver(@"C:\Web drivers\IEDriverServer.exe"); return WebDriver; //break; //case "FF": // WebDriver = new FirefoxDriver(DRIVER_PATH); // break; case "chrome": WebDriver = new ChromeDriver(@"C:\Drivers\BrowserDrivers\chromedriver"); return WebDriver; //break; default: WebDriver = new FirefoxDriver(); return WebDriver; //break; } // } }

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      I haven't written an article on Selenium so your message obviously isn't directed at me. I'm pretty sure none of the regulars here have either. When you have a question about an article, the correct place to ask your question is on the forum at the end of the article. Don't post in a random place hoping that the author will stumble across it.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups