To check if a tab is open, use Tabs#isOpen.  For example: getTabs().isOpen(Tab.MAGIC) The return values speak for themselves. About the other problem, I think your solution works fine but you'll need to open the tab first which can be done with Tabs#open.