Question: Rails: 4.1.2

Database: PostgreSQL

For one of my queries, I am using methods from both the [textacular](https://github.com/textacular/textacular) gem and Active Record. How can I chain some of the following queries with an "OR" instead of an "AND":

```
people = People.where(status: status_approved).fuzzy_search(first_name: "Test").where("last_name LIKE ?", "Test")

```

I want to chain the last two scopes (`fuzzy_search` and the `where` after it) together with an "OR" instead of an "AND." So I want to retrieve all People who are approved AND (whose first name is similar to "Test" OR whose last name contains "Test"). I've been struggling with this for quite a while, so any help would be greatly appreciated!

Answer: 
Your code gives following output:

```
Item text: >Pumpkins and Chocolate<
Item text: >Click to Nowhere<

```

If you want to get innerHTML change `item.text` to `item.get_attribute("innerHTML")`:

```
Item text: ><a href="">Pumpkins and Chocolate</a><
Item text: ><a href="">Click to Nowhere</a><

```

The reason why you got empty strings is because the web elements were **not visible** and `item.text` returns empty string in this case.
you need to use find\_elements\_by\_xpath ('.//ul[@id="dropdown-menu-id"]/li/a')