dzharii / swd-recorder

Selenium WebDriver Page Recorder (Page Objects)
MIT License
189 stars 71 forks source link

Binary file path for any browser (or customized path) #42

Open MonoAutomation opened 8 years ago

MonoAutomation commented 8 years ago

Hello,

It's just my thought and i have implemented same thing in the page recorder to locate customized path of the browser.

  1. i have added two controls (1.check box and edit filed) when user selects browser to start, if selects check box and entering the binary path then tool will tries to identifying the customized path other wise it will take default installation location.
  2. Added few line of code in webdriverUtils.cs under "StartEmbededWebDriver" method private static IWebDriver StartEmbededWebDriver(WebDriverOptions browserOptions) { switch (browserOptions.BrowserName) {

             case WebDriverOptions.browser_Firefox:

    if (browserOptions.BinaryURL != "" && browserOptions.IsBinary) {
    FirefoxBinary ffBinary = new FirefoxBinary(browserOptions.BinaryURL); FirefoxProfile firefoxProfile = new FirefoxProfile(); return new FirefoxDriver(ffBinary, firefoxProfile); }else { return new FirefoxDriver(); }

Note: i hope we can use same logic for other browsers as well.

  1. i have added the below 2 controls as,

customizedpath

if i am not correct ,please excuse me and tune for better solution.

dzharii commented 8 years ago

Hi Ravi,

Thank you for sharing your ideas. In the future release, there will be a way to specify the Firefox binary path using the configuration profiles. The users will be enabled to configure additional browser capabilities and create multiple profiles even for same browser type, but with different settings. The firefox binary path will be one among those settings. Unfortunately every "local" WebDriver's browser type uses its own way to configure the instance and I need to implement this for each browser (FF, Chrome, IE, PahntomJS, Edge) so I am not sure when the next release will happen.

I thank you for sharing your experience and ideas!

MonoAutomation commented 8 years ago

Thank you , dzharii.

dwelsh1 commented 7 years ago

Hello,

Any update on the progress for this?

Thanks