def testStats(self):
    self.Open("/")

    # Make sure the foreman is not there (we are not admin yet)
    self.Click("css=a[href=#ManagementAdvanced]")
    self.WaitUntil(self.IsTextPresent, "All Clients Crashes")
    self.WaitUntilNot(self.IsElementPresent,
                      "css=a[grrtarget=ReadOnlyForemanRuleTable]")

    # Make "test" user an admin
    with self.ACLChecksDisabled():
      self.CreateAdminUser("test")

    self.Open("/")

    # Make sure that now we can see this option.
    self.Click("css=a[href=#ManagementAdvanced]")
    self.WaitUntil(self.IsElementPresent,
                   "css=a[grrtarget=ReadOnlyForemanRuleTable]")

    # Go to Statistics
    self.Click("css=a:contains('Statistics')")

    self.Click("css=#_Clients i.jstree-icon")

    self.Click("css=#_Clients-All i.jstree-icon")

    self.Click("css=#_Clients-All-OS_20Breakdown i.jstree-icon")

    self.WaitUntil(self.IsElementPresent,
                   "css=#_Clients-All-OS_20Breakdown-_207_20Day_20Active")
    self.Click("css=li[path='/Clients/All/OS Breakdown/ 7 Day Active'] a")

    self.WaitUntilEqual(u"No data Available",
                        self.GetText, "css=#main_rightPane h3")

    with self.ACLChecksDisabled():
      self.PopulateData()

    self.Click("css=li[path='/Clients/All/OS Breakdown/ 7 Day Active'] a")

    self.WaitUntilEqual(u"Operating system break down.",
                        self.GetText, "css=#main_rightPane h3")
Test the statistics interface.
dataset/ETHPy150Open google/grr/grr/gui/plugins/statistics_test.py/TestStats.testStats