Search code examples
rubycucumberwatir-webdriverrubymine

Getting Access is denied. (5) (ChildProcess::Error) in rubymine


Getting below the error when I try to create an object of web browser in my code:

$browser = Watir::Browser.new :ie

**ChildProcess::Error: Access is denied. (5)**

Got no idea what is causing this and how to resolve it. Previously it used to work fine on the same system. I just re-installed ruby and everything.


Solution

  • To fix this there would be a few steps, try to see if it's working outside of rubymine. Also what is the ruby version are you using ?

    First of all check that your IEDriver executable is in the path.. Open cmd and run:

    C:\>IEDriverServer
    Started InternetExplorerDriver server (64-bit)
    2.31.0.0
    Listening on port 5555
    

    Also try following these steps. Works like a charm for me:

    C:\>irb
    irb(main):001:0> require "watir-webdriver"
    => true
    irb(main):002:0> $browser = Watir::Browser.new :ie
    => #<Watir::Browser:0xdef8a40 url="http://localhost:5555/" title="WebDriver">
    irb(main):003:0>
    

    My Ruby version details:

    C:\>ruby -v
    ruby 2.0.0p353 (2013-11-22) [i386-mingw32]
    

    Installed gems:

    C:\>gem list
    
    *** LOCAL GEMS ***
    
    bigdecimal (1.2.0)
    childprocess (0.4.1.rc3)
    ffi (1.9.3 x86-mingw32)
    io-console (0.4.2)
    json (1.7.7)
    minitest (4.3.2)
    multi_json (1.8.4)
    psych (2.0.0)
    rake (0.9.6)
    rdoc (4.0.0)
    rubygems-update (2.2.2)
    rubyzip (1.1.0)
    selenium-webdriver (2.40.0.rc1)
    test-unit (2.0.0.0)
    watir-webdriver (0.6.7)
    websocket (1.0.7)