3

I am automating using Selenium, Capybara and siteprism. Using rubymine, I want to get code completion such that I can type @page. and get a list of the methods (this works) and a list of the elements and sections defined in the page object using siteprism.

Is there any way to do this in Rubymine? Sublime text editor does this, but yet it doesn't handle the class names and methods very well.

theawesome
  • 313
  • 1
  • 3
  • 9

1 Answers1

3

In site-prism the methods on a page-object class such as the getters, waiters, etc are added dynamically by the class methods element, elements, section, sections when the class is evaluated. This adds several methods about a particular element for each listing in the class.

That means there's no way for rubymine to simply read the files looking for def to determine what methods should exist on any instance of @page.

You might be able to code something up to get it working, but there's no straightforward solution.

tgf
  • 2,977
  • 2
  • 18
  • 29