         # ...the chart is displayed and...
         expect(chartDisplayed, 'The modeling chart is initially hidden')
           .to.be.true
-        @select('#qi-modeling-table').then (table) =>
+        @select('qi-modeling-table').then (table) =>
           # ..the table exists and...
           expect(table, 'The modeling table is missing').to.exist
           table.isDisplayed().then (tableDisplayed) =>

                row.findElements(By.tagName('td')).then (cols) ->
                  cols.map (col) ->
                    col.getText()
  
  # This method verifies that the format button correctly toggles
  # the chart and table display, specifically:

Page = require('./helpers/page')()

class SubjectDetailPage extends Page
  # Finds the profile table WebElements for the given CSS style.
  # The return value is a table promise resolving to a list of
  # row promises, each of which resolves to a list of column
  # text promises.
  #
  # @returns the imaging profile tables promise
  profileTablesForCss: (style) ->
    # Note: a version of this with the all function fails, e.g.:
    #   element(By.css()).all(...)
    # results in:
    #   TypeError: Object #<Object> has no method 'all'
    @select(style).then (panel) ->
      expect(panel, "The #{ style } table is missing").to.exist
      panel.findElements(By.tagName('table')).then (tables) ->
        tables.map (table) ->
          table.findElement(By.tagName('tbody')).then (body) ->
