Ray,
First of all I want to say that I didn’t do the coding of this, but I
want to offer my ideas on what I think is the right path for the future.
Ray Tung <
ray.t...@gmail.com> writes:
> Looking at the source code, the library currently looks for the
> geckodriver executable in the PATH and in the current directory (via
> process.cwd()). Is there a reason to why there isn't a feature that
> allows users to provide their custom geckodriver path?
Right now we’re in a transition phase, and transitions are never
painless.
Firefox 47.0.1 and below only works with FirefoxDriver, and versions
after only support geckodriver. In fact, we are explicitly saying to
continue using FirefoxDriver if you need to use an earlier Firefox, and
also saying the more recent Firefox, the better chance of Marionette
functioning correctly.
I don’t think there’s a need for a choice at all in this matter. If we
can detect the version of Firefox, we should choose the right option
for the user implicitly.
> There's currently a useGeckodriver(bool) in firefox.Options(). It
> would be wonderful if we can pass in the path to the executable there.
> e.g.
>
> *let* options = *new* firefox.Options()
> .setBinary(/*some binary*/)
> .setProfile(/*some profile*/)
> .useGeckodriver('some/path/here/geckodriver');
I don’t think this is a bad idea if useGeckodriver is already an API,
but I think was a mistake to publish this API to begin with, as
non-geckodriver usage will very soon become history.
Let’s keep in mind that web browsers are a fresh commodity.