Beispiel #1
0
 def test_sheet_create(self):
     file_id = self.get_target_file_id()
     title    = Misc.random_string_and_numbers(2,'from tests_')
     sheet_id = self.gsheets.sheets_add_sheet(file_id, title)
     assert len(set(self.gsheets.sheets_properties_by_title(file_id))) == 2
     self.gsheets.sheets_rename_sheet(file_id, sheet_id, 'temp title')
     self.gsheets.sheets_delete_sheet(file_id, sheet_id)
     assert len(set(self.gsheets.sheets_properties_by_title(file_id))) == 1
    def test_add_element_text(self):
        (file_id, slide_id) = self.get_target_slide_id()
        text    = Misc.random_string_and_numbers(6,'New Text Field - ')
        x_pos   = 50
        y_pos   = 250
        width   = 300
        height  = 50
        new_id = self.gslides.element_create_text(file_id, slide_id, text, x_pos, y_pos, width, height)

        self.gslides.element_set_text(file_id,new_id,'changed text')
        sleep(2)
        self.gslides.element_delete(file_id,new_id)
Beispiel #3
0
 def random_id(self, prefix):
     return Misc.random_string_and_numbers(6, prefix + "_")
 def setUp(self):
     self.render_page  = Render_Page(headless = False, auto_close = False)
     self.random_value = Misc.random_string_and_numbers(6, "dynamic text ")
     self.html         = "<html><script>document.write('{0}')</script></html>".format(self.random_value)