diff options
Diffstat (limited to 'sw/qa/uitest/writer_tests7/tdf141557.py')
-rw-r--r-- | sw/qa/uitest/writer_tests7/tdf141557.py | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/sw/qa/uitest/writer_tests7/tdf141557.py b/sw/qa/uitest/writer_tests7/tdf141557.py index c641cd3e23f3..3d25c7908d99 100644 --- a/sw/qa/uitest/writer_tests7/tdf141557.py +++ b/sw/qa/uitest/writer_tests7/tdf141557.py @@ -12,29 +12,27 @@ from uitest.uihelper.common import get_url_for_data_file class tdf141557(UITestCase): def test_tdf141557(self): # load the sample file - self.ui_test.load_file(get_url_for_data_file("tdf141557.docx")) - xWriterDoc = self.xUITest.getTopFocusWindow() - xWriterEdit = xWriterDoc.getChild("writer_edit") - document = self.ui_test.get_component() + with self.ui_test.load_file(get_url_for_data_file("tdf141557.docx")): + xWriterDoc = self.xUITest.getTopFocusWindow() + xWriterEdit = xWriterDoc.getChild("writer_edit") + document = self.ui_test.get_component() - self.assertEqual(AS_CHARACTER, document.DrawPage.getByIndex(0).AnchorType) + self.assertEqual(AS_CHARACTER, document.DrawPage.getByIndex(0).AnchorType) - self.xUITest.executeCommand(".uno:JumpToNextFrame") + self.xUITest.executeCommand(".uno:JumpToNextFrame") - self.ui_test.wait_until_child_is_available('metricfield') + self.ui_test.wait_until_child_is_available('metricfield') - self.ui_test.execute_dialog_through_command(".uno:TransformDialog") + self.ui_test.execute_dialog_through_command(".uno:TransformDialog") - xDialog = self.xUITest.getTopFocusWindow() + xDialog = self.xUITest.getTopFocusWindow() - xDialog.getChild('topara').executeAction("CLICK", tuple()) + xDialog.getChild('topara').executeAction("CLICK", tuple()) - xOkBtn = xDialog.getChild("ok") - xOkBtn.executeAction("CLICK", tuple()) + xOkBtn = xDialog.getChild("ok") + xOkBtn.executeAction("CLICK", tuple()) - # Without the fix in place, at this point crash occurs. - self.assertEqual(AT_PARAGRAPH, document.DrawPage.getByIndex(0).AnchorType) - - self.ui_test.close_doc() + # Without the fix in place, at this point crash occurs. + self.assertEqual(AT_PARAGRAPH, document.DrawPage.getByIndex(0).AnchorType) # vim: set shiftwidth=4 softtabstop=4 expandtab: |