diff options
author | tagezi <lera.goncharuk@gmail.com> | 2022-05-27 13:00:39 +0300 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-30 09:48:46 +0200 |
commit | c3baf2a7f48b5ee46c6792b3106cb4fedb4a2ad2 (patch) | |
tree | ba3e8c1fcdf65307d892d4420f413b8770859c89 /sc | |
parent | 507a8871c25aa9b7e5a02ceb86f5c60ebccc722b (diff) |
sc uitests: Cleaning up unused variables
Removed unused variables in the 'with' statement as the syntax
allows the statement to be used without a variable.
Removed variables like 'xcomments' and 'xseedspin', which seem
to have been copied and not cleaned up.
Removed variables 'gridwin' and 'xCalcDoc' if 'gridwin' is not used.
Change-Id: Ia97692a0fb2e2af1d2693e09ac8f7c614360ade8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135042
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
106 files changed, 72 insertions, 325 deletions
diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py index bbfbbaab7118..f892d2f901a8 100644 --- a/sc/qa/uitest/autofilter/autofilter.py +++ b/sc/qa/uitest/autofilter/autofilter.py @@ -61,7 +61,7 @@ class AutofilterTest(UITestCase): self.assertFalse(is_row_hidden(doc, 4)) def test_tdf133160(self): - with self.ui_test.load_file(get_url_for_data_file("tdf133160.ods")) as doc: + with self.ui_test.load_file(get_url_for_data_file("tdf133160.ods")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "3"})) @@ -192,7 +192,7 @@ class AutofilterTest(UITestCase): def test_tdf89244(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -221,7 +221,7 @@ class AutofilterTest(UITestCase): def test_tdf116818(self): - with self.ui_test.load_file(get_url_for_data_file("tdf116818.xlsx")) as doc: + with self.ui_test.load_file(get_url_for_data_file("tdf116818.xlsx")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") @@ -250,7 +250,7 @@ class AutofilterTest(UITestCase): xOkBtn.executeAction("CLICK", tuple()) def test_tdf140469(self): - with self.ui_test.load_file(get_url_for_data_file("tdf140469.xlsx")) as doc: + with self.ui_test.load_file(get_url_for_data_file("tdf140469.xlsx")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") @@ -263,7 +263,7 @@ class AutofilterTest(UITestCase): xOkBtn.executeAction("CLICK", tuple()) def test_tdf140462(self): - with self.ui_test.load_file(get_url_for_data_file("tdf140462.ods")) as doc: + with self.ui_test.load_file(get_url_for_data_file("tdf140462.ods")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") @@ -292,7 +292,7 @@ class AutofilterTest(UITestCase): xOkBtn.executeAction("CLICK", tuple()) def test_tdf137626(self): - with self.ui_test.load_file(get_url_for_data_file("tdf137626.xlsx")) as doc: + with self.ui_test.load_file(get_url_for_data_file("tdf137626.xlsx")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") @@ -305,7 +305,7 @@ class AutofilterTest(UITestCase): xOkBtn.executeAction("CLICK", tuple()) def test_time_value(self): - with self.ui_test.load_file(get_url_for_data_file("time_value.xlsx")) as doc: + with self.ui_test.load_file(get_url_for_data_file("time_value.xlsx")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") diff --git a/sc/qa/uitest/autofilter/autofilterBugs.py b/sc/qa/uitest/autofilter/autofilterBugs.py index 2ba5478154ef..1a9d2261d631 100644 --- a/sc/qa/uitest/autofilter/autofilterBugs.py +++ b/sc/qa/uitest/autofilter/autofilterBugs.py @@ -68,7 +68,7 @@ class autofilter(UITestCase): #112656 def test_tdf112656(self): - with self.ui_test.load_file(get_url_for_data_file("tdf112656.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf112656.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -82,7 +82,7 @@ class autofilter(UITestCase): #tdf81124 def test_tdf81124(self): - with self.ui_test.load_file(get_url_for_data_file("tdf81124.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf81124.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -104,7 +104,7 @@ class autofilter(UITestCase): #tdf73565 def test_tdf73565(self): - with self.ui_test.load_file(get_url_for_data_file("tdf73565.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf73565.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -119,7 +119,7 @@ class autofilter(UITestCase): #tdf65505 def test_tdf65505(self): - with self.ui_test.load_file(get_url_for_data_file("tdf81124.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf81124.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -134,7 +134,7 @@ class autofilter(UITestCase): #tdf74857 def test_tdf74857(self): - with self.ui_test.load_file(get_url_for_data_file("tdf74857.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf74857.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -145,7 +145,7 @@ class autofilter(UITestCase): #tdf35294 def test_tdf35294(self): - with self.ui_test.load_file(get_url_for_data_file("tdf35294.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf35294.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -173,7 +173,7 @@ class autofilter(UITestCase): #tdf55712 def test_tdf55712(self): - with self.ui_test.load_file(get_url_for_data_file("tdf55712.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf55712.ods")): calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/autofilter2/tdf97340.py b/sc/qa/uitest/autofilter2/tdf97340.py index 92ca4de053b2..31e41ff6c358 100644 --- a/sc/qa/uitest/autofilter2/tdf97340.py +++ b/sc/qa/uitest/autofilter2/tdf97340.py @@ -14,7 +14,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf97340(UITestCase): def test_tdf97340_autofilter(self): - with self.ui_test.load_file(get_url_for_data_file("autofilter.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("autofilter.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/calc_tests/calcSheetDelete.py b/sc/qa/uitest/calc_tests/calcSheetDelete.py index e631f9dbac0f..3e9da3f516d4 100644 --- a/sc/qa/uitest/calc_tests/calcSheetDelete.py +++ b/sc/qa/uitest/calc_tests/calcSheetDelete.py @@ -72,9 +72,6 @@ class calcSheetDelete(UITestCase): def test_delete_more_sheets_at_once(self): with self.ui_test.create_doc_in_start_center("calc") as document: - - xCalcDoc = self.xUITest.getTopFocusWindow() - xGridWindow = xCalcDoc.getChild("grid_window") nrSheets = document.Sheets.getCount() #default number i = 0 while i < 6: @@ -103,9 +100,6 @@ class calcSheetDelete(UITestCase): def test_tdf105105_delete_lots_of_sheets_at_once(self): with self.ui_test.create_doc_in_start_center("calc") as document: - - xCalcDoc = self.xUITest.getTopFocusWindow() - xGridWindow = xCalcDoc.getChild("grid_window") nrSheets = document.Sheets.getCount() #default number i = 0 while i < 100: diff --git a/sc/qa/uitest/calc_tests/columns.py b/sc/qa/uitest/calc_tests/columns.py index 40856a350c8c..6813471d71fe 100644 --- a/sc/qa/uitest/calc_tests/columns.py +++ b/sc/qa/uitest/calc_tests/columns.py @@ -59,7 +59,6 @@ class CalcColumns(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") as xDialog: xvalue = xDialog.getChild("value") - xdefault = xDialog.getChild("default") #write your own value xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/calc_tests/formatCells.py b/sc/qa/uitest/calc_tests/formatCells.py index 86d844d1bc8b..4c3b892ddc3d 100644 --- a/sc/qa/uitest/calc_tests/formatCells.py +++ b/sc/qa/uitest/calc_tests/formatCells.py @@ -25,8 +25,6 @@ class formatCell(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers - xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format xdecimalsed = xDialog.getChild("decimalsed") xleadzerosed = xDialog.getChild("leadzerosed") xnegnumred = xDialog.getChild("negnumred") @@ -50,7 +48,6 @@ class formatCell(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format xdecimalsed = xDialog.getChild("decimalsed") xleadzerosed = xDialog.getChild("leadzerosed") xnegnumred = xDialog.getChild("negnumred") diff --git a/sc/qa/uitest/calc_tests/rows.py b/sc/qa/uitest/calc_tests/rows.py index e924bc1b3ede..fe65f72365cd 100644 --- a/sc/qa/uitest/calc_tests/rows.py +++ b/sc/qa/uitest/calc_tests/rows.py @@ -60,7 +60,6 @@ class CalcRows(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:RowHeight") as xDialog: xvalue = xDialog.getChild("value") - xdefault = xDialog.getChild("default") #write your own value xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/calc_tests/sheetRename.py b/sc/qa/uitest/calc_tests/sheetRename.py index c70aaee4c472..95317a111246 100644 --- a/sc/qa/uitest/calc_tests/sheetRename.py +++ b/sc/qa/uitest/calc_tests/sheetRename.py @@ -13,8 +13,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class sheetRename(UITestCase): def test_sheet_rename(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") with self.ui_test.execute_dialog_through_command(".uno:RenameTable") as xDialog: xname_entry = xDialog.getChild("name_entry") xname_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"NewName"})) @@ -26,8 +24,6 @@ class sheetRename(UITestCase): def test_sheet_rename_invalid_sheet_name(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") with self.ui_test.execute_dialog_through_command(".uno:RenameTable", close_button="") as xDialog: xname_entry = xDialog.getChild("name_entry") nameVal = get_state_as_dict(xname_entry)["Text"] diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py index 7493a66d0fe5..19da793c08ab 100644 --- a/sc/qa/uitest/calc_tests2/consolidate.py +++ b/sc/qa/uitest/calc_tests2/consolidate.py @@ -15,9 +15,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class consolidate(UITestCase): def test_consolidate(self): with self.ui_test.load_file(get_url_for_data_file("consolidate.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") as xDialog: xfunc = xDialog.getChild("func") xlbdataarea = xDialog.getChild("lbdataarea") diff --git a/sc/qa/uitest/calc_tests2/standardFilter.py b/sc/qa/uitest/calc_tests2/standardFilter.py index d3f8daffe3f0..76d89a3cd379 100644 --- a/sc/qa/uitest/calc_tests2/standardFilter.py +++ b/sc/qa/uitest/calc_tests2/standardFilter.py @@ -17,7 +17,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class standardFilter(UITestCase): def test_standard_filter(self): - with self.ui_test.load_file(get_url_for_data_file("standardFilter.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("standardFilter.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) diff --git a/sc/qa/uitest/calc_tests2/tdf104117.py b/sc/qa/uitest/calc_tests2/tdf104117.py index 448c5163d7ae..8287be14e61b 100644 --- a/sc/qa/uitest/calc_tests2/tdf104117.py +++ b/sc/qa/uitest/calc_tests2/tdf104117.py @@ -21,12 +21,7 @@ class tdf104117(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog") as xDialog: xcellrangeedit = xDialog.getChild("cell-range-edit") xdistributioncombo = xDialog.getChild("distribution-combo") - xparameter1spin = xDialog.getChild("parameter1-spin") xparameter2spin = xDialog.getChild("parameter2-spin") - xenableseedcheck = xDialog.getChild("enable-seed-check") - xseedspin = xDialog.getChild("seed-spin") - xenableroundingcheck = xDialog.getChild("enable-rounding-check") - xdecimalplacesspin = xDialog.getChild("decimal-places-spin") xcellrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$A$2"})) select_by_text(xdistributioncombo, "Uniform Integer") diff --git a/sc/qa/uitest/calc_tests2/tdf114992.py b/sc/qa/uitest/calc_tests2/tdf114992.py index b6105edcd875..6b3a97b0ec13 100644 --- a/sc/qa/uitest/calc_tests2/tdf114992.py +++ b/sc/qa/uitest/calc_tests2/tdf114992.py @@ -14,9 +14,6 @@ from uitest.uihelper.common import get_url_for_data_file class tdf114992(UITestCase): def test_tdf114992_delete_sheet_crash(self): with self.ui_test.load_file(get_url_for_data_file("tdf114992.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:Remove", close_button="yes"): pass diff --git a/sc/qa/uitest/calc_tests3/clearCells.py b/sc/qa/uitest/calc_tests3/clearCells.py index d2a424412047..45f161259f97 100644 --- a/sc/qa/uitest/calc_tests3/clearCells.py +++ b/sc/qa/uitest/calc_tests3/clearCells.py @@ -175,7 +175,7 @@ class clearCells(UITestCase): def test_clear_cells_formats(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") enter_text_to_cell(gridwin, "A1", "aa") @@ -230,13 +230,6 @@ class clearCells(UITestCase): self.xUITest.executeCommand(".uno:Bold") with self.ui_test.execute_dialog_through_command(".uno:Delete") as xDialog: xdeleteall = xDialog.getChild("deleteall") - xtext = xDialog.getChild("text") - xdatetime = xDialog.getChild("datetime") - xcomments = xDialog.getChild("comments") - xobjects = xDialog.getChild("objects") - xnumbers = xDialog.getChild("numbers") - xformulas = xDialog.getChild("formulas") - xformats = xDialog.getChild("formats") if (get_state_as_dict(xdeleteall)["Selected"]) == "false": xdeleteall.executeAction("CLICK", tuple()) diff --git a/sc/qa/uitest/calc_tests3/insertQrCodeGen.py b/sc/qa/uitest/calc_tests3/insertQrCodeGen.py index 7337962c23ba..a707d9918e58 100644 --- a/sc/qa/uitest/calc_tests3/insertQrCodeGen.py +++ b/sc/qa/uitest/calc_tests3/insertQrCodeGen.py @@ -14,9 +14,6 @@ class insertQrCode(UITestCase): def test_insert_qr_code_gen(self): with self.ui_test.create_doc_in_start_center("calc") as document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:InsertQrCode") as xDialog: # Get elements in the Dialog Box diff --git a/sc/qa/uitest/calc_tests3/tdf77509.py b/sc/qa/uitest/calc_tests3/tdf77509.py index ca5d78b9a4e4..0cbd4a65c867 100644 --- a/sc/qa/uitest/calc_tests3/tdf77509.py +++ b/sc/qa/uitest/calc_tests3/tdf77509.py @@ -28,8 +28,6 @@ class tdf77509(UITestCase): xeddataarea = xDialog.getChild("eddataarea") xadd = xDialog.getChild("add") xbyrow = xDialog.getChild("byrow") - xbycol = xDialog.getChild("bycol") - xeddestarea = xDialog.getChild("eddestarea") select_by_text(xfunc, "Sum") #4. Source data ranges: $Sheet1.$A$1:$B$7 diff --git a/sc/qa/uitest/calc_tests3/tdf80693.py b/sc/qa/uitest/calc_tests3/tdf80693.py index affae8e641b1..951c886fc9cf 100644 --- a/sc/qa/uitest/calc_tests3/tdf80693.py +++ b/sc/qa/uitest/calc_tests3/tdf80693.py @@ -23,10 +23,6 @@ class tdf80693(UITestCase): xdistributioncombo = xDialog.getChild("distribution-combo") xparameter1spin = xDialog.getChild("parameter1-spin") xparameter2spin = xDialog.getChild("parameter2-spin") - xenableseedcheck = xDialog.getChild("enable-seed-check") - xseedspin = xDialog.getChild("seed-spin") - xenableroundingcheck = xDialog.getChild("enable-rounding-check") - xdecimalplacesspin = xDialog.getChild("decimal-places-spin") xcellrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$A$2"})) select_by_text(xdistributioncombo, "Uniform") diff --git a/sc/qa/uitest/calc_tests4/tdf131170.py b/sc/qa/uitest/calc_tests4/tdf131170.py index e58fbadcabee..65bddc4fd699 100644 --- a/sc/qa/uitest/calc_tests4/tdf131170.py +++ b/sc/qa/uitest/calc_tests4/tdf131170.py @@ -11,9 +11,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file class tdf131170(UITestCase): def test_DefineLabelRange(self): - with self.ui_test.load_file(get_url_for_data_file("tdf131170.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + with self.ui_test.load_file(get_url_for_data_file("tdf131170.ods")): with self.ui_test.execute_dialog_through_command(".uno:DefineLabelRange") as xDialog: diff --git a/sc/qa/uitest/calc_tests4/tdf88999.py b/sc/qa/uitest/calc_tests4/tdf88999.py index e8aa827ba5ee..466a8559aba8 100644 --- a/sc/qa/uitest/calc_tests4/tdf88999.py +++ b/sc/qa/uitest/calc_tests4/tdf88999.py @@ -28,12 +28,8 @@ class tdf88999(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format xdecimalsed = xDialog.getChild("decimalsed") xleadzerosed = xDialog.getChild("leadzerosed") - xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") self.assertEqual(get_state_as_dict(xliststore1)["SelectEntryText"], "Scientific") diff --git a/sc/qa/uitest/calc_tests4/tdf89958.py b/sc/qa/uitest/calc_tests4/tdf89958.py index ab98aa2a5109..6f31939fb828 100644 --- a/sc/qa/uitest/calc_tests4/tdf89958.py +++ b/sc/qa/uitest/calc_tests4/tdf89958.py @@ -15,7 +15,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf89958(UITestCase): def test_td89958_standard_filter(self): - with self.ui_test.load_file(get_url_for_data_file("tdf89958.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf89958.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") #select A1-> Column .uno:SelectColumn diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py index f0bab2aa2678..de42128acaaf 100644 --- a/sc/qa/uitest/calc_tests4/trackedChanges.py +++ b/sc/qa/uitest/calc_tests4/trackedChanges.py @@ -19,8 +19,7 @@ import datetime class CalcTrackedChanges(UITestCase): def test_tdf131907(self): - with self.ui_test.load_file(get_url_for_data_file("tdf131907.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() + with self.ui_test.load_file(get_url_for_data_file("tdf131907.ods")): with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") @@ -41,10 +40,8 @@ class CalcTrackedChanges(UITestCase): def test_tdf66263_Protect_Records(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): self.ui_test.wait_until_child_is_available("grid_window") - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") self.xUITest.executeCommand(".uno:TraceChangeMode") #protect dialog with self.ui_test.execute_dialog_through_command(".uno:ProtectTraceChangeMode") as xDialog: diff --git a/sc/qa/uitest/calc_tests6/autocorrectOptions.py b/sc/qa/uitest/calc_tests6/autocorrectOptions.py index 88805c5e847b..e626ad93f43b 100644 --- a/sc/qa/uitest/calc_tests6/autocorrectOptions.py +++ b/sc/qa/uitest/calc_tests6/autocorrectOptions.py @@ -16,9 +16,6 @@ class autocorrectOptions(UITestCase): def test_autocorrect_options_calc(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg", close_button="cancel") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab replace @@ -27,7 +24,6 @@ class autocorrectOptions(UITestCase): xnew = xDialog.getChild("new") xdelete = xDialog.getChild("delete") xtabview = xDialog.getChild("tabview") - xreset = xDialog.getChild("reset") nrRows = get_state_as_dict(xtabview)["VisibleCount"] self.assertTrue(int(nrRows) > 0) diff --git a/sc/qa/uitest/calc_tests6/moveCopySheet.py b/sc/qa/uitest/calc_tests6/moveCopySheet.py index 41019b371a83..a80b7c329173 100644 --- a/sc/qa/uitest/calc_tests6/moveCopySheet.py +++ b/sc/qa/uitest/calc_tests6/moveCopySheet.py @@ -14,8 +14,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class moveCopySheet(UITestCase): def test_copy_move_sheet(self): with self.ui_test.create_doc_in_start_center("calc") as document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") #default - 1 sheet; select the sheet (is selected), dialog move/copy sheet with self.ui_test.execute_dialog_through_command(".uno:Move") as xDialog: #new name = newName @@ -67,7 +65,7 @@ class moveCopySheet(UITestCase): #tdf#139464 Set OK button label to selected action: Move or Copy def test_tdf139464_move_sheet(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): with self.ui_test.execute_dialog_through_command(".uno:Move") as xDialog: xOkButton = xDialog.getChild("ok") xCopyButton = xDialog.getChild("copy") diff --git a/sc/qa/uitest/calc_tests6/shareSpreadsheet.py b/sc/qa/uitest/calc_tests6/shareSpreadsheet.py index 7fcf7a58110a..265d4a2d14e1 100644 --- a/sc/qa/uitest/calc_tests6/shareSpreadsheet.py +++ b/sc/qa/uitest/calc_tests6/shareSpreadsheet.py @@ -16,9 +16,6 @@ class shareSpreadsheet(UITestCase): def test_share_spreadsheet(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - xGridWindow = xCalcDoc.getChild("grid_window") - #dialog shareSpreadsheet with self.ui_test.execute_dialog_through_command(".uno:ShareDocument", close_button="cancel") as xDialog: diff --git a/sc/qa/uitest/calc_tests6/tdf116996.py b/sc/qa/uitest/calc_tests6/tdf116996.py index e1f55de66056..7e3f4e61c43b 100644 --- a/sc/qa/uitest/calc_tests6/tdf116996.py +++ b/sc/qa/uitest/calc_tests6/tdf116996.py @@ -14,9 +14,6 @@ from uitest.uihelper.common import get_state_as_dict class tdf116996(UITestCase): def test_tdf116996_enable_experimental_feature(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog", close_button="") as xDialogOpt: xPages = xDialogOpt.getChild("pages") xLOEntry = xPages.getChild('0') # Libreoffice diff --git a/sc/qa/uitest/calc_tests7/tdf106667.py b/sc/qa/uitest/calc_tests7/tdf106667.py index 2de330ed615d..8d3c4599ce9b 100644 --- a/sc/qa/uitest/calc_tests7/tdf106667.py +++ b/sc/qa/uitest/calc_tests7/tdf106667.py @@ -26,7 +26,7 @@ class tdf106667(UITestCase): self.xUITest.executeCommand(".uno:SelectAll") - with self.ui_test.execute_dialog_through_command(".uno:About", close_button="btnClose") as xAboutDlg: + with self.ui_test.execute_dialog_through_command(".uno:About", close_button="btnClose"): pass self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") diff --git a/sc/qa/uitest/calc_tests7/tdf122509.py b/sc/qa/uitest/calc_tests7/tdf122509.py index ed5d2b03ff9b..c0d9f5a2a982 100644 --- a/sc/qa/uitest/calc_tests7/tdf122509.py +++ b/sc/qa/uitest/calc_tests7/tdf122509.py @@ -26,13 +26,7 @@ class tdf122509(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers - xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format - xdecimalsed = xDialog.getChild("decimalsed") - xleadzerosed = xDialog.getChild("leadzerosed") xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") self.assertEqual(get_state_as_dict(xformatted)["Text"], "#,##0.00 [$USD];[RED]-#,##0.00 [$USD]") diff --git a/sc/qa/uitest/calc_tests7/tdf123122.py b/sc/qa/uitest/calc_tests7/tdf123122.py index c4e7ef256bee..8d1d6daebcc7 100644 --- a/sc/qa/uitest/calc_tests7/tdf123122.py +++ b/sc/qa/uitest/calc_tests7/tdf123122.py @@ -25,13 +25,6 @@ class tdf123122(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers - xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format - xdecimalsed = xDialog.getChild("decimalsed") - xleadzerosed = xDialog.getChild("leadzerosed") - xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") #Format cells and enter NN MMM DD YYYY HH:MM as format code @@ -46,12 +39,6 @@ class tdf123122(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format - xdecimalsed = xDialog.getChild("decimalsed") - xleadzerosed = xDialog.getChild("leadzerosed") - xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") diff --git a/sc/qa/uitest/calc_tests7/tdf124896.py b/sc/qa/uitest/calc_tests7/tdf124896.py index 4beeff9baad0..44c6ba4b28a1 100644 --- a/sc/qa/uitest/calc_tests7/tdf124896.py +++ b/sc/qa/uitest/calc_tests7/tdf124896.py @@ -14,11 +14,8 @@ from uitest.uihelper.common import get_url_for_data_file class tdf124896(UITestCase): def test_tdf124896_crash_delete_sheet(self): with self.ui_test.load_file(get_url_for_data_file("tdf124896.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - # Remove X Bar R Chart (2) sheet - with self.ui_test.execute_dialog_through_command(".uno:Remove", close_button="yes") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:Remove", close_button="yes"): pass #verify; no crashes diff --git a/sc/qa/uitest/calc_tests7/tdf137397.py b/sc/qa/uitest/calc_tests7/tdf137397.py index a7141dacf473..c98a706d20ed 100644 --- a/sc/qa/uitest/calc_tests7/tdf137397.py +++ b/sc/qa/uitest/calc_tests7/tdf137397.py @@ -15,7 +15,7 @@ class tdf137397(UITestCase): def test_tdf137397(self): - with self.ui_test.load_file(get_url_for_data_file("tdf137397.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf137397.ods")): change_measurement_unit(self, 'Centimeter') diff --git a/sc/qa/uitest/calc_tests8/tdf124829.py b/sc/qa/uitest/calc_tests8/tdf124829.py index 43e90d1f818c..f515b265f9a3 100644 --- a/sc/qa/uitest/calc_tests8/tdf124829.py +++ b/sc/qa/uitest/calc_tests8/tdf124829.py @@ -15,9 +15,6 @@ class tdf124829(UITestCase): def test_tdf124829_Crash_cutting_undo_sheet_external_links(self): #numberingformatpage.ui with self.ui_test.load_file(get_url_for_data_file("tdf124829.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:Cut") for i in range(40): diff --git a/sc/qa/uitest/calc_tests8/tdf125051.py b/sc/qa/uitest/calc_tests8/tdf125051.py index b1ece2a319c6..5b8ccd15bb03 100644 --- a/sc/qa/uitest/calc_tests8/tdf125051.py +++ b/sc/qa/uitest/calc_tests8/tdf125051.py @@ -21,10 +21,9 @@ class tdf125051(UITestCase): gridwin = xCalcDoc.getChild("grid_window") enter_text_to_cell(gridwin, "A1", "text") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) - with self.ui_test.execute_dialog_through_command(".uno:SpellDialog") as xDialog2: + with self.ui_test.execute_dialog_through_command(".uno:SpellDialog"): pass - xDialog = self.xUITest.getTopFocusWindow() #Spelling dialog #open options optionsBtn = xDialog.getChild("options") diff --git a/sc/qa/uitest/calc_tests8/tdf137726.py b/sc/qa/uitest/calc_tests8/tdf137726.py index b381277bfa34..d80b51b6dcf2 100644 --- a/sc/qa/uitest/calc_tests8/tdf137726.py +++ b/sc/qa/uitest/calc_tests8/tdf137726.py @@ -12,11 +12,8 @@ class tdf137726(UITestCase): def test_tdf137726(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - # three dialogs are displayed one after the other, click OK in all of them - with self.ui_test.execute_dialog_through_command(".uno:DataDataPilotRun") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:DataDataPilotRun"): pass for i in range(2): diff --git a/sc/qa/uitest/calc_tests9/hashIncompatible.py b/sc/qa/uitest/calc_tests9/hashIncompatible.py index 9e6828ba9e4e..07ab21db8eef 100644 --- a/sc/qa/uitest/calc_tests9/hashIncompatible.py +++ b/sc/qa/uitest/calc_tests9/hashIncompatible.py @@ -21,7 +21,7 @@ class hashIncompatible(UITestCase): with TemporaryDirectory() as tempdir: xFilePath = os.path.join(tempdir, "hashIncompatible-temp.ods") - with self.ui_test.load_file(get_url_for_data_file("hashIncompatible.xlsx")) as document: + with self.ui_test.load_file(get_url_for_data_file("hashIncompatible.xlsx")): # Save the XLSX document as ODS with a sheet protected with an unsupported hash format with self.ui_test.execute_dialog_through_command(".uno:SaveAs", close_button="") as xSaveDialog: diff --git a/sc/qa/uitest/calc_tests9/tdf118938.py b/sc/qa/uitest/calc_tests9/tdf118938.py index e80651ea237d..eede90451e67 100644 --- a/sc/qa/uitest/calc_tests9/tdf118938.py +++ b/sc/qa/uitest/calc_tests9/tdf118938.py @@ -18,9 +18,6 @@ class tdf118938(UITestCase): def test_tdf118938(self): with self.ui_test.load_file(get_url_for_data_file("tdf118938.xlsx")): #The document was created in Calc after this fix. - calcDoc = self.xUITest.getTopFocusWindow() - gridwin = calcDoc.getChild("grid_window") - document = self.ui_test.get_component() # Without the fix in place, this test would have failed with diff --git a/sc/qa/uitest/calc_tests9/tdf124318.py b/sc/qa/uitest/calc_tests9/tdf124318.py index e603485a34ef..9fae2d5b4eaf 100644 --- a/sc/qa/uitest/calc_tests9/tdf124318.py +++ b/sc/qa/uitest/calc_tests9/tdf124318.py @@ -14,7 +14,7 @@ class tdf124318(UITestCase): def test_tdf124318(self): - with self.ui_test.load_file(get_url_for_data_file("tdf124318.xls")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf124318.xls")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/calc_tests9/tdf125440.py b/sc/qa/uitest/calc_tests9/tdf125440.py index a6ce59d271dd..a5319d5826a6 100644 --- a/sc/qa/uitest/calc_tests9/tdf125440.py +++ b/sc/qa/uitest/calc_tests9/tdf125440.py @@ -17,7 +17,7 @@ class Tdf1254400(UITestCase): def test_tdf125440(self): # In order to simulate copy&paste from external source, # import the text in Writer, copy it and paste it in Calc - with self.ui_test.load_file(get_url_for_data_file("tdf125440.odt")) as writer_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf125440.odt")): self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:Copy") @@ -38,4 +38,4 @@ class Tdf1254400(UITestCase): self.assertEqual("", get_cell_by_position(calc_document, 0, 2, 0).getString()) self.assertEqual("50", get_cell_by_position(calc_document, 0, 3, 0).getString()) -# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests9/tdf126673.py b/sc/qa/uitest/calc_tests9/tdf126673.py index e8faa073d454..7d60d5195b32 100644 --- a/sc/qa/uitest/calc_tests9/tdf126673.py +++ b/sc/qa/uitest/calc_tests9/tdf126673.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 126673 - Calc: Auto-fit column and auto-fit row don't work with line break class tdf126673(UITestCase): def test_tdf126673_auto_fit_row_height(self): - with self.ui_test.load_file(get_url_for_data_file("tdf126673.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf126673.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/calc_tests9/tdf130371.py b/sc/qa/uitest/calc_tests9/tdf130371.py index 46cf273402a8..8e7c09159328 100644 --- a/sc/qa/uitest/calc_tests9/tdf130371.py +++ b/sc/qa/uitest/calc_tests9/tdf130371.py @@ -14,7 +14,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file class namedRanges(UITestCase): def test_tdf130371(self): - with self.ui_test.load_file(get_url_for_data_file("tdf130371.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf130371.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/calc_tests9/tdf133629.py b/sc/qa/uitest/calc_tests9/tdf133629.py index 337744404c2e..8b28fcb991fd 100644 --- a/sc/qa/uitest/calc_tests9/tdf133629.py +++ b/sc/qa/uitest/calc_tests9/tdf133629.py @@ -14,9 +14,6 @@ class tdf133629(UITestCase): def test_tdf133629(self): with self.ui_test.create_doc_in_start_center("calc") as document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:Insert"): pass diff --git a/sc/qa/uitest/calc_tests9/tdf137446.py b/sc/qa/uitest/calc_tests9/tdf137446.py index bbaf4efe6cb2..e6aa046678fc 100644 --- a/sc/qa/uitest/calc_tests9/tdf137446.py +++ b/sc/qa/uitest/calc_tests9/tdf137446.py @@ -15,7 +15,7 @@ class tdf137446(UITestCase): def test_tdf137446(self): - with self.ui_test.load_file(get_url_for_data_file("tdf137446.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf137446.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartAxes.py b/sc/qa/uitest/chart/chartAxes.py index 07cf1a349c20..a4ca1d8a1c35 100644 --- a/sc/qa/uitest/chart/chartAxes.py +++ b/sc/qa/uitest/chart/chartAxes.py @@ -15,7 +15,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Chart Enable Axes dialog class chartAxes(UITestCase): def test_chart_enable_grids_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartDataLabels.py b/sc/qa/uitest/chart/chartDataLabels.py index 5eaad0a766ed..132f7ae2c656 100644 --- a/sc/qa/uitest/chart/chartDataLabels.py +++ b/sc/qa/uitest/chart/chartDataLabels.py @@ -45,7 +45,6 @@ class chartDataLabels(UITestCase): self.assertFalse(xDataSeries[0].Label.ShowLegendSymbol) self.assertEqual(xDataSeries[0].LabelSeparator, " ") - valueAsNumber = xDialog.getChild("CB_VALUE_AS_NUMBER") category = xDialog.getChild("CB_CATEGORY") legend = xDialog.getChild("CB_SYMBOL") wrapText = xDialog.getChild("CB_WRAP_TEXT") @@ -137,13 +136,6 @@ class chartDataLabels(UITestCase): valueAsNumber = xDialog.getChild("CB_VALUE_AS_NUMBER") valueAsPercentage = xDialog.getChild("CB_VALUE_AS_PERCENTAGE") - category = xDialog.getChild("CB_CATEGORY") - legend = xDialog.getChild("CB_SYMBOL") - wrapText = xDialog.getChild("CB_WRAP_TEXT") - separator = xDialog.getChild("LB_TEXT_SEPARATOR") - placement = xDialog.getChild("LB_LABEL_PLACEMENT") - degrees = xDialog.getChild("NF_LABEL_DEGREES") - textDirection = xDialog.getChild("LB_LABEL_TEXTDIR") buttonPercentage = xDialog.getChild("PB_PERCENT_NUMBERFORMAT") valueAsNumber.executeAction("CLICK", tuple()) @@ -194,19 +186,10 @@ class chartDataLabels(UITestCase): valueAsNumber = xDialog.getChild("CB_VALUE_AS_NUMBER") valueAsPercentage = xDialog.getChild("CB_VALUE_AS_PERCENTAGE") - category = xDialog.getChild("CB_CATEGORY") - legend = xDialog.getChild("CB_SYMBOL") - wrapText = xDialog.getChild("CB_WRAP_TEXT") - separator = xDialog.getChild("LB_TEXT_SEPARATOR") - placement = xDialog.getChild("LB_LABEL_PLACEMENT") - degrees = xDialog.getChild("NF_LABEL_DEGREES") - textDirection = xDialog.getChild("LB_LABEL_TEXTDIR") - buttonPercentage = xDialog.getChild("PB_PERCENT_NUMBERFORMAT") self.assertEqual(get_state_as_dict(valueAsNumber)["Selected"], "false") self.assertEqual(get_state_as_dict(valueAsPercentage)["Selected"], "true") - self.assertFalse(xDataSeries[0].Label.ShowNumber) self.assertTrue(xDataSeries[0].Label.ShowNumberInPercent) self.assertEqual(xDataSeries[0].PercentageNumberFormat, xFormat) @@ -272,7 +255,7 @@ class chartDataLabels(UITestCase): self.assertEqual(xDataSeries[0].NumberFormat, xFormat) def test_tdf136573(self): - with self.ui_test.load_file(get_url_for_data_file("dataLabels.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("dataLabels.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartGrid.py b/sc/qa/uitest/chart/chartGrid.py index 0fc680a8b708..c54e03637ee7 100644 --- a/sc/qa/uitest/chart/chartGrid.py +++ b/sc/qa/uitest/chart/chartGrid.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 98390 - Crash when modifying minor grid class chartGrid(UITestCase): def test_tdf98390_chart_grid_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartGrids.py b/sc/qa/uitest/chart/chartGrids.py index ba25f1662d26..781486b15db4 100644 --- a/sc/qa/uitest/chart/chartGrids.py +++ b/sc/qa/uitest/chart/chartGrids.py @@ -15,7 +15,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Chart Enable Grids dialog class chartGrids(UITestCase): def test_chart_enable_grids_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartLegend.py b/sc/qa/uitest/chart/chartLegend.py index 07c257b1bc36..45938e23017d 100644 --- a/sc/qa/uitest/chart/chartLegend.py +++ b/sc/qa/uitest/chart/chartLegend.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Chart Display Legend dialog class chartLegend(UITestCase): def test_chart_display_legend_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -27,9 +27,6 @@ class chartLegend(UITestCase): xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0") with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "InsertMenuLegend"})) as xDialog: left = xDialog.getChild("left") - right = xDialog.getChild("right") - top = xDialog.getChild("top") - bottom = xDialog.getChild("bottom") left.executeAction("CLICK", tuple()) @@ -75,7 +72,7 @@ class chartLegend(UITestCase): def test_legends_move_with_arrows_keys(self): - with self.ui_test.load_file(get_url_for_data_file("dataLabels.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("dataLabels.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartTitles.py b/sc/qa/uitest/chart/chartTitles.py index abf521806455..cd1955b670e4 100644 --- a/sc/qa/uitest/chart/chartTitles.py +++ b/sc/qa/uitest/chart/chartTitles.py @@ -85,7 +85,7 @@ class chartTitles(UITestCase): def test_title_move_with_arrows_keys(self): - with self.ui_test.load_file(get_url_for_data_file("chartArea.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("chartArea.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartXAxis.py b/sc/qa/uitest/chart/chartXAxis.py index eafb350862f7..ea1878e4860f 100644 --- a/sc/qa/uitest/chart/chartXAxis.py +++ b/sc/qa/uitest/chart/chartXAxis.py @@ -17,7 +17,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Chart - X Axis class chartXAxis(UITestCase): def test_chart_x_axis_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/chartYAxis.py b/sc/qa/uitest/chart/chartYAxis.py index 8b0e42d643a5..ba1dbeb75a58 100644 --- a/sc/qa/uitest/chart/chartYAxis.py +++ b/sc/qa/uitest/chart/chartYAxis.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Chart - Y Axis class chartYAxis(UITestCase): def test_chart_y_axis_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart/formatDataSeries.py b/sc/qa/uitest/chart/formatDataSeries.py index b6ba762b2370..f21c3076f291 100644 --- a/sc/qa/uitest/chart/formatDataSeries.py +++ b/sc/qa/uitest/chart/formatDataSeries.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # test Chart - Data series dialog /core/chart2/uiconfig/ui/tp_SeriesToAxis.ui class chartFormatDataSeries(UITestCase): def test_chart_format_data_series_dialog(self): - with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -32,11 +32,8 @@ class chartFormatDataSeries(UITestCase): tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "0") - primaryYAxis = xDialog.getChild("RBT_OPT_AXIS_1") secondaryYAxis = xDialog.getChild("RBT_OPT_AXIS_2") leaveGap = xDialog.getChild("RB_DONT_PAINT") - assumeZero = xDialog.getChild("RB_ASSUME_ZERO") - continueLine = xDialog.getChild("RB_CONTINUE_LINE") includeHiddenCells = xDialog.getChild("CB_INCLUDE_HIDDEN_CELLS") hideLegend = xDialog.getChild("CB_LEGEND_ENTRY_HIDDEN") @@ -69,11 +66,8 @@ class chartFormatDataSeries(UITestCase): tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "0") - primaryYAxis = xDialog.getChild("RBT_OPT_AXIS_1") secondaryYAxis = xDialog.getChild("RBT_OPT_AXIS_2") leaveGap = xDialog.getChild("RB_DONT_PAINT") - assumeZero = xDialog.getChild("RB_ASSUME_ZERO") - continueLine = xDialog.getChild("RB_CONTINUE_LINE") includeHiddenCells = xDialog.getChild("CB_INCLUDE_HIDDEN_CELLS") hideLegend = xDialog.getChild("CB_LEGEND_ENTRY_HIDDEN") diff --git a/sc/qa/uitest/chart2/tdf101894.py b/sc/qa/uitest/chart2/tdf101894.py index 83b91540c4fc..1beca011c02e 100644 --- a/sc/qa/uitest/chart2/tdf101894.py +++ b/sc/qa/uitest/chart2/tdf101894.py @@ -16,10 +16,6 @@ class tdf101894(UITestCase): def test_tdf101894(self): with self.ui_test.load_file(get_url_for_data_file("tdf101894.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - - xChart = calc_doc.Sheets[0].Charts[0] xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries diff --git a/sc/qa/uitest/chart2/tdf122398.py b/sc/qa/uitest/chart2/tdf122398.py index dc054c190f4e..7f41c428f1af 100644 --- a/sc/qa/uitest/chart2/tdf122398.py +++ b/sc/qa/uitest/chart2/tdf122398.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 122398 - UI: Cannot specify min/max in axis scale or axis position. Limited between 0 and 100 class tdf122398(UITestCase): def test_tdf122398_chart_min_max_x_axis(self): - with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/chart2/tdf123013.py b/sc/qa/uitest/chart2/tdf123013.py index 4f8e104ba8de..d7a0b32c87dd 100644 --- a/sc/qa/uitest/chart2/tdf123013.py +++ b/sc/qa/uitest/chart2/tdf123013.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 123013 - Can not change Trendline name in charts class tdf123013(UITestCase): def test_tdf96432_chart_trendline_name(self): - with self.ui_test.load_file(get_url_for_data_file("tdf123013.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf123013.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) diff --git a/sc/qa/uitest/chart2/tdf123231.py b/sc/qa/uitest/chart2/tdf123231.py index d850abc2ec7f..86c31f74f45e 100644 --- a/sc/qa/uitest/chart2/tdf123231.py +++ b/sc/qa/uitest/chart2/tdf123231.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 123231 - Chart set trendline format regression type Power twice class tdf123231(UITestCase): def test_tdf123231_chart_trendline_dialog_power(self): - with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -30,13 +30,10 @@ class tdf123231(UITestCase): #Click on tab "Type". tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "0") - logarithmic = xDialog.getChild("logarithmic") #type regression logarithmic - exponential = xDialog.getChild("exponential") #type regression exponential power = xDialog.getChild("exponential") #type regression power power.executeAction("CLICK", tuple()) #set power - #reopen dialog and close dialog gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) @@ -47,8 +44,6 @@ class tdf123231(UITestCase): #Click on tab "Type". tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "0") - logarithmic = xDialog.getChild("logarithmic") #type regression logarithmic - exponential = xDialog.getChild("exponential") #type regression exponential power = xDialog.getChild("exponential") #type regression power self.assertEqual(get_state_as_dict(power)["Checked"], "true") @@ -62,9 +57,6 @@ class tdf123231(UITestCase): #Click on tab "Type". tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "0") - - logarithmic = xDialog.getChild("logarithmic") #type regression logarithmic - exponential = xDialog.getChild("exponential") #type regression exponential power = xDialog.getChild("exponential") #type regression power self.assertEqual(get_state_as_dict(power)["Checked"], "true") diff --git a/sc/qa/uitest/chart2/tdf123520.py b/sc/qa/uitest/chart2/tdf123520.py index b3ac7a3b13e4..6854ef044900 100644 --- a/sc/qa/uitest/chart2/tdf123520.py +++ b/sc/qa/uitest/chart2/tdf123520.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 123520 - Y axis - positioning tab, textbox "Cross other axis at" date changed class tdf123520(UITestCase): def test_tdf123520_chart_y_cross_other_axis(self): - with self.ui_test.load_file(get_url_for_data_file("tdf123520.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf123520.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -30,14 +30,8 @@ class tdf123520(UITestCase): tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "1") - crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT") crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value placeLabels = xDialog.getChild("LB_PLACE_LABELS") - innerMajorTick = xDialog.getChild("CB_TICKS_INNER") - outerMajorTick = xDialog.getChild("CB_TICKS_OUTER") - innerMinorTick = xDialog.getChild("CB_MINOR_INNER") - outerMinorTick = xDialog.getChild("CB_MINOR_OUTER") - placeMarks = xDialog.getChild("LB_PLACE_TICKS") crossAxisValue.executeAction("CLEAR", tuple()) crossAxisValue.executeAction("TYPE", mkPropertyValues({"TEXT":"01.01.2018"})) #crossAxisValue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"TAB"})) @@ -59,11 +53,6 @@ class tdf123520(UITestCase): crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT") crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value placeLabels = xDialog.getChild("LB_PLACE_LABELS") - innerMajorTick = xDialog.getChild("CB_TICKS_INNER") - outerMajorTick = xDialog.getChild("CB_TICKS_OUTER") - innerMinorTick = xDialog.getChild("CB_MINOR_INNER") - outerMinorTick = xDialog.getChild("CB_MINOR_OUTER") - placeMarks = xDialog.getChild("LB_PLACE_TICKS") self.assertEqual(get_state_as_dict(crossAxis)["SelectEntryText"], "Value") self.assertEqual(get_state_as_dict(crossAxisValue)["Text"], "01.01.2018") diff --git a/sc/qa/uitest/chart2/tdf124111.py b/sc/qa/uitest/chart2/tdf124111.py index 9ec377898090..91fac95e0ab4 100644 --- a/sc/qa/uitest/chart2/tdf124111.py +++ b/sc/qa/uitest/chart2/tdf124111.py @@ -16,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 124111 - Cannot enter negative number for cross other axis at value class tdf124111(UITestCase): def test_tdf124111_chart_x_negative_cross(self): - with self.ui_test.load_file(get_url_for_data_file("tdf124111.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf124111.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -30,17 +30,9 @@ class tdf124111(UITestCase): tabcontrol = xDialog.getChild("tabcontrol") select_pos(tabcontrol, "1") - crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT") crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value - placeLabels = xDialog.getChild("LB_PLACE_LABELS") - innerMajorTick = xDialog.getChild("CB_TICKS_INNER") - outerMajorTick = xDialog.getChild("CB_TICKS_OUTER") - innerMinorTick = xDialog.getChild("CB_MINOR_INNER") - outerMinorTick = xDialog.getChild("CB_MINOR_OUTER") - placeMarks = xDialog.getChild("LB_PLACE_TICKS") crossAxisValue.executeAction("DOWN", tuple()) #-1 - #reopen and verify tab "positioning". gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) @@ -54,12 +46,6 @@ class tdf124111(UITestCase): crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT") crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value - placeLabels = xDialog.getChild("LB_PLACE_LABELS") - innerMajorTick = xDialog.getChild("CB_TICKS_INNER") - outerMajorTick = xDialog.getChild("CB_TICKS_OUTER") - innerMinorTick = xDialog.getChild("CB_MINOR_INNER") - outerMinorTick = xDialog.getChild("CB_MINOR_OUTER") - placeMarks = xDialog.getChild("LB_PLACE_TICKS") self.assertEqual(get_state_as_dict(crossAxis)["SelectEntryText"], "Value") self.assertEqual(get_state_as_dict(crossAxisValue)["Text"], "-1") diff --git a/sc/qa/uitest/chart2/tdf136011.py b/sc/qa/uitest/chart2/tdf136011.py index 973d24707860..a5ea560e5cbe 100644 --- a/sc/qa/uitest/chart2/tdf136011.py +++ b/sc/qa/uitest/chart2/tdf136011.py @@ -24,7 +24,7 @@ class tdf136011(UITestCase): # Test both charts for i, name in enumerate(xObjectNames): - with self.ui_test.load_file(get_url_for_data_file("tdf136011.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf136011.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -38,9 +38,6 @@ class tdf136011(UITestCase): self.xUITest.executeCommand(".uno:Copy") with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - self.xUITest.executeCommand(".uno:Paste") xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data diff --git a/sc/qa/uitest/conditional_format/tdf105544.py b/sc/qa/uitest/conditional_format/tdf105544.py index d89f518187e2..b172d4067a1d 100644 --- a/sc/qa/uitest/conditional_format/tdf105544.py +++ b/sc/qa/uitest/conditional_format/tdf105544.py @@ -17,7 +17,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf105544(UITestCase): def test_tdf105544_Manage_Conditional_Formatting_edit_condition(self): - with self.ui_test.load_file(get_url_for_data_file("tdf105544.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf105544.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") #2. select B3. Format> conditional formatting> manage diff --git a/sc/qa/uitest/conditional_format/tdf117899.py b/sc/qa/uitest/conditional_format/tdf117899.py index 12a9b7697df5..4176afc00278 100644 --- a/sc/qa/uitest/conditional_format/tdf117899.py +++ b/sc/qa/uitest/conditional_format/tdf117899.py @@ -59,10 +59,6 @@ class Tdf117899(UITestCase): self.ui_test.wait_until_file_is_available(xFilePath) with self.ui_test.load_file(systemPathToFileUrl(xFilePath)): - - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - # Without the fix in place, this test would have failed here self.execute_conditional_format_manager_dialog() diff --git a/sc/qa/uitest/conditional_format/tdf119178.py b/sc/qa/uitest/conditional_format/tdf119178.py index 28b770ed3021..04a30fc5169b 100644 --- a/sc/qa/uitest/conditional_format/tdf119178.py +++ b/sc/qa/uitest/conditional_format/tdf119178.py @@ -15,7 +15,7 @@ class tdf119178(UITestCase): def test_tdf119178(self): - with self.ui_test.create_doc_in_start_center("calc") as calc_doc: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/conditional_format/tdf124412.py b/sc/qa/uitest/conditional_format/tdf124412.py index aac0d2a9b3a7..3a2b4571270d 100644 --- a/sc/qa/uitest/conditional_format/tdf124412.py +++ b/sc/qa/uitest/conditional_format/tdf124412.py @@ -15,7 +15,7 @@ class tdf124412(UITestCase): def test_tdf124412(self): - with self.ui_test.load_file(get_url_for_data_file("tdf124412.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf124412.ods")): xTopWindow = self.xUITest.getTopFocusWindow() gridwin = xTopWindow.getChild("grid_window") diff --git a/sc/qa/uitest/conditional_format/tdf81696.py b/sc/qa/uitest/conditional_format/tdf81696.py index f61e1d3ab138..0c03d6fcd290 100644 --- a/sc/qa/uitest/conditional_format/tdf81696.py +++ b/sc/qa/uitest/conditional_format/tdf81696.py @@ -25,7 +25,6 @@ class tdf81696(UITestCase): #Open sort dialog by DATA - SORT,Just sort it by Column A, ascending. (it's default) with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - xleftright = xDialog.getChild("rbLeftRight") select_pos(xTabs, "0") #verify diff --git a/sc/qa/uitest/csv_dialog/tdf39716.py b/sc/qa/uitest/csv_dialog/tdf39716.py index 13e7c30a61b9..395596602aaf 100644 --- a/sc/qa/uitest/csv_dialog/tdf39716.py +++ b/sc/qa/uitest/csv_dialog/tdf39716.py @@ -16,7 +16,7 @@ class Tdf39716(UITestCase): def test_tdf39716(self): - with load_csv_file(self, "tdf39716.csv", True) as xDialog: + with load_csv_file(self, "tdf39716.csv", True): pass document = self.ui_test.get_component() diff --git a/sc/qa/uitest/function_wizard/tdf37864.py b/sc/qa/uitest/function_wizard/tdf37864.py index f38f55f526f9..b38b550fc604 100644 --- a/sc/qa/uitest/function_wizard/tdf37864.py +++ b/sc/qa/uitest/function_wizard/tdf37864.py @@ -15,7 +15,7 @@ class tdf37864(UITestCase): def test_tdf37864(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") enter_text_to_cell(gridwin, "A1", "test") diff --git a/sc/qa/uitest/goalSeek/goalSeek.py b/sc/qa/uitest/goalSeek/goalSeek.py index 48f3524b88c2..a238ea8c5fee 100644 --- a/sc/qa/uitest/goalSeek/goalSeek.py +++ b/sc/qa/uitest/goalSeek/goalSeek.py @@ -20,7 +20,6 @@ class goalSeek(UITestCase): gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) with self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog", close_button="") as xDialog: - xformulaedit = xDialog.getChild("formulaedit") xtarget = xDialog.getChild("target") xvaredit = xDialog.getChild("varedit") xtarget.executeAction("TYPE", mkPropertyValues({"TEXT":"15000"})) diff --git a/sc/qa/uitest/goalSeek/tdf37341.py b/sc/qa/uitest/goalSeek/tdf37341.py index 14f7aae15511..ad1a1f1792e6 100644 --- a/sc/qa/uitest/goalSeek/tdf37341.py +++ b/sc/qa/uitest/goalSeek/tdf37341.py @@ -21,7 +21,6 @@ class tdf37341(UITestCase): gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "F111"})) with self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog", close_button="") as xDialog: - xformulaedit = xDialog.getChild("formulaedit") xtarget = xDialog.getChild("target") xvaredit = xDialog.getChild("varedit") xtarget.executeAction("TYPE", mkPropertyValues({"TEXT":"0"})) diff --git a/sc/qa/uitest/goalSeek/tdf43693.py b/sc/qa/uitest/goalSeek/tdf43693.py index f36fd032f6b2..3c0436ef7239 100644 --- a/sc/qa/uitest/goalSeek/tdf43693.py +++ b/sc/qa/uitest/goalSeek/tdf43693.py @@ -21,7 +21,6 @@ class tdf43693(UITestCase): gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "K248"})) with self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog", close_button="") as xDialog: - xformulaedit = xDialog.getChild("formulaedit") xtarget = xDialog.getChild("target") xvaredit = xDialog.getChild("varedit") xtarget.executeAction("TYPE", mkPropertyValues({"TEXT":"0"})) diff --git a/sc/qa/uitest/manual_tests/calc.py b/sc/qa/uitest/manual_tests/calc.py index 374bd6f93820..574e3433377a 100644 --- a/sc/qa/uitest/manual_tests/calc.py +++ b/sc/qa/uitest/manual_tests/calc.py @@ -18,7 +18,7 @@ class ManualCalcTests(UITestCase): # http://manual-test.libreoffice.org/manage/case/189/ def test_define_database_range(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): # Select range A1:D10 xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") @@ -86,7 +86,7 @@ class ManualCalcTests(UITestCase): # http://manual-test.libreoffice.org/manage/case/191/ def test_validation(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C10"})) diff --git a/sc/qa/uitest/options/tdf122977.py b/sc/qa/uitest/options/tdf122977.py index 0b3327fe1624..8d71b195a9d6 100644 --- a/sc/qa/uitest/options/tdf122977.py +++ b/sc/qa/uitest/options/tdf122977.py @@ -14,9 +14,6 @@ from uitest.uihelper.common import get_state_as_dict class chartDefaultColors(UITestCase): def test_tdf122977_crash_chart_default_colors_options(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - #Go to Tools -> Options -> Charts -> Default Colors with self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog", close_button="cancel") as xDialogOpt: diff --git a/sc/qa/uitest/pageFormat/tdf123508.py b/sc/qa/uitest/pageFormat/tdf123508.py index 1f823aa63c60..041e375a7478 100644 --- a/sc/qa/uitest/pageFormat/tdf123508.py +++ b/sc/qa/uitest/pageFormat/tdf123508.py @@ -15,9 +15,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file # Bug 123508 - "Fit print range(s) to width/height" value falls back to default when window closes class tdf123508(UITestCase): def test_tdf123508_format_page_scale(self): - with self.ui_test.load_file(get_url_for_data_file("tdf123508.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + with self.ui_test.load_file(get_url_for_data_file("tdf123508.ods")): #open "Format > Page - Sheet > Scale with self.ui_test.execute_dialog_through_command(".uno:PageFormatDialog") as xDialog: xTabs = xDialog.getChild("tabcontrol") diff --git a/sc/qa/uitest/pasteSpecial/tdf114710.py b/sc/qa/uitest/pasteSpecial/tdf114710.py index 210e738a74cf..cb6fb3654a3a 100644 --- a/sc/qa/uitest/pasteSpecial/tdf114710.py +++ b/sc/qa/uitest/pasteSpecial/tdf114710.py @@ -13,7 +13,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf114710(UITestCase): def test_tdf114710(self): - with self.ui_test.load_file(get_url_for_data_file("tdf114710.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf114710.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/pasteSpecial/tdf118308.py b/sc/qa/uitest/pasteSpecial/tdf118308.py index 2b297bad70b6..130814710ef4 100644 --- a/sc/qa/uitest/pasteSpecial/tdf118308.py +++ b/sc/qa/uitest/pasteSpecial/tdf118308.py @@ -15,7 +15,7 @@ from libreoffice.calc.document import get_cell_by_position class tdf118308(UITestCase): def test_tdf118308(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/pasteSpecial/tdf62267.py b/sc/qa/uitest/pasteSpecial/tdf62267.py index 64d38a7f879a..bd11b98191b1 100644 --- a/sc/qa/uitest/pasteSpecial/tdf62267.py +++ b/sc/qa/uitest/pasteSpecial/tdf62267.py @@ -17,7 +17,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf62267(UITestCase): def test_tdf62267(self): - with self.ui_test.load_file(get_url_for_data_file("tdf62267.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf62267.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") @@ -25,7 +25,7 @@ class tdf62267(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) self.xUITest.executeCommand(".uno:Copy") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) - with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial"): #it's the default - text, numbers and dates pass diff --git a/sc/qa/uitest/pasteSpecial/tdf74577.py b/sc/qa/uitest/pasteSpecial/tdf74577.py index 324e49bef7d1..87fdd2f9a146 100644 --- a/sc/qa/uitest/pasteSpecial/tdf74577.py +++ b/sc/qa/uitest/pasteSpecial/tdf74577.py @@ -26,10 +26,6 @@ class tdf74577(UITestCase): self.xUITest.executeCommand(".uno:Copy") with self.ui_test.load_empty_file("calc") as calc_document: - - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial", close_button="") as xDialog: xList = xDialog.getChild('list') diff --git a/sc/qa/uitest/pasteSpecial/tdf86253.py b/sc/qa/uitest/pasteSpecial/tdf86253.py index 2c369b93b23e..7e8ab372bd6c 100644 --- a/sc/qa/uitest/pasteSpecial/tdf86253.py +++ b/sc/qa/uitest/pasteSpecial/tdf86253.py @@ -13,7 +13,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf86253(UITestCase): def test_tdf86253(self): - with self.ui_test.load_file(get_url_for_data_file("tdf86253.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf86253.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/protect/protectSpreadsheet.py b/sc/qa/uitest/protect/protectSpreadsheet.py index e15c5b7182ea..bb4a471aca26 100644 --- a/sc/qa/uitest/protect/protectSpreadsheet.py +++ b/sc/qa/uitest/protect/protectSpreadsheet.py @@ -14,8 +14,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class protectSpreadsheet(UITestCase): def test_protect_spreadsheet(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") #enter password with self.ui_test.execute_dialog_through_command(".uno:ToolProtectionDocument") as xDialog: xpass1ed = xDialog.getChild("pass1ed") diff --git a/sc/qa/uitest/range_name/create_range_name.py b/sc/qa/uitest/range_name/create_range_name.py index 3b15c10e0ad0..f3351326f727 100644 --- a/sc/qa/uitest/range_name/create_range_name.py +++ b/sc/qa/uitest/range_name/create_range_name.py @@ -19,7 +19,7 @@ class CreateRangeNameTest(UITestCase): def test_create_range_name(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): calcDoc = self.xUITest.getTopFocusWindow() xPosWindow = calcDoc.getChild('pos_window') diff --git a/sc/qa/uitest/range_name/tdf145077.py b/sc/qa/uitest/range_name/tdf145077.py index 7f04e61dbb0e..38c23c62ac5b 100644 --- a/sc/qa/uitest/range_name/tdf145077.py +++ b/sc/qa/uitest/range_name/tdf145077.py @@ -16,7 +16,7 @@ class tdf145077(UITestCase): def test_tdf145077(self): - with self.ui_test.load_file(get_url_for_data_file("tdf145077.ods")) as document: + with self.ui_test.load_file(get_url_for_data_file("tdf145077.ods")): calcDoc = self.xUITest.getTopFocusWindow() gridwin = calcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/search_replace/replace.py b/sc/qa/uitest/search_replace/replace.py index 8893b5de31a7..bb9afa65ce39 100644 --- a/sc/qa/uitest/search_replace/replace.py +++ b/sc/qa/uitest/search_replace/replace.py @@ -14,7 +14,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file class ReplaceTest(UITestCase): def test_tdf106194(self): - with self.ui_test.load_file(get_url_for_data_file("tdf106194.ods")) as doc: + with self.ui_test.load_file(get_url_for_data_file("tdf106194.ods")): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") diff --git a/sc/qa/uitest/search_replace/tdf132097.py b/sc/qa/uitest/search_replace/tdf132097.py index 6364ba14b831..6fe09754ac2d 100644 --- a/sc/qa/uitest/search_replace/tdf132097.py +++ b/sc/qa/uitest/search_replace/tdf132097.py @@ -14,8 +14,6 @@ class tdf132097(UITestCase): def test_tdf132097(self): with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: xCols = xDialog.getChild('cols') xSearchTerm = xDialog.getChild("searchterm") diff --git a/sc/qa/uitest/search_replace/tdf132783.py b/sc/qa/uitest/search_replace/tdf132783.py index eee946cec4ae..5c28e479706e 100644 --- a/sc/qa/uitest/search_replace/tdf132783.py +++ b/sc/qa/uitest/search_replace/tdf132783.py @@ -13,7 +13,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf132783(UITestCase): def test_tdf132783(self): - with self.ui_test.load_file(get_url_for_data_file("tdf132783.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf132783.ods")): for i in range(5): with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: diff --git a/sc/qa/uitest/search_replace/tdf143759.py b/sc/qa/uitest/search_replace/tdf143759.py index f6f682e4d019..351d141f99e3 100644 --- a/sc/qa/uitest/search_replace/tdf143759.py +++ b/sc/qa/uitest/search_replace/tdf143759.py @@ -14,7 +14,7 @@ from uitest.uihelper.common import get_state_as_dict class tdf143759(UITestCase): def test_tdf143759(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/search_replace/tdf35020.py b/sc/qa/uitest/search_replace/tdf35020.py index b7c40cd7f784..bf0466141138 100644 --- a/sc/qa/uitest/search_replace/tdf35020.py +++ b/sc/qa/uitest/search_replace/tdf35020.py @@ -17,9 +17,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf35020(UITestCase): def test_tdf39959_find_replace_all_sheets(self): with self.ui_test.load_file(get_url_for_data_file("tdf35020.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/search_replace/tdf39959.py b/sc/qa/uitest/search_replace/tdf39959.py index f456e1aaaf08..f08019ab0afa 100644 --- a/sc/qa/uitest/search_replace/tdf39959.py +++ b/sc/qa/uitest/search_replace/tdf39959.py @@ -17,15 +17,11 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf39959(UITestCase): def test_tdf39959_find_replace_all_sheets(self): with self.ui_test.load_file(get_url_for_data_file("tdf39959.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - - # 1. Open a new document + # 1. Open a new document # 2. Enter "asdf" in A1 # 3. Activate Sheet2 # 4. Try Find-and-replace (Ctrl+Alt+F) to search for "asdf" # Whether the checkbox "in allen Tabellen suchen" is activated or not: LibO Calc never seems to find the text - with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/search_replace/tdf44861.py b/sc/qa/uitest/search_replace/tdf44861.py index f3f121b1036a..7f0b21361703 100644 --- a/sc/qa/uitest/search_replace/tdf44861.py +++ b/sc/qa/uitest/search_replace/tdf44861.py @@ -17,14 +17,11 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf44861(UITestCase): def test_tdf44861_find_replaceAll_regexp(self): with self.ui_test.load_file(get_url_for_data_file("tdf44861.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") # 2. ctrl-h, in dialog # Search: ([0-9]{2})([0-9]{2}) # Replace: $1.$2 # check option "Enable regular expressions" # Press "Replace all" - with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/signatureLine/insertSignatureLine.py b/sc/qa/uitest/signatureLine/insertSignatureLine.py index 8e013a7ee799..5bed522440e4 100644 --- a/sc/qa/uitest/signatureLine/insertSignatureLine.py +++ b/sc/qa/uitest/signatureLine/insertSignatureLine.py @@ -17,9 +17,6 @@ class insertSignatureLineCalc(UITestCase): def test_insert_signature_line_calc(self): with self.ui_test.create_doc_in_start_center("calc") as document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - # set the signature line with self.ui_test.execute_dialog_through_command(".uno:InsertSignatureLine") as xDialog: diff --git a/sc/qa/uitest/sort/sorting.py b/sc/qa/uitest/sort/sorting.py index 0d6bb9ca0912..b78eae4c77f0 100644 --- a/sc/qa/uitest/sort/sorting.py +++ b/sc/qa/uitest/sort/sorting.py @@ -202,7 +202,7 @@ class CalcSorting(UITestCase): def test_Sorting_sort_criteria(self): - with self.ui_test.create_doc_in_start_center("calc") as document: + with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") #In column A enter: Number; 3; 4; 6; 2 / In column B enter: Misc; s; d; f; g diff --git a/sc/qa/uitest/sort/subtotals.py b/sc/qa/uitest/sort/subtotals.py index ee8ab5fbbbd2..b824dcab98c8 100644 --- a/sc/qa/uitest/sort/subtotals.py +++ b/sc/qa/uitest/sort/subtotals.py @@ -71,8 +71,6 @@ class Subtotals(UITestCase): def test_tdf88735(self): with self.ui_test.load_file(get_url_for_data_file("tdf88735.ods")) as calc_doc: - XcalcDoc = self.xUITest.getTopFocusWindow() - gridwin = XcalcDoc.getChild("grid_window") # 1 select all cells self.xUITest.executeCommand(".uno:SelectAll")#use uno command Menu Edit->Select All # 2 invoke sub-total menu and select none @@ -88,8 +86,6 @@ class Subtotals(UITestCase): def test_tdf56958(self): with self.ui_test.load_file(get_url_for_data_file("tdf56958.ods")) as calc_doc: - XcalcDoc = self.xUITest.getTopFocusWindow() - gridwin = XcalcDoc.getChild("grid_window") # 1. Open the test file # 2. Data->Subtotals with self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog: diff --git a/sc/qa/uitest/sort/tdf105301.py b/sc/qa/uitest/sort/tdf105301.py index ab4889d89e18..c215e95bc819 100644 --- a/sc/qa/uitest/sort/tdf105301.py +++ b/sc/qa/uitest/sort/tdf105301.py @@ -14,7 +14,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class tdf105301(UITestCase): def test_tdf105301(self): - with self.ui_test.load_file(get_url_for_data_file("tdf105301.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf105301.ods")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/sort/tdf54018.py b/sc/qa/uitest/sort/tdf54018.py index 6629a608a5f2..147fb8fa98af 100644 --- a/sc/qa/uitest/sort/tdf54018.py +++ b/sc/qa/uitest/sort/tdf54018.py @@ -17,9 +17,6 @@ from libreoffice.calc.document import get_cell_by_position class tdf54018(UITestCase): def test_td54018_sort_with_comments(self): with self.ui_test.load_file(get_url_for_data_file("tdf54018.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - #click top left columns / rows heading field to select all cells self.xUITest.executeCommand(".uno:SelectAll") #Menu 'Data -> Sort -> Column D -> Descending' <ok> diff --git a/sc/qa/uitest/statistics/anova.py b/sc/qa/uitest/statistics/anova.py index 316849150511..57e24b49b0da 100644 --- a/sc/qa/uitest/statistics/anova.py +++ b/sc/qa/uitest/statistics/anova.py @@ -59,10 +59,7 @@ class anova(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:AnalysisOfVarianceDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xradiotwofactor = xDialog.getChild("radio-two-factor") xradiosinglefactor = xDialog.getChild("radio-single-factor") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xalphaspin = xDialog.getChild("alpha-spin") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/chiSquare.py b/sc/qa/uitest/statistics/chiSquare.py index 54194e587e88..1bc2e7f3a89b 100644 --- a/sc/qa/uitest/statistics/chiSquare.py +++ b/sc/qa/uitest/statistics/chiSquare.py @@ -51,7 +51,6 @@ class chiSquare(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:ChiSquareTestDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/correlation.py b/sc/qa/uitest/statistics/correlation.py index 1bcd667ddc43..a7f67a2e7cfc 100644 --- a/sc/qa/uitest/statistics/correlation.py +++ b/sc/qa/uitest/statistics/correlation.py @@ -154,7 +154,6 @@ class correlation(UITestCase): xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/statistics/covariance.py b/sc/qa/uitest/statistics/covariance.py index 2978d48547db..cec5a1d7855a 100644 --- a/sc/qa/uitest/statistics/covariance.py +++ b/sc/qa/uitest/statistics/covariance.py @@ -59,7 +59,6 @@ class covariance(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:CovarianceDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) @@ -152,7 +151,6 @@ class covariance(UITestCase): xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/statistics/exponentialSmoothing.py b/sc/qa/uitest/statistics/exponentialSmoothing.py index 377d65d521a6..5823c3265d6d 100644 --- a/sc/qa/uitest/statistics/exponentialSmoothing.py +++ b/sc/qa/uitest/statistics/exponentialSmoothing.py @@ -50,8 +50,6 @@ class exponentialSmoothing(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:ExponentialSmoothingDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xmoothingfactorspin = xDialog.getChild("smoothing-factor-spin") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) @@ -144,7 +142,6 @@ class exponentialSmoothing(UITestCase): xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xmoothingfactorspin = xDialog.getChild("smoothing-factor-spin") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/fTest.py b/sc/qa/uitest/statistics/fTest.py index 98c0bee35921..0580163730da 100644 --- a/sc/qa/uitest/statistics/fTest.py +++ b/sc/qa/uitest/statistics/fTest.py @@ -52,7 +52,6 @@ class tTest(UITestCase): xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xvariable1rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/movingAverage.py b/sc/qa/uitest/statistics/movingAverage.py index 4411d8dfcc1f..4f5348d187fb 100644 --- a/sc/qa/uitest/statistics/movingAverage.py +++ b/sc/qa/uitest/statistics/movingAverage.py @@ -50,8 +50,6 @@ class movingAverage(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:MovingAverageDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xintervalspin = xDialog.getChild("interval-spin") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) @@ -140,7 +138,6 @@ class movingAverage(UITestCase): xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xintervalspin = xDialog.getChild("interval-spin") xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/regression.py b/sc/qa/uitest/statistics/regression.py index 05e03777b0c9..dced529896f6 100644 --- a/sc/qa/uitest/statistics/regression.py +++ b/sc/qa/uitest/statistics/regression.py @@ -22,9 +22,6 @@ class regression(UITestCase): def _regression_check(self, data_groupedby_column = True): with self.ui_test.load_file(get_url_for_data_file("regression.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - # Initially the final check status is "FALSE" (failed). self.assertEqual(get_cell_by_position(calc_doc, 14, 1, 6).getString(), "FALSE", "Check status must be FALSE before the test") diff --git a/sc/qa/uitest/statistics/sampling.py b/sc/qa/uitest/statistics/sampling.py index a7a373dccfc1..adcf6a5b774a 100644 --- a/sc/qa/uitest/statistics/sampling.py +++ b/sc/qa/uitest/statistics/sampling.py @@ -53,8 +53,6 @@ class sampling(UITestCase): with self.ui_test.execute_modeless_dialog_through_command(".uno:SamplingDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xrandommethodradio = xDialog.getChild("random-method-radio") - xsamplesizespin = xDialog.getChild("sample-size-spin") xperiodicmethodradio = xDialog.getChild("periodic-method-radio") xperiodspin = xDialog.getChild("period-spin") diff --git a/sc/qa/uitest/statistics/tTest.py b/sc/qa/uitest/statistics/tTest.py index cd026ab44ed1..1c7bc3a68227 100644 --- a/sc/qa/uitest/statistics/tTest.py +++ b/sc/qa/uitest/statistics/tTest.py @@ -52,7 +52,6 @@ class tTest(UITestCase): xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xvariable1rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/tdf76731.py b/sc/qa/uitest/statistics/tdf76731.py index e1e00d44de54..9d10cd62c450 100644 --- a/sc/qa/uitest/statistics/tdf76731.py +++ b/sc/qa/uitest/statistics/tdf76731.py @@ -25,12 +25,8 @@ class anova(UITestCase): #3. Choose Data - Analysis of Variance (ANOVA). #4. Choose an arbitrary output cell and click OK. with self.ui_test.execute_modeless_dialog_through_command(".uno:AnalysisOfVarianceDialog") as xDialog: - xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xradiotwofactor = xDialog.getChild("radio-two-factor") xradiosinglefactor = xDialog.getChild("radio-single-factor") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") - xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xalphaspin = xDialog.getChild("alpha-spin") xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/statistics/zTest.py b/sc/qa/uitest/statistics/zTest.py index aca0d9ae636f..4ed285a9b846 100644 --- a/sc/qa/uitest/statistics/zTest.py +++ b/sc/qa/uitest/statistics/zTest.py @@ -52,7 +52,6 @@ class zTest(UITestCase): xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") - xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") xvariable1rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sc/qa/uitest/textToColumns/textToColumns.py b/sc/qa/uitest/textToColumns/textToColumns.py index 668eac3fcb8a..f17f6cc79ff0 100644 --- a/sc/qa/uitest/textToColumns/textToColumns.py +++ b/sc/qa/uitest/textToColumns/textToColumns.py @@ -37,10 +37,6 @@ class CalcTextToColumns(UITestCase): #Data - Text to Columns with self.ui_test.execute_dialog_through_command(".uno:TextToColumns", close_button="") as xDialog: #Untag Tab as separator and tag other. Put a dot into the input field next to the other checkbox - xtab = xDialog.getChild("tab") - xcomma = xDialog.getChild("comma") - xsemicolon = xDialog.getChild("semicolon") - xspace = xDialog.getChild("space") xother = xDialog.getChild("other") xinputother = xDialog.getChild("inputother") @@ -327,13 +323,8 @@ class CalcTextToColumns(UITestCase): # Data - Text to Columns with self.ui_test.execute_dialog_through_command(".uno:TextToColumns", close_button="") as xDialog: # Untag comma as separator and tag Semicolon - xtab = xDialog.getChild("tab") - xcomma = xDialog.getChild("comma") - xsemicolon = xDialog.getChild("semicolon") - xspace = xDialog.getChild("space") xother = xDialog.getChild("other") xinputother = xDialog.getChild("inputother") - xSpace = xDialog.getChild("space") if (get_state_as_dict(xother)["Selected"]) == "false": xother.executeAction("CLICK", tuple()) xinputother.executeAction("TYPE", mkPropertyValues({"TEXT":"|"})) @@ -400,9 +391,6 @@ class CalcTextToColumns(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A5"})) # Data - Text to Columns with self.ui_test.execute_dialog_through_command(".uno:TextToColumns", close_button="") as xDialog: - xtab = xDialog.getChild("tab") - xcomma = xDialog.getChild("comma") - xsemicolon = xDialog.getChild("semicolon") xspace = xDialog.getChild("space") xother = xDialog.getChild("other") xinputother = xDialog.getChild("inputother") diff --git a/sc/qa/uitest/validity/tdf137945.py b/sc/qa/uitest/validity/tdf137945.py index 949410313ff5..abe7b26057f6 100644 --- a/sc/qa/uitest/validity/tdf137945.py +++ b/sc/qa/uitest/validity/tdf137945.py @@ -13,7 +13,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file class Tdf137945(UITestCase): def test_tdf137945(self): - with self.ui_test.load_file(get_url_for_data_file("tdf137945.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf137945.ods")): with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xTabs = xDialog.getChild("tabcontrol") diff --git a/sc/qa/uitest/validity/tdf138134.py b/sc/qa/uitest/validity/tdf138134.py index 604eddeede0f..c16bdc8d06b4 100644 --- a/sc/qa/uitest/validity/tdf138134.py +++ b/sc/qa/uitest/validity/tdf138134.py @@ -33,7 +33,6 @@ class DetectiveCircle(UITestCase): xallowempty = xDialog.getChild("allowempty") xdata = xDialog.getChild("data") xmin = xDialog.getChild("min") - xmax = xDialog.getChild("max") select_by_text(xallow, "Whole Numbers") xallowempty.executeAction("CLICK", tuple()) diff --git a/sc/qa/uitest/validity/tdf65686.py b/sc/qa/uitest/validity/tdf65686.py index bb85d113edce..fe1a0fbc6fa1 100644 --- a/sc/qa/uitest/validity/tdf65686.py +++ b/sc/qa/uitest/validity/tdf65686.py @@ -28,7 +28,6 @@ class tdf65686(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") minlist = xDialog.getChild("minlist") select_by_text(xallow, "List") @@ -41,7 +40,6 @@ class tdf65686(UITestCase): #> there are empty lines in the list Entries with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") minlist = xDialog.getChild("minlist") self.assertEqual(get_state_as_dict(xallow)["SelectEntryText"], "List") diff --git a/sc/qa/uitest/validity/tdf96698.py b/sc/qa/uitest/validity/tdf96698.py index 78fdb28664d5..d25a5378f5be 100644 --- a/sc/qa/uitest/validity/tdf96698.py +++ b/sc/qa/uitest/validity/tdf96698.py @@ -27,7 +27,6 @@ class tdf96698(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") select_by_text(xallow, "Custom") @@ -35,7 +34,6 @@ class tdf96698(UITestCase): #verify with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") self.assertEqual(get_state_as_dict(xallow)["SelectEntryText"], "Custom") @@ -47,7 +45,6 @@ class tdf96698(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") select_by_text(xallow, "Custom") @@ -55,7 +52,6 @@ class tdf96698(UITestCase): #verify with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") self.assertEqual(get_state_as_dict(xallow)["SelectEntryText"], "Custom") @@ -67,7 +63,6 @@ class tdf96698(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") select_by_text(xallow, "Custom") @@ -75,7 +70,6 @@ class tdf96698(UITestCase): #verify with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") self.assertEqual(get_state_as_dict(xallow)["SelectEntryText"], "Custom") @@ -87,7 +81,6 @@ class tdf96698(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") select_by_text(xallow, "Custom") @@ -95,7 +88,6 @@ class tdf96698(UITestCase): #verify with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xallow = xDialog.getChild("allow") - xallowempty = xDialog.getChild("allowempty") xmin = xDialog.getChild("min") self.assertEqual(get_state_as_dict(xallow)["SelectEntryText"], "Custom") |