Code Completion for Watir::Browser not working


First time RubyMine and Ruby user and I have a question about code completion. I have created a project to play with Watir, installed the gem, initialized a bundle and I can see watir and other libs in the "External Libraries" folder/section. However I do not get code completion suggestions for the Watir::Browser class when I do this:

@browser =

Basically I expect to see members I can find in the Watir documentation such as "goto" or "close", but they are not listed.

Is this a bug or limitation of RubyMine/Ruby or am I missing something out?

Comment actions Permalink

I think I've just answered my own question by looking at the source code. The members I listed are not part of the Browser class. Gotta love dynamic languages.

  module Browser
    @@browser_classes = {}
    @@sub_options = {}
    @@default = nil
    class << self

      # Create a new instance of a browser driver, as determined by the
      # configuration settings. (Don't be fooled: this is not actually
      # an instance of Browser class.)
      def new

Comment actions Permalink


I think your answer is right

Comment actions Permalink

OK, but IS there any way to get it working (the code completion)?


Please sign in to leave a comment.