コード例 #1
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")
コード例 #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")
コード例 #3
0
    def test_set_date(self):
        test_html = self.marionette.absolute_url("datetimePage.html")
        self.marionette.navigate(test_html)

        element = self.marionette.find_element("id", "date-test")
        dt_value = DateTimeValue(element)
        dt_value.date = datetime(1998, 6, 2)
        self.assertEqual(element.get_attribute("value"), "1998-06-02")
コード例 #4
0
    def test_set_date(self):
        test_html = self.marionette.absolute_url("datetimePage.html")
        self.marionette.navigate(test_html)

        element = self.marionette.find_element("id", "date-test")
        dt_value = DateTimeValue(element)
        dt_value.date = datetime(1998, 6, 2)
        self.assertEqual(element.get_attribute("value"), "1998-06-02")