Пример #1
0
    def test_set_time(self):
        self.marionette.navigate(inline("<input id='time-test' type='time'/>"))

        element = self.marionette.find_element(By.ID, "time-test")
        dt_value = DateTimeValue(element)
        dt_value.time = datetime(1998, 11, 19, 9, 8, 7)
        self.assertEqual("09:08:07", element.get_property("value"))
Пример #2
0
    def test_set_time(self):
        test_html = self.marionette.absolute_url("datetimePage.html")
        self.marionette.navigate(test_html)

        element = self.marionette.find_element("id", "time-test")
        dt_value = DateTimeValue(element)
        dt_value.time = datetime(1998, 11, 19, 9, 8, 7)
        self.assertEqual(element.get_attribute("value"), "09:08:07")
    def test_set_time(self):
        test_html = self.marionette.absolute_url("datetimePage.html")
        self.marionette.navigate(test_html)

        element = self.marionette.find_element("id", "time-test")
        dt_value = DateTimeValue(element)
        dt_value.time = datetime(1998, 11, 19, 9, 8, 7)
        self.assertEqual(element.get_attribute("value"), "09:08:07")