Question: Trying to grab the **first set** of elements between tags with the class name "a".

```
<div>
<div class = "a"></div>
<div class = "b"></div> <----
<div class = "b"></div> <----
<div class = "b"></div> <----
<div class = "a"></div>
<div class = "b"></div>
<div class = "b"></div>
<div class = "b"></div>
<div class = "b"></div>
<div class = "a"></div>
...

//div[@class='a']/following-sibling::div[@class='a'][1]/preceding-sibling::div[preceding-sibling::div[@class='a']]

```

Where am I going wrong?

Answer: 
Your XPath is being evaluated for *all* `div[@class='a']` elements (note the `//`).

All you have to do is restrict it to the first one:

```
(//div[@class='a'])[1]/following-sibling::div[@class='a'][1]/preceding-sibling::div[preceding-sibling::div[@class='a']]

```
I think this xpath will work for you:

```
//div/section/div[count(preceding-sibling::div[@class='wisfb_scheduleGroupTitle'])=1]/preceding-sibling::div[@class!='wisfb_scheduleGroupTitle']

```

Tested against the page, and verified it worked.