Has anyone managed to get the Chrome driver working in Ruby WebDriver
on Windows? I originally received a path error, so a did gsub to
impose window directory separators and now I am getting a socket error
in CreateProcess() in process.rb.
Aidy
Yep, it worked fine for me last I tried. I also answered your bug
report, so please take a look at that.
Please update the issue with any relevant new information (like where
you did a gsub and the full stacktrace of the socket error).
Thanks,
Avit
On Nov 17, 10:36 am, Jari Bakken <jari.bak...@gmail.com> wrote:
> On Mon, Nov 16, 2009 at 8:47 PM, aidy lewis <aidy.le...@googlemail.com> wrote:
>
> > Hi,
>
> > Has anyone managed to get the Chrome driver working in Ruby WebDriver
> > on Windows? I originally received a path error, so a did gsub to
> > impose window directory separators and now I am getting a socket error
> > inCreateProcess() in process.rb.
I assume you mean Chrome, not IE.
> My attempts at fixing the problem included changing the
> binary_path variable in launcher.rb since "//" was used to separate
> the folders. This unfortunately still didn't help but the error
> begins after process.start. Please let me know any solutions. By the
> way I am using the latest version of the ruby bindings 0.0.13.
>
In XP, the direction of the directory separators in the argument to
Process.create doesn't matter . I'll have access to a Vista machine to
look into this after the holiday. It would be helpful if you could
tell me
1. Exactly how you changed binary_path in launcher.rb
2. The full backtrace of the error.
3. The full path of your Chrome binary.
It would also be good to know if this script works (replace with the
correct path if necessary):
I'm aware that WebDriver can't currently find the correct path for
Chrome on localized versions of Windows.
I guess the best solution would be to look it up in the Windows
registry (the ruby bindings already do this for Firefox).
Jari
> Thanks,
> Avit
>
> On Nov 17, 10:36 am, Jari Bakken <jari.bak...@gmail.com> wrote:
>> On Mon, Nov 16, 2009 at 8:47 PM, aidy lewis <aidy.le...@googlemail.com> wrote:
>>
>> > Hi,
>>
>> > Has anyone managed to get the Chrome driver working in Ruby WebDriver
>> > on Windows? I originally received a path error, so a did gsub to
>> > impose window directory separators and now I am getting a socket error
>> > inCreateProcess() in process.rb.
>>
>> Yep, it worked fine for me last I tried. I also answered your bug
>> report, so please take a look at that.
>> Please update the issue with any relevant new information (like where
>> you did a gsub and the full stacktrace of the socket error).
>
> --
>
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>
>
The problem here is that on Vista and Windows 7, the Chrome executable
will be in:
ENV['HOME']\AppData\Local\Google\Chrome\Application\chrome.exe
whereas on XP it will be in ENV['HOME']\Local Settings\Application
Data\Google\Chrome\Application\chrome.exe
I'm not sure how to differentiate between versions of Windows in Ruby,
but some ideas, in decreasing order of brittleness:
1) See if the first file exists, if not, see if the second exists
2) Get the output of the command `ver` and interpret that (would need
to work out how - for me XP returns 5.1.2600, Windows 7 returns
6.1.7600, Vista I would guess would be 6.x.y...
3) See whether ENV['HOME'] is foo:/Users - if so, we're probably on
Vista/Win7 so use that path...
On my XP machine, I don't have an ENV['HOME'] set, it returns nil, but
I do have HOMEDRIVE and HOMEPATH which together form the desired
path...
4) ?
Could you try the latest gem (0.0.14) and see how it works for you -
this is hopefully fixed as of r7987.