browse(function ($browser) { $browser->go('mail'); $browser->waitFor('#messagelist tbody tr'); // Messages list state $browser->assertElementsCount('#messagelist tbody tr.unread', self::$msgcount); if (!$browser->isDesktop()) { $browser->click('.back-sidebar-button'); } // Folders list state $browser->assertVisible('.folderlist li.inbox.unread'); $this->assertEquals(strval(self::$msgcount), $browser->text('.folderlist li.inbox span.unreadcount')); }); } }