def test_start_stop_multiple_times_timer(self):
     element = Element(self.driver, None)
     start_time = element.start_timer()
     time.sleep(0.5)
     element.stop_timer()
     time.sleep(0.5)
     end_time = element.stop_timer()
     duration = element.get_duration()
     self.timer_assertions(start_time, end_time, duration)
 def test_start_stop_multiple_times_timer(self):
     element = Element(self.driver, None)
     element_start_time = element.start_timer(type="element")
     time.sleep(0.5)
     element.stop_timer(type="element")
     time.sleep(0.5)
     element_end_time = element.stop_timer(type="element")
     duration = element.get_duration(type="element")
     self.timer_assertions(element_start_time, element_end_time, duration)
 def test_start_stop_split_timer(self):
     element = Element(self.driver, None)
     start_time = element.start_timer()
     time.sleep(0.5)
     split_time = element.get_split_time()
     assert split_time > 0
     assert not hasattr(self.driver, "end_time") or self.driver.end_time == 0
     time.sleep(0.5)
     split_time = element.get_split_time()
     assert not hasattr(self.driver, "end_time") or self.driver.end_time == 0
     assert split_time > 0
     time.sleep(0.5)
     end_time = element.stop_timer()
     duration = element.get_duration()
     assert duration > split_time
     self.timer_assertions(start_time, end_time, duration)