Exception: PageRecord::MultipleRecords

Inherits:
Exception
  • Object
show all
Defined in:
lib/page_record/errors.rb

Overview

This Exception is raised when the page contains multiple instances of the specfied record type. Use a selector to narrow the search.

```html

Ajax
Ajax

``` When the following code is executed, the MultipleRecords exception is raised.

ruby TeamPage.find(10)

To fix this, use the #first-table in the selector

ruby TeamPage.find(10, '#first-table')