web.selectWindow bugging out

I am having an issue where using the selectWindow function causes the test to rapidly flash back and forth between the two tabs that are opened before timing out and saying that the window was not found. The screenshot tool also errors out after this occurs:

error: [Module:web] Cannot get screenshot message=At least images must contain more than one image, stack=Error: At least images must contain more than one image

I am trying to figure out a way of moving between two tabs; there is a link that is clicked in one of my tests that opens a new tab, but using web.getSource reveals that the driver is still focused on the previous tab. selectWindow seems like a promising solution but I am encountering this bug with it.

Could you send the name of the browser and OS?
Could you also send a code sample?