diff options
78 files changed, 173 insertions, 187 deletions
diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py index 3765640ff7e9..8351e1f868a3 100644 --- a/sc/qa/uitest/autofilter/autofilter.py +++ b/sc/qa/uitest/autofilter/autofilter.py @@ -443,7 +443,7 @@ class AutofilterTest(UITestCase): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B8"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xval1 = xDialog.getChild("val1") select_by_text(xval1, "0.365") @@ -464,7 +464,7 @@ class AutofilterTest(UITestCase): #Test '<' condition xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B8"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") @@ -486,7 +486,7 @@ class AutofilterTest(UITestCase): #Test '>=' condition xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B8"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") diff --git a/sc/qa/uitest/calc_tests/fillRandomNumber.py b/sc/qa/uitest/calc_tests/fillRandomNumber.py index ac325e5303fc..47cce0fa107f 100644 --- a/sc/qa/uitest/calc_tests/fillRandomNumber.py +++ b/sc/qa/uitest/calc_tests/fillRandomNumber.py @@ -16,7 +16,7 @@ class fillRandomNumber(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RandomNumberGeneratorDialog") as xDialog: + 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") @@ -44,7 +44,7 @@ class fillRandomNumber(UITestCase): self.assertEqual(bool(get_cell_by_position(document, 0, 0, 0).getString() ), False) self.assertEqual(bool(get_cell_by_position(document, 0, 0, 1).getString() ), False) #close dialog without doing anything - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RandomNumberGeneratorDialog", close_button="close"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog", close_button="close"): pass self.assertEqual(bool(get_cell_by_position(document, 0, 0, 0).getString() ), False) diff --git a/sc/qa/uitest/calc_tests/printRange.py b/sc/qa/uitest/calc_tests/printRange.py index 6334153fdd9e..5b26b4ac487b 100644 --- a/sc/qa/uitest/calc_tests/printRange.py +++ b/sc/qa/uitest/calc_tests/printRange.py @@ -18,7 +18,7 @@ class printRange(UITestCase): #Set print range self.xUITest.executeCommand(".uno:DefinePrintArea") # Print Range dialog - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:EditPrintArea") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") as xDialog: xlbprintarea = xDialog.getChild("lbprintarea") xedprintarea = xDialog.getChild("edprintarea") #verify range @@ -33,7 +33,7 @@ class printRange(UITestCase): # Click Ok #Verify Print Range dialog - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:EditPrintArea", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea", close_button="cancel") as xDialog: xedprintarea = xDialog.getChild("edprintarea") xedrepeatrow = xDialog.getChild("edrepeatrow") xedrepeatcol = xDialog.getChild("edrepeatcol") @@ -44,7 +44,7 @@ class printRange(UITestCase): #delete print ranges self.xUITest.executeCommand(".uno:DeletePrintArea") #Verify Print Range dialog - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:EditPrintArea") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") as xDialog: xedprintarea = xDialog.getChild("edprintarea") xlbprintarea = xDialog.getChild("lbprintarea") xedrepeatrow = xDialog.getChild("edrepeatrow") @@ -63,7 +63,7 @@ class printRange(UITestCase): #Set print range self.xUITest.executeCommand(".uno:DefinePrintArea") # Print Range dialog - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:EditPrintArea") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") as xDialog: xlbprintarea = xDialog.getChild("lbprintarea") xedprintarea = xDialog.getChild("edprintarea") #verify range @@ -81,7 +81,7 @@ class printRange(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:Move"): pass #Verify Print Range dialog on new sheet - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:EditPrintArea") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") as xDialog: xedprintarea = xDialog.getChild("edprintarea") xedrepeatrow = xDialog.getChild("edrepeatrow") xedrepeatcol = xDialog.getChild("edrepeatcol") diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py index 91bc581250ae..f2f8b9345f1a 100644 --- a/sc/qa/uitest/calc_tests2/consolidate.py +++ b/sc/qa/uitest/calc_tests2/consolidate.py @@ -16,7 +16,7 @@ class consolidate(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataConsolidate") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") as xDialog: xfunc = xDialog.getChild("func") xlbdataarea = xDialog.getChild("lbdataarea") xadd = xDialog.getChild("add") @@ -61,7 +61,7 @@ class consolidate(UITestCase): self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 315) self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 5).getValue(), 318) #verify dialog - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataConsolidate") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") as xDialog: xfunc = xDialog.getChild("func") xlbdataarea = xDialog.getChild("lbdataarea") xdelete = xDialog.getChild("delete") @@ -101,7 +101,7 @@ class consolidate(UITestCase): self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 5).getValue(), 212) # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataConsolidate", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests2/standardFilter.py b/sc/qa/uitest/calc_tests2/standardFilter.py index 5f6c456977f3..052ac40a12e5 100644 --- a/sc/qa/uitest/calc_tests2/standardFilter.py +++ b/sc/qa/uitest/calc_tests2/standardFilter.py @@ -20,7 +20,7 @@ class standardFilter(UITestCase): gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xconnect2 = xDialog.getChild("connect2") @@ -43,7 +43,7 @@ class standardFilter(UITestCase): gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xconnect2 = xDialog.getChild("connect2") @@ -62,7 +62,7 @@ class standardFilter(UITestCase): gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xconnect2 = xDialog.getChild("connect2") @@ -94,7 +94,7 @@ class standardFilter(UITestCase): gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xconnect2 = xDialog.getChild("connect2") @@ -134,7 +134,7 @@ class standardFilter(UITestCase): enter_text_to_cell(gridwin, "B3", "5") enter_text_to_cell(gridwin, "B4", "6") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B4"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcase = xDialog.getChild("case") @@ -151,7 +151,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcase = xDialog.getChild("case") @@ -178,7 +178,7 @@ class standardFilter(UITestCase): enter_text_to_cell(gridwin, "B5", "4") enter_text_to_cell(gridwin, "B6", "5") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B6"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xregexp = xDialog.getChild("regexp") @@ -197,7 +197,7 @@ class standardFilter(UITestCase): gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xregexp = xDialog.getChild("regexp") @@ -224,7 +224,7 @@ class standardFilter(UITestCase): enter_text_to_cell(gridwin, "B5", "4") enter_text_to_cell(gridwin, "B6", "5") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B6"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xregexp = xDialog.getChild("regexp") @@ -243,7 +243,7 @@ class standardFilter(UITestCase): gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xregexp = xDialog.getChild("regexp") @@ -282,7 +282,7 @@ class standardFilter(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D5"})) #Choose DATA-FILTER-STANDARDFILTER #Choose field name "A"/ Choose condition "Contains"/Enter value "cio"/Press OK button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -302,7 +302,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -339,7 +339,7 @@ class standardFilter(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D5"})) #Choose DATA-FILTER-STANDARDFILTER #Choose field name "A"/ Choose condition "Does not contain"/Enter value "cio"/Press OK button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -359,7 +359,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -397,7 +397,7 @@ class standardFilter(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D5"})) #Choose DATA-FILTER-STANDARDFILTER #Choose field name "A"/ Choose condition "Begins with"/Enter value "si"/Press OK button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -417,7 +417,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -455,7 +455,7 @@ class standardFilter(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D5"})) #Choose DATA-FILTER-STANDARDFILTER #Choose field name "A"/ Choose condition "Does not contain"/Enter value "cio"/Press OK button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -475,7 +475,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -513,7 +513,7 @@ class standardFilter(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D5"})) #Choose DATA-FILTER-STANDARDFILTER #Choose field name "A"/ Choose condition "Does not contain"/Enter value "cio"/Press OK button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -533,7 +533,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -571,7 +571,7 @@ class standardFilter(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D5"})) #Choose DATA-FILTER-STANDARDFILTER #Choose field name "A"/ Choose condition "Begins with"/Enter value "si"/Press OK button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") @@ -591,7 +591,7 @@ class standardFilter(UITestCase): #reopen filter and verify gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter", close_button="cancel") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") diff --git a/sc/qa/uitest/calc_tests2/tdf104117.py b/sc/qa/uitest/calc_tests2/tdf104117.py index b1ef140b73a7..92d54381ed37 100644 --- a/sc/qa/uitest/calc_tests2/tdf104117.py +++ b/sc/qa/uitest/calc_tests2/tdf104117.py @@ -16,7 +16,7 @@ class tdf104117(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RandomNumberGeneratorDialog") as xDialog: + 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") diff --git a/sc/qa/uitest/calc_tests3/tdf77509.py b/sc/qa/uitest/calc_tests3/tdf77509.py index a63d9c98183a..ac4700a54e1c 100644 --- a/sc/qa/uitest/calc_tests3/tdf77509.py +++ b/sc/qa/uitest/calc_tests3/tdf77509.py @@ -20,7 +20,7 @@ class tdf77509(UITestCase): #2. Select any empty cell, eg. cell D1 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"})) #3. Tab: Data > Consolidate - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataConsolidate") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") as xDialog: xfunc = xDialog.getChild("func") xeddataarea = xDialog.getChild("eddataarea") diff --git a/sc/qa/uitest/calc_tests3/tdf80693.py b/sc/qa/uitest/calc_tests3/tdf80693.py index 5e97df56d7a1..171bc359474e 100644 --- a/sc/qa/uitest/calc_tests3/tdf80693.py +++ b/sc/qa/uitest/calc_tests3/tdf80693.py @@ -16,7 +16,7 @@ class tdf80693(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RandomNumberGeneratorDialog") as xDialog: + 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") diff --git a/sc/qa/uitest/calc_tests4/tdf138089.py b/sc/qa/uitest/calc_tests4/tdf138089.py index a59b7ce29798..e6a3cd72fbbf 100644 --- a/sc/qa/uitest/calc_tests4/tdf138089.py +++ b/sc/qa/uitest/calc_tests4/tdf138089.py @@ -27,7 +27,7 @@ class tdf138089(UITestCase): self.assertFalse(is_row_hidden(calc_doc, 6)) # Without the fix in place, this test would have crashed here - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: self.assertEqual("2017-12-01", get_state_as_dict(xDialog.getChild("val1"))['Text']) self.assertEqual("过帐日期", get_state_as_dict(xDialog.getChild("field1"))["DisplayText"]) diff --git a/sc/qa/uitest/calc_tests4/tdf141547.py b/sc/qa/uitest/calc_tests4/tdf141547.py index e0203847e30c..5b161bbfe892 100644 --- a/sc/qa/uitest/calc_tests4/tdf141547.py +++ b/sc/qa/uitest/calc_tests4/tdf141547.py @@ -23,7 +23,7 @@ class tdf141547(UITestCase): self.assertTrue(is_row_hidden(calc_doc, i)) # Without the fix in place, this test would have crashed here - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: self.assertEqual("0", get_state_as_dict(xDialog.getChild("val1"))['Text']) self.assertEqual("过帐日期", get_state_as_dict(xDialog.getChild("field1"))["DisplayText"]) self.assertEqual("Empty", get_state_as_dict(xDialog.getChild("val2"))['Text']) diff --git a/sc/qa/uitest/calc_tests4/tdf89958.py b/sc/qa/uitest/calc_tests4/tdf89958.py index 1e36bb48fd54..6236b072cb38 100644 --- a/sc/qa/uitest/calc_tests4/tdf89958.py +++ b/sc/qa/uitest/calc_tests4/tdf89958.py @@ -22,7 +22,7 @@ class tdf89958(UITestCase): #Menu: Data->Filter->Standard Filter ... #Field Name "Column A", Condition "Does not end with", Value: "CTORS" - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataFilterStandardFilter") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: xfield1 = xDialog.getChild("field1") xval1 = xDialog.getChild("val1") xcond1 = xDialog.getChild("cond1") diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py index 07c1c8db768e..f3ab5e7b6fc2 100644 --- a/sc/qa/uitest/calc_tests4/trackedChanges.py +++ b/sc/qa/uitest/calc_tests4/trackedChanges.py @@ -17,7 +17,7 @@ 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.execute_modeless_dialog_through_command_guarded(".uno:AcceptChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") self.assertEqual(1, len(xChangesList.getChildren())) @@ -65,7 +65,7 @@ class CalcTrackedChanges(UITestCase): enter_text_to_cell(gridwin, "A1", "Test LibreOffice") enter_text_to_cell(gridwin, "A2", "Test LibreOffice") #accept tracked changes - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") self.assertEqual(2, len(xChangesList.getChildren())) @@ -115,7 +115,7 @@ class CalcTrackedChanges(UITestCase): enter_text_to_cell(gridwin, "A1", "Test LibreOffice") enter_text_to_cell(gridwin, "A2", "Test LibreOffice") #accept All tracked changes - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") self.assertEqual(2, len(xChangesList.getChildren())) @@ -157,7 +157,7 @@ class CalcTrackedChanges(UITestCase): enter_text_to_cell(gridwin, "A1", "Test LibreOffice") enter_text_to_cell(gridwin, "A2", "Test LibreOffice") #accept tracked changes - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") self.assertEqual(2, len(xChangesList.getChildren())) @@ -219,7 +219,7 @@ class CalcTrackedChanges(UITestCase): enter_text_to_cell(gridwin, "A1", "Test LibreOffice") enter_text_to_cell(gridwin, "A2", "Test LibreOffice") #accept tracked changes - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") self.assertEqual(2, len(xChangesList.getChildren())) @@ -267,7 +267,7 @@ class CalcTrackedChanges(UITestCase): self.xUITest.getTopFocusWindow() - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges", close_button="close") as xTrackDlg: xChangesList = xTrackDlg.getChild("calcchanges") self.assertEqual(1, len(xChangesList.getChildren())) diff --git a/sc/qa/uitest/calc_tests6/multipleOperations.py b/sc/qa/uitest/calc_tests6/multipleOperations.py index ade3008f9af1..ac3dc615519c 100644 --- a/sc/qa/uitest/calc_tests6/multipleOperations.py +++ b/sc/qa/uitest/calc_tests6/multipleOperations.py @@ -38,7 +38,7 @@ class multipleOperations(UITestCase): #Select the range D2:E11 xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "D2:E11"})) #Choose Data > Multiple Operations. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:TableOperationDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:TableOperationDialog") as xDialog: #Formulas = B5 ; Column input cell = B4 formulas = xDialog.getChild("formulas") col = xDialog.getChild("col") @@ -82,7 +82,7 @@ class multipleOperations(UITestCase): #Select the range D2:F11 xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "D2:F11"})) #Choose Data > Multiple Operations. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:TableOperationDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:TableOperationDialog") as xDialog: #Formulas = B5 ; Column input cell = B4 formulas = xDialog.getChild("formulas") col = xDialog.getChild("col") diff --git a/sc/qa/uitest/calc_tests9/forms.py b/sc/qa/uitest/calc_tests9/forms.py index 54f3e1538952..5c12a77bda00 100644 --- a/sc/qa/uitest/calc_tests9/forms.py +++ b/sc/qa/uitest/calc_tests9/forms.py @@ -19,7 +19,7 @@ class Forms(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "form"})) # Without the fix in place, this test would have hung here - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xCellRange = self.ui_test.wait_until_child_is_available('textfield-Source cell range') diff --git a/sc/qa/uitest/conditional_format/tdf105351.py b/sc/qa/uitest/conditional_format/tdf105351.py index 64dea784748b..3bf9710930c1 100644 --- a/sc/qa/uitest/conditional_format/tdf105351.py +++ b/sc/qa/uitest/conditional_format/tdf105351.py @@ -22,7 +22,7 @@ class tdf105351(UITestCase): enter_text_to_cell(gridwin, "A1", "5") #3. Select cell A1, then choose from the menus Format -> Conditional Formatting -> Data Bar gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataBarFormatDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataBarFormatDialog") as xDialog: xcolscalemin = xDialog.getChild("colscalemin") xedcolscalemin = xDialog.getChild("edcolscalemin") xcolscalemax = xDialog.getChild("colscalemax") @@ -37,7 +37,7 @@ class tdf105351(UITestCase): xedcolscalemax.executeAction("TYPE", mkPropertyValues({"TEXT":"10"})) #Verify : The conditions set for cell A1 should be shown and editable. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DataBarFormatDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataBarFormatDialog") as xDialog: xcolscalemin = xDialog.getChild("colscalemin") xedcolscalemin = xDialog.getChild("edcolscalemin") xcolscalemax = xDialog.getChild("colscalemax") diff --git a/sc/qa/uitest/conditional_format/tdf105411.py b/sc/qa/uitest/conditional_format/tdf105411.py index 3a8ca687f3db..411ec07d6f69 100644 --- a/sc/qa/uitest/conditional_format/tdf105411.py +++ b/sc/qa/uitest/conditional_format/tdf105411.py @@ -13,7 +13,7 @@ class tdf105411(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ConditionalFormatDialog", close_button="") as xCondFormatDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:ConditionalFormatDialog", close_button="") as xCondFormatDlg: xDeleteBtn = xCondFormatDlg.getChild("delete") xDeleteBtn.executeAction("CLICK", tuple()) diff --git a/sc/qa/uitest/conditional_format/tdf105466.py b/sc/qa/uitest/conditional_format/tdf105466.py index a28af15cabf0..8c723044eb52 100644 --- a/sc/qa/uitest/conditional_format/tdf105466.py +++ b/sc/qa/uitest/conditional_format/tdf105466.py @@ -17,7 +17,7 @@ class tdf105466(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ConditionalFormatDialog") as xCondFormatDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:ConditionalFormatDialog") as xCondFormatDlg: for i in range(0,4): with self.subTest(i = i): diff --git a/sc/qa/uitest/function_wizard/function_wizard.py b/sc/qa/uitest/function_wizard/function_wizard.py index b31649edb0cf..16ad78c63eb5 100644 --- a/sc/qa/uitest/function_wizard/function_wizard.py +++ b/sc/qa/uitest/function_wizard/function_wizard.py @@ -14,7 +14,7 @@ class FunctionWizardTest(UITestCase): def test_open_function_wizard(self): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FunctionDialog", close_button="cancel") as xFunctionDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog", close_button="cancel") as xFunctionDlg: xArrayChkBox = xFunctionDlg.getChild("array") diff --git a/sc/qa/uitest/function_wizard/tdf123479.py b/sc/qa/uitest/function_wizard/tdf123479.py index d37e8e879683..06907155c2a7 100644 --- a/sc/qa/uitest/function_wizard/tdf123479.py +++ b/sc/qa/uitest/function_wizard/tdf123479.py @@ -25,7 +25,7 @@ class tdf123479(UITestCase): #Select D14:D16 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "D14:D16"})) #Open Formula Wizard (Ctrl+F2) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FunctionDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog") as xDialog: edArg1 = xDialog.getChild("ED_ARG1") edArg2 = xDialog.getChild("ED_ARG2") formulaRes = xDialog.getChild("formula_result") diff --git a/sc/qa/uitest/function_wizard/tdf132173.py b/sc/qa/uitest/function_wizard/tdf132173.py index f29cc32171b9..671a3125fa1f 100644 --- a/sc/qa/uitest/function_wizard/tdf132173.py +++ b/sc/qa/uitest/function_wizard/tdf132173.py @@ -13,7 +13,7 @@ class tdf132173(UITestCase): def test_tdf132173(self): with self.ui_test.create_doc_in_start_center("calc") as document: - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FunctionDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog") as xDialog: xFormula = xDialog.getChild("ed_formula") xFormula.executeAction("TYPE", mkPropertyValues({"TEXT": 'FIND({"A";"B";"C"},"SAMPLE TEXT")'})) diff --git a/sc/qa/uitest/goalSeek/goalSeek.py b/sc/qa/uitest/goalSeek/goalSeek.py index ac3c3f8ef437..27d24b22005c 100644 --- a/sc/qa/uitest/goalSeek/goalSeek.py +++ b/sc/qa/uitest/goalSeek/goalSeek.py @@ -17,7 +17,7 @@ class goalSeek(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:GoalSeekDialog", close_button="") as xDialog: + 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") diff --git a/sc/qa/uitest/goalSeek/tdf37341.py b/sc/qa/uitest/goalSeek/tdf37341.py index 48a240c12d02..fc256140da81 100644 --- a/sc/qa/uitest/goalSeek/tdf37341.py +++ b/sc/qa/uitest/goalSeek/tdf37341.py @@ -19,7 +19,7 @@ class tdf37341(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "F111"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:GoalSeekDialog", close_button="") as xDialog: + 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") diff --git a/sc/qa/uitest/goalSeek/tdf43693.py b/sc/qa/uitest/goalSeek/tdf43693.py index 229e488cf290..946dab754c40 100644 --- a/sc/qa/uitest/goalSeek/tdf43693.py +++ b/sc/qa/uitest/goalSeek/tdf43693.py @@ -19,7 +19,7 @@ class tdf43693(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "K248"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:GoalSeekDialog", close_button="") as xDialog: + 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") diff --git a/sc/qa/uitest/manual_tests/calc.py b/sc/qa/uitest/manual_tests/calc.py index 27fb0597d044..c87d900bc512 100644 --- a/sc/qa/uitest/manual_tests/calc.py +++ b/sc/qa/uitest/manual_tests/calc.py @@ -23,7 +23,7 @@ class ManualCalcTests(UITestCase): xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D10"})) # Execute "Define DB Range dialog" - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DefineDBName") as xDefineNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName") as xDefineNameDlg: xEntryBox = xDefineNameDlg.getChild("entry") @@ -167,7 +167,7 @@ class ManualCalcTests(UITestCase): xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:A10"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RandomNumberGeneratorDialog") as xRandomNumberDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog") as xRandomNumberDlg: xDistributionLstBox = xRandomNumberDlg.getChild("distribution-combo") xDistributionLstBox.executeAction("SELECT", mkPropertyValues({"POS": "1"})) diff --git a/sc/qa/uitest/range_name/create_range_name.py b/sc/qa/uitest/range_name/create_range_name.py index 1b400b1c6e03..16dcb551771e 100644 --- a/sc/qa/uitest/range_name/create_range_name.py +++ b/sc/qa/uitest/range_name/create_range_name.py @@ -23,7 +23,7 @@ class CreateRangeNameTest(UITestCase): xPosWindow = calcDoc.getChild('pos_window') self.assertEqual('A1', get_state_as_dict(xPosWindow)['Text']) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AddName", close_button="add") as xAddNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", close_button="add") as xAddNameDlg: xEdit = xAddNameDlg.getChild("edit") @@ -90,7 +90,7 @@ class CreateRangeNameTest(UITestCase): xPosWindow = calcDoc.getChild('pos_window') self.assertEqual('A1', get_state_as_dict(xPosWindow)['Text']) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AddName", close_button="add") as xAddNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", close_button="add") as xAddNameDlg: xEdit = xAddNameDlg.getChild("edit") diff --git a/sc/qa/uitest/range_name/tdf119954.py b/sc/qa/uitest/range_name/tdf119954.py index f90c73fe097d..3037044926a0 100644 --- a/sc/qa/uitest/range_name/tdf119954.py +++ b/sc/qa/uitest/range_name/tdf119954.py @@ -30,7 +30,7 @@ class tdf119954(UITestCase): # => see that the formula is =aaa instead of =bbb gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DefineDBName") as xDefineNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName") as xDefineNameDlg: xEntryBox = xDefineNameDlg.getChild("entry") type_text(xEntryBox, "aaa") add = xDefineNameDlg.getChild("add") @@ -38,7 +38,7 @@ class tdf119954(UITestCase): add.executeAction("CLICK", tuple()) gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DefineDBName") as xDefineNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName") as xDefineNameDlg: xEntryBox = xDefineNameDlg.getChild("entry") add = xDefineNameDlg.getChild("add") assign = xDefineNameDlg.getChild("assign") @@ -64,7 +64,7 @@ class tdf119954(UITestCase): self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getFormula(), "") # check cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DefineDBName", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/range_name/tdf138822.py b/sc/qa/uitest/range_name/tdf138822.py index 4e84ec53a4eb..3d0ec1e103a3 100644 --- a/sc/qa/uitest/range_name/tdf138822.py +++ b/sc/qa/uitest/range_name/tdf138822.py @@ -17,7 +17,7 @@ class tdf138822(UITestCase): xPosWindow = calcDoc.getChild('pos_window') self.assertEqual('A1', get_state_as_dict(xPosWindow)['Text']) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DefineName", close_button="add"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:DefineName", close_button="add"): pass xDefineNamesDialog = self.xUITest.getTopFocusWindow() @@ -42,7 +42,7 @@ class tdf138822(UITestCase): self.ui_test.close_dialog_through_button(xCancelBtn) # Open the dialog again - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DefineName") as xManageNamesDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DefineName") as xManageNamesDialog: xNamesList = xManageNamesDialog.getChild('names') diff --git a/sc/qa/uitest/range_name/tdf86214.py b/sc/qa/uitest/range_name/tdf86214.py index 3048e4d83927..7408fad03a38 100644 --- a/sc/qa/uitest/range_name/tdf86214.py +++ b/sc/qa/uitest/range_name/tdf86214.py @@ -17,7 +17,7 @@ class InvalidNames(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AddName", close_button="add") as xAddNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", close_button="add") as xAddNameDlg: invalid_names = ["A1", "12", "1.2", "A1:B2", "test.a", \ diff --git a/sc/qa/uitest/search_replace/replace.py b/sc/qa/uitest/search_replace/replace.py index 2ee5b950e504..5e6193c1034b 100644 --- a/sc/qa/uitest/search_replace/replace.py +++ b/sc/qa/uitest/search_replace/replace.py @@ -16,7 +16,7 @@ class ReplaceTest(UITestCase): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xSearchDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xSearchDlg: xSearchTerm = xSearchDlg.getChild("searchterm") diff --git a/sc/qa/uitest/search_replace/tdf132097.py b/sc/qa/uitest/search_replace/tdf132097.py index 0a3926b989bf..9795eb190b0b 100644 --- a/sc/qa/uitest/search_replace/tdf132097.py +++ b/sc/qa/uitest/search_replace/tdf132097.py @@ -14,7 +14,7 @@ class tdf132097(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: xCols = xDialog.getChild('cols') xSearchTerm = xDialog.getChild("searchterm") xBackSearch = xDialog.getChild("backsearch") diff --git a/sc/qa/uitest/search_replace/tdf132783.py b/sc/qa/uitest/search_replace/tdf132783.py index 7f7232b6e396..35b3eb9dfeb5 100644 --- a/sc/qa/uitest/search_replace/tdf132783.py +++ b/sc/qa/uitest/search_replace/tdf132783.py @@ -14,7 +14,7 @@ class tdf132783(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf132783.ods")) as calc_doc: for i in range(5): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: xSearchTerm = xDialog.getChild("searchterm") xSearchTerm.executeAction("TYPE", mkPropertyValues({"TEXT":"1"})) diff --git a/sc/qa/uitest/search_replace/tdf143759.py b/sc/qa/uitest/search_replace/tdf143759.py index c64e06d8493b..30d202dab925 100644 --- a/sc/qa/uitest/search_replace/tdf143759.py +++ b/sc/qa/uitest/search_replace/tdf143759.py @@ -22,7 +22,7 @@ class tdf143759(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:F6"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: xSearchterm = xDialog.getChild("searchterm") xSearchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) xSearchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/search_replace/tdf35020.py b/sc/qa/uitest/search_replace/tdf35020.py index 650405eb35dc..40d5199de824 100644 --- a/sc/qa/uitest/search_replace/tdf35020.py +++ b/sc/qa/uitest/search_replace/tdf35020.py @@ -20,7 +20,7 @@ class tdf35020(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/search_replace/tdf39917.py b/sc/qa/uitest/search_replace/tdf39917.py index bddb237214fb..d43791a2576d 100644 --- a/sc/qa/uitest/search_replace/tdf39917.py +++ b/sc/qa/uitest/search_replace/tdf39917.py @@ -60,7 +60,7 @@ class tdf39917(UITestCase): # Find: Page2 # Replace: Page3 # 6. Press Replace all - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/search_replace/tdf39959.py b/sc/qa/uitest/search_replace/tdf39959.py index 737dd0f4b03b..f9280614b436 100644 --- a/sc/qa/uitest/search_replace/tdf39959.py +++ b/sc/qa/uitest/search_replace/tdf39959.py @@ -25,7 +25,7 @@ class tdf39959(UITestCase): # 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_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/search_replace/tdf44398.py b/sc/qa/uitest/search_replace/tdf44398.py index ab54541c7a65..296b5897cf20 100644 --- a/sc/qa/uitest/search_replace/tdf44398.py +++ b/sc/qa/uitest/search_replace/tdf44398.py @@ -29,7 +29,7 @@ class tdf44398(UITestCase): # check regular expression # hit replace all - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) @@ -60,7 +60,7 @@ class tdf44398(UITestCase): # check case # hit replace all - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/search_replace/tdf44861.py b/sc/qa/uitest/search_replace/tdf44861.py index 565f4533ec3b..12cbdba410e3 100644 --- a/sc/qa/uitest/search_replace/tdf44861.py +++ b/sc/qa/uitest/search_replace/tdf44861.py @@ -24,7 +24,7 @@ class tdf44861(UITestCase): # check option "Enable regular expressions" # Press "Replace all" - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/search_replace/tdf57523.py b/sc/qa/uitest/search_replace/tdf57523.py index 10303b6416b6..ed0a22d3d016 100644 --- a/sc/qa/uitest/search_replace/tdf57523.py +++ b/sc/qa/uitest/search_replace/tdf57523.py @@ -22,7 +22,7 @@ class tdf57523(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py index 02b5e2142178..7ef20d449594 100644 --- a/sc/qa/uitest/solver/solver.py +++ b/sc/qa/uitest/solver/solver.py @@ -18,7 +18,7 @@ class solver(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SolverDialog", close_button="") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog", close_button="") as xDialog: xtargetedit = xDialog.getChild("targetedit") xvalue = xDialog.getChild("value") xvalueedit = xDialog.getChild("valueedit") diff --git a/sc/qa/uitest/statistics/anova.py b/sc/qa/uitest/statistics/anova.py index df095644a2e8..af2020db9f06 100644 --- a/sc/qa/uitest/statistics/anova.py +++ b/sc/qa/uitest/statistics/anova.py @@ -57,7 +57,7 @@ class anova(UITestCase): enter_text_to_cell(gridwin, "C10", "12") enter_text_to_cell(gridwin, "C11", "60") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:C13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AnalysisOfVarianceDialog") as xDialog: + 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") @@ -134,7 +134,7 @@ class anova(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AnalysisOfVarianceDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:AnalysisOfVarianceDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/chiSquare.py b/sc/qa/uitest/statistics/chiSquare.py index fc9a97d39695..644a0c419325 100644 --- a/sc/qa/uitest/statistics/chiSquare.py +++ b/sc/qa/uitest/statistics/chiSquare.py @@ -49,7 +49,7 @@ class chiSquare(UITestCase): enter_text_to_cell(gridwin, "B13", "33") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ChiSquareTestDialog") as xDialog: + 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") @@ -81,7 +81,7 @@ class chiSquare(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ChiSquareTestDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ChiSquareTestDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/correlation.py b/sc/qa/uitest/statistics/correlation.py index 30c84a0e15c8..7295496134c9 100644 --- a/sc/qa/uitest/statistics/correlation.py +++ b/sc/qa/uitest/statistics/correlation.py @@ -57,7 +57,7 @@ class correlation(UITestCase): enter_text_to_cell(gridwin, "C10", "12") enter_text_to_cell(gridwin, "C11", "60") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:CorrelationDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:CorrelationDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") @@ -95,7 +95,7 @@ class correlation(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:CorrelationDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:CorrelationDialog", close_button="cancel"): pass def test_statistic_correlation_row(self): @@ -151,7 +151,7 @@ class correlation(UITestCase): enter_text_to_cell(gridwin, "M1", "26") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:M3"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:CorrelationDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:CorrelationDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") diff --git a/sc/qa/uitest/statistics/covariance.py b/sc/qa/uitest/statistics/covariance.py index 141d2e1eac17..8d0dca2795a7 100644 --- a/sc/qa/uitest/statistics/covariance.py +++ b/sc/qa/uitest/statistics/covariance.py @@ -57,7 +57,7 @@ class covariance(UITestCase): enter_text_to_cell(gridwin, "C10", "12") enter_text_to_cell(gridwin, "C11", "60") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:CovarianceDialog") as xDialog: + 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") @@ -93,7 +93,7 @@ class covariance(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:CovarianceDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:CovarianceDialog", close_button="cancel"): pass def test_statistic_covariance_row(self): @@ -149,7 +149,7 @@ class covariance(UITestCase): enter_text_to_cell(gridwin, "M1", "26") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:M3"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:CovarianceDialog") as xDialog: + 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") diff --git a/sc/qa/uitest/statistics/descriptiveStatistics.py b/sc/qa/uitest/statistics/descriptiveStatistics.py index 29024f6ad5e2..cbc80d85c0d8 100644 --- a/sc/qa/uitest/statistics/descriptiveStatistics.py +++ b/sc/qa/uitest/statistics/descriptiveStatistics.py @@ -59,7 +59,7 @@ class descriptiveStatistics(UITestCase): enter_text_to_cell(gridwin, "C11", "60") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DescriptiveStatisticsDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:DescriptiveStatisticsDialog") as xDialog: xinputrangeedit = xDialog.getChild("input-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") @@ -150,7 +150,7 @@ class descriptiveStatistics(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:DescriptiveStatisticsDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:DescriptiveStatisticsDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/exponentialSmoothing.py b/sc/qa/uitest/statistics/exponentialSmoothing.py index 6ef75f3f1ed3..f823ae6d6535 100644 --- a/sc/qa/uitest/statistics/exponentialSmoothing.py +++ b/sc/qa/uitest/statistics/exponentialSmoothing.py @@ -48,7 +48,7 @@ class exponentialSmoothing(UITestCase): enter_text_to_cell(gridwin, "B13", "0") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ExponentialSmoothingDialog") as xDialog: + 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") @@ -104,7 +104,7 @@ class exponentialSmoothing(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ExponentialSmoothingDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ExponentialSmoothingDialog", close_button="cancel"): pass @@ -141,7 +141,7 @@ class exponentialSmoothing(UITestCase): enter_text_to_cell(gridwin, "B13", "0") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ExponentialSmoothingDialog") as xDialog: + 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") diff --git a/sc/qa/uitest/statistics/fTest.py b/sc/qa/uitest/statistics/fTest.py index 60ea83bde62b..eaa966b18685 100644 --- a/sc/qa/uitest/statistics/fTest.py +++ b/sc/qa/uitest/statistics/fTest.py @@ -49,7 +49,7 @@ class tTest(UITestCase): enter_text_to_cell(gridwin, "B13", "33") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FTestDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:FTestDialog") as xDialog: xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") @@ -107,7 +107,7 @@ class tTest(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FTestDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:FTestDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/movingAverage.py b/sc/qa/uitest/statistics/movingAverage.py index 1fade5fb7e0d..837b538b1a54 100644 --- a/sc/qa/uitest/statistics/movingAverage.py +++ b/sc/qa/uitest/statistics/movingAverage.py @@ -48,7 +48,7 @@ class movingAverage(UITestCase): enter_text_to_cell(gridwin, "B13", "0") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:MovingAverageDialog") as xDialog: + 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") @@ -100,7 +100,7 @@ class movingAverage(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:MovingAverageDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:MovingAverageDialog", close_button="cancel"): pass @@ -137,7 +137,7 @@ class movingAverage(UITestCase): enter_text_to_cell(gridwin, "B13", "0") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:MovingAverageDialog") as xDialog: + 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") diff --git a/sc/qa/uitest/statistics/regression.py b/sc/qa/uitest/statistics/regression.py index af1784db4778..43d8ca16712b 100644 --- a/sc/qa/uitest/statistics/regression.py +++ b/sc/qa/uitest/statistics/regression.py @@ -37,7 +37,7 @@ class regression(UITestCase): def _do_regression(self, regression_type, data_groupedby_column = True, calc_intercept = True): assert(regression_type == "LINEAR" or regression_type == "LOG" or regression_type == "POWER") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RegressionDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:RegressionDialog") as xDialog: xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") @@ -100,7 +100,7 @@ class regression(UITestCase): def test_regression_cancel(self): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RegressionDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:RegressionDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/sampling.py b/sc/qa/uitest/statistics/sampling.py index 82f304d25ab6..78781e9699c5 100644 --- a/sc/qa/uitest/statistics/sampling.py +++ b/sc/qa/uitest/statistics/sampling.py @@ -50,7 +50,7 @@ class sampling(UITestCase): enter_text_to_cell(gridwin, "C8", "38") enter_text_to_cell(gridwin, "C9", "39") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C9"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SamplingDialog") as xDialog: + 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") @@ -102,7 +102,7 @@ class sampling(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 7, 3).getValue() , 0) # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SamplingDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:SamplingDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/tTest.py b/sc/qa/uitest/statistics/tTest.py index 251064f45264..9df3e3736375 100644 --- a/sc/qa/uitest/statistics/tTest.py +++ b/sc/qa/uitest/statistics/tTest.py @@ -49,7 +49,7 @@ class tTest(UITestCase): enter_text_to_cell(gridwin, "B13", "33") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:TTestDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:TTestDialog") as xDialog: xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") @@ -108,7 +108,7 @@ class tTest(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:TTestDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:TTestDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/tdf76731.py b/sc/qa/uitest/statistics/tdf76731.py index 5fa78bd46c8a..a262a7ae6205 100644 --- a/sc/qa/uitest/statistics/tdf76731.py +++ b/sc/qa/uitest/statistics/tdf76731.py @@ -25,7 +25,7 @@ class anova(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C5"})) #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_guarded(".uno:AnalysisOfVarianceDialog") as xDialog: + 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") diff --git a/sc/qa/uitest/statistics/zTest.py b/sc/qa/uitest/statistics/zTest.py index d3cfe40d4a59..e4f5afe7a585 100644 --- a/sc/qa/uitest/statistics/zTest.py +++ b/sc/qa/uitest/statistics/zTest.py @@ -49,7 +49,7 @@ class zTest(UITestCase): enter_text_to_cell(gridwin, "B13", "33") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ZTestDialog") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:ZTestDialog") as xDialog: xvariable1rangeedit = xDialog.getChild("variable1-range-edit") xvariable2rangeedit = xDialog.getChild("variable2-range-edit") xoutputrangeedit = xDialog.getChild("output-range-edit") @@ -98,7 +98,7 @@ class zTest(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") # test cancel button - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ZTestDialog", close_button="cancel"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ZTestDialog", close_button="cancel"): pass # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/findReplace/findReplace.py b/sd/qa/uitest/findReplace/findReplace.py index 906f53bba363..ac9c0598329f 100644 --- a/sd/qa/uitest/findReplace/findReplace.py +++ b/sd/qa/uitest/findReplace/findReplace.py @@ -22,7 +22,7 @@ class findReplace(UITestCase): self.assertEqual(impress_doc.CurrentController.getCurrentPage().Number, 1) # search for string "second" - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"second"})) #2nd slide xsearch = xDialog.getChild("search") @@ -45,7 +45,7 @@ class findReplace(UITestCase): # click twice the Replace button, check "Replace first first" # open the dialog again - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: # verify search string is still "third" from previous search searchterm = xDialog.getChild("searchterm") @@ -70,7 +70,7 @@ class findReplace(UITestCase): replace.executeAction("CLICK", tuple()) #click twice Replace button (one selects, second replaces) # reopen the dialog, because of bug 122788 - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: # now replace first (uncheck match case) with word "aaa" - click once Replace All button, check "Replace aaa aaa" matchcase = xDialog.getChild("matchcase") @@ -84,14 +84,14 @@ class findReplace(UITestCase): replaceall.executeAction("CLICK", tuple()) # click on replace all button # go to second page - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"second"})) #2nd slide xsearch = xDialog.getChild("search") xsearch.executeAction("CLICK", tuple()) self.assertEqual(impress_doc.CurrentController.getCurrentPage().Number, 2) #now check if text "Replace aaa aaa" is on first slide - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") backsearch = xDialog.getChild("backsearch") searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) diff --git a/sw/qa/uitest/findReplace/findReplace.py b/sw/qa/uitest/findReplace/findReplace.py index bde76fec35cd..dc44ba0f414f 100644 --- a/sw/qa/uitest/findReplace/findReplace.py +++ b/sw/qa/uitest/findReplace/findReplace.py @@ -14,7 +14,7 @@ class findReplace(UITestCase): with self.ui_test.load_file(get_url_for_data_file("findReplace.odt")) as writer_doc: xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"second"})) #2nd page @@ -32,7 +32,7 @@ class findReplace(UITestCase): #now open dialog and verify find="third" (remember last value); replace value with "First" ( click match case) with word "Replace" - click twice Replace button, check "Replace first first" - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") self.assertEqual(get_state_as_dict(searchterm)["Text"], "third") searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) @@ -93,7 +93,7 @@ class findReplace(UITestCase): xWriterEdit = xWriterDoc.getChild("writer_edit") type_text(xWriterEdit, "test number1 testnot") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"T(est|other)\\>"})) #find replaceterm = xDialog.getChild("replaceterm") @@ -113,7 +113,7 @@ class findReplace(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf116242.odt")) as writer_doc: xWriterDoc = self.xUITest.getTopFocusWindow() - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"ţ"})) #find replaceterm = xDialog.getChild("replaceterm") @@ -132,7 +132,7 @@ class findReplace(UITestCase): with self.ui_test.load_file(get_url_for_data_file("findReplace.odt")) as writer_doc: xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"third"})) @@ -158,7 +158,7 @@ class findReplace(UITestCase): self.assertEqual(document.Text.String, "x") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"x"})) diff --git a/sw/qa/uitest/findReplace/findSimilarity.py b/sw/qa/uitest/findReplace/findSimilarity.py index a24e9078d7e8..5243b12d5264 100644 --- a/sw/qa/uitest/findReplace/findSimilarity.py +++ b/sw/qa/uitest/findReplace/findSimilarity.py @@ -19,7 +19,7 @@ class findSimilarities(UITestCase): self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1") # search and replace dialog #find = seco - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"seco"})) #seco # check similarities, button similarities, set values = 1; close dialog with OK diff --git a/sw/qa/uitest/findReplace/tdf106099.py b/sw/qa/uitest/findReplace/tdf106099.py index 843776fe4672..e1de17fbdc04 100644 --- a/sw/qa/uitest/findReplace/tdf106099.py +++ b/sw/qa/uitest/findReplace/tdf106099.py @@ -16,7 +16,7 @@ class tdf106099(UITestCase): with self.ui_test.create_doc_in_start_center("writer"): xWriterDoc = self.xUITest.getTopFocusWindow() #Find and replace - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: #2. Choose Format format = xDialog.getChild("format") with self.ui_test.execute_blocking_action(format.executeAction, args=('CLICK', ())) as dialog: diff --git a/sw/qa/uitest/findReplace/tdf118208.py b/sw/qa/uitest/findReplace/tdf118208.py index 57fcdea1f82d..4936a7bac2f2 100644 --- a/sw/qa/uitest/findReplace/tdf118208.py +++ b/sw/qa/uitest/findReplace/tdf118208.py @@ -36,7 +36,7 @@ class tdf118208(UITestCase): complexlanguage.executeAction("CLICK", tuple()) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: format = xDialog.getChild("format") diff --git a/sw/qa/uitest/findReplace/tdf119462.py b/sw/qa/uitest/findReplace/tdf119462.py index fa30ce500bfa..fabef77d7c1e 100644 --- a/sw/qa/uitest/findReplace/tdf119462.py +++ b/sw/qa/uitest/findReplace/tdf119462.py @@ -16,7 +16,7 @@ class tdf119462(UITestCase): with self.ui_test.create_doc_in_start_center("writer"): xWriterDoc = self.xUITest.getTopFocusWindow() #1. Choose Edit > Find and Replace - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: #2. Choose Format format = xDialog.getChild("format") with self.ui_test.execute_blocking_action(format.executeAction, args=('CLICK', ())) as dialog: diff --git a/sw/qa/uitest/findReplace/tdf126627.py b/sw/qa/uitest/findReplace/tdf126627.py index da7581796d16..f3c457462c8e 100644 --- a/sw/qa/uitest/findReplace/tdf126627.py +++ b/sw/qa/uitest/findReplace/tdf126627.py @@ -15,7 +15,7 @@ class tdf126627(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf126627.odt")) as writer_doc: xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"bar"})) @@ -35,7 +35,7 @@ class tdf126627(UITestCase): #4. Undo once-> Crash self.xUITest.executeCommand(".uno:Undo") #verify that we have now two words - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") self.assertEqual(get_state_as_dict(xselectwords)["Text"], "2") diff --git a/sw/qa/uitest/findReplace/tdf144089.py b/sw/qa/uitest/findReplace/tdf144089.py index 5f71c6a01742..60ccc54b0ce9 100644 --- a/sw/qa/uitest/findReplace/tdf144089.py +++ b/sw/qa/uitest/findReplace/tdf144089.py @@ -20,7 +20,7 @@ class tdf144089(UITestCase): self.assertEqual("test", document.CurrentSelection[0].String) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: xSearchterm = xDialog.getChild("searchterm") xSearchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) xSearchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sw/qa/uitest/findReplace/tdf44837.py b/sw/qa/uitest/findReplace/tdf44837.py index ace6a8afcbd7..d627460a26f2 100644 --- a/sw/qa/uitest/findReplace/tdf44837.py +++ b/sw/qa/uitest/findReplace/tdf44837.py @@ -19,7 +19,7 @@ class tdf44837(UITestCase): type_text(xWriterEdit, "asd asd") self.xUITest.executeCommand(".uno:SelectAll") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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"})) searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) diff --git a/sw/qa/uitest/macro_tests/tdf64690.py b/sw/qa/uitest/macro_tests/tdf64690.py index 00fe6f7aa802..8e04db282d05 100644 --- a/sw/qa/uitest/macro_tests/tdf64690.py +++ b/sw/qa/uitest/macro_tests/tdf64690.py @@ -34,7 +34,7 @@ class tdf64690(UITestCase): self.xUITest.executeCommand(".uno:SelectAll") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + 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/sw/qa/uitest/ui/index/index.py b/sw/qa/uitest/ui/index/index.py index b203c9de9e62..8170853e6250 100644 --- a/sw/qa/uitest/ui/index/index.py +++ b/sw/qa/uitest/ui/index/index.py @@ -19,7 +19,7 @@ class TestSwuiidxmrk(UITestCase): # Given an empty Writer document: with self.ui_test.create_doc_in_start_center("writer") as component: - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:InsertAuthoritiesEntry", close_button="close") as insert_entry: + with self.ui_test.execute_modeless_dialog_through_command(".uno:InsertAuthoritiesEntry", close_button="close") as insert_entry: from_document = insert_entry.getChild("fromdocument") from_document.executeAction("CLICK", tuple()) new = insert_entry.getChild("new") diff --git a/sw/qa/uitest/writer_tests/compareDocuments.py b/sw/qa/uitest/writer_tests/compareDocuments.py index bc21b53aedba..55a0618ea570 100644 --- a/sw/qa/uitest/writer_tests/compareDocuments.py +++ b/sw/qa/uitest/writer_tests/compareDocuments.py @@ -29,7 +29,7 @@ class compareDocuments(UITestCase): with self.ui_test.execute_dialog_through_action(xOpenBtn, 'CLICK', close_button="close"): pass - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: changesList = xTrackDlg.getChild("writerchanges") text = "Unknown Author\t" + datetime.datetime.now().strftime("%m/%d/%Y") @@ -54,7 +54,7 @@ class compareDocuments(UITestCase): with self.ui_test.execute_dialog_through_action(xOpenBtn, 'CLICK', close_button="close"): pass - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: changesList = xTrackDlg.getChild("writerchanges") # Check the number of changes diff --git a/sw/qa/uitest/writer_tests/trackedChanges.py b/sw/qa/uitest/writer_tests/trackedChanges.py index fafa93714cca..698202bf1647 100644 --- a/sw/qa/uitest/writer_tests/trackedChanges.py +++ b/sw/qa/uitest/writer_tests/trackedChanges.py @@ -23,7 +23,7 @@ class trackedchanges(UITestCase): selection = self.xUITest.executeCommand(".uno:SelectAll") #select whole text self.xUITest.executeCommand(".uno:Cut") #cut text - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close"): pass def test_tracked_changes_accept(self): @@ -36,7 +36,7 @@ class trackedchanges(UITestCase): type_text(xWriterEdit, "Test LibreOffice") self.xUITest.executeCommand(".uno:ShowTrackedChanges") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: xAccBtn = xTrackDlg.getChild("accept") xAccBtn.executeAction("CLICK", tuple()) @@ -52,7 +52,7 @@ class trackedchanges(UITestCase): type_text(xWriterEdit, "Test LibreOffice") self.xUITest.executeCommand(".uno:ShowTrackedChanges") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: xAccBtn = xTrackDlg.getChild("acceptall") xAccBtn.executeAction("CLICK", tuple()) @@ -70,7 +70,7 @@ class trackedchanges(UITestCase): type_text(xWriterEdit, "Test LibreOffice") self.xUITest.executeCommand(".uno:ShowTrackedChanges") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: xRejBtn = xTrackDlg.getChild("reject") xRejBtn.executeAction("CLICK", tuple()) @@ -87,7 +87,7 @@ class trackedchanges(UITestCase): type_text(xWriterEdit, "Test LibreOffice") self.xUITest.executeCommand(".uno:ShowTrackedChanges") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: xAccBtn = xTrackDlg.getChild("rejectall") xAccBtn.executeAction("CLICK", tuple()) @@ -136,7 +136,7 @@ class trackedchanges(UITestCase): "Unknown Author\t01/24/2020 16:19:39\t", "Xisco Fauli\t01/27/2020 17:42:55\t"] - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: changesList = xTrackDlg.getChild("writerchanges") resultsAccept = [ @@ -195,7 +195,7 @@ class trackedchanges(UITestCase): self.assertEqual(5, document.CurrentController.PageCount) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: changesList = xTrackDlg.getChild("writerchanges") self.assertEqual(147, len(changesList.getChildren())) diff --git a/sw/qa/uitest/writer_tests/wordCount.py b/sw/qa/uitest/writer_tests/wordCount.py index 4e0fe9298dcd..3632b4587c9a 100644 --- a/sw/qa/uitest/writer_tests/wordCount.py +++ b/sw/qa/uitest/writer_tests/wordCount.py @@ -20,7 +20,7 @@ class writerWordCount(UITestCase): type_text(xWriterEdit, "Test for word count dialog") #type text xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "8"})) #select two words - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") @@ -49,7 +49,7 @@ class writerWordCount(UITestCase): xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "24", "END_POS": "39"})) #select two words - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") xselectchars = xDialog.getChild("selectchars") @@ -73,13 +73,13 @@ class writerWordCount(UITestCase): with self.ui_test.create_doc_in_start_center("writer") as document: xWriterDoc = self.xUITest.getTopFocusWindow() - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close"): + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close"): pass def test_tdf58050(self): with self.ui_test.load_file(get_url_for_data_file("tdf58050.html")) as writer_doc: - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") @@ -107,7 +107,7 @@ class writerWordCount(UITestCase): #Open writer, enter "Testing one two! Test?" type_text(xWriterEdit, "Testing one two! Test?") #-> LO says: 4 words. SUCCESS! :) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") @@ -139,7 +139,7 @@ class writerWordCount(UITestCase): type_text(xWriterEdit, "This is a test sentence.") #3. Open the word count dialogue. # Word count in both, dialogue and status line, shows 5 words. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") @@ -163,7 +163,7 @@ class writerWordCount(UITestCase): #5. Replace selection by a non-breaking space by pressing Shift+Ctrl+Space. Don't move the cursor. self.xUITest.executeCommand(".uno:InsertNonBreakingSpace") # Word count in dialogue shows 4 words, whereas in the status line it shows 5 words. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") @@ -185,7 +185,7 @@ class writerWordCount(UITestCase): #6. Move the cursor by pressing Left. self.xUITest.executeCommand(".uno:GoLeft") # Word count in both, dialogue and status line, shows 5 words. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") @@ -211,7 +211,7 @@ class writerWordCount(UITestCase): xWriterEdit = xWriterDoc.getChild("writer_edit") #1. Open attached document #2. Tools> Word count - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") xselectchars = xDialog.getChild("selectchars") @@ -255,7 +255,7 @@ class writerWordCount(UITestCase): self.xUITest.executeCommand(".uno:SelectAll") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:WordCountDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog: xselectwords = xDialog.getChild("selectwords") xdocwords = xDialog.getChild("docwords") diff --git a/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py b/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py index 80b68f5ba687..e11931d75c38 100644 --- a/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py +++ b/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py @@ -14,7 +14,7 @@ class asianPhoneticGuide(UITestCase): with self.ui_test.create_doc_in_start_center("writer") as document: xWriterDoc = self.xUITest.getTopFocusWindow() - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:RubyDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:RubyDialog", close_button="close") as xDialog: xLeft1ED = xDialog.getChild("Left1ED") xRight1ED = xDialog.getChild("Right1ED") diff --git a/sw/qa/uitest/writer_tests4/spellDialog.py b/sw/qa/uitest/writer_tests4/spellDialog.py index 13cc43542fda..0181f1810596 100644 --- a/sw/qa/uitest/writer_tests4/spellDialog.py +++ b/sw/qa/uitest/writer_tests4/spellDialog.py @@ -66,7 +66,7 @@ frog, dogg, catt""" # Step 3: Initiate spellchecking, and make sure "Check grammar" is # unchecked - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SpellingAndGrammarDialog", close_button="") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SpellingAndGrammarDialog", close_button="") as xDialog: checkgrammar = xDialog.getChild('checkgrammar') if get_state_as_dict(checkgrammar)['Selected'] == 'true': checkgrammar.executeAction('CLICK', ()) @@ -100,7 +100,7 @@ frog, dogg, catt""" with self.ui_test.load_file(get_url_for_data_file("tdf66043.fodt")) as writer_doc: # Step 1: Initiate spellchecking, and make sure "Check grammar" is # unchecked - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SpellingAndGrammarDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SpellingAndGrammarDialog", close_button="close") as xDialog: checkgrammar = xDialog.getChild('checkgrammar') if get_state_as_dict(checkgrammar)['Selected'] == 'true': checkgrammar.executeAction('CLICK', ()) diff --git a/sw/qa/uitest/writer_tests4/tdf122449.py b/sw/qa/uitest/writer_tests4/tdf122449.py index eb1f34c4d248..ecc391940fbc 100644 --- a/sw/qa/uitest/writer_tests4/tdf122449.py +++ b/sw/qa/uitest/writer_tests4/tdf122449.py @@ -18,7 +18,7 @@ class tdf122449(UITestCase): xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") #search word Autocorrect (second find) .uno:SearchDialog - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"Autocorrection"})) diff --git a/sw/qa/uitest/writer_tests6/tdf126017.py b/sw/qa/uitest/writer_tests6/tdf126017.py index 4adba3be3b0c..2a7b6d9d81ee 100644 --- a/sw/qa/uitest/writer_tests6/tdf126017.py +++ b/sw/qa/uitest/writer_tests6/tdf126017.py @@ -16,7 +16,7 @@ class tdf126017(UITestCase): xWriterDoc = self.xUITest.getTopFocusWindow() #go to TOC - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:SearchDialog", close_button="close") as xDialog: + with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: searchterm = xDialog.getChild("searchterm") searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"aasasas"})) xsearch = xDialog.getChild("search") diff --git a/sw/qa/uitest/writer_tests7/forms.py b/sw/qa/uitest/writer_tests7/forms.py index 5efa7f380d20..0d5c26703ae4 100644 --- a/sw/qa/uitest/writer_tests7/forms.py +++ b/sw/qa/uitest/writer_tests7/forms.py @@ -18,7 +18,7 @@ class Forms(UITestCase): self.xUITest.executeCommand(".uno:JumpToNextFrame") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xChild = self.ui_test.wait_until_child_is_available('listbox-Empty string is NULL') # Without the fix in place, this test would have failed with @@ -31,7 +31,7 @@ class Forms(UITestCase): self.xUITest.executeCommand(".uno:JumpToNextFrame") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xChild = self.ui_test.wait_until_child_is_available('listbox-Text type') # Without the fix in place, this test would have failed with @@ -43,7 +43,7 @@ class Forms(UITestCase): # Reuse document from tdf#140239 with self.ui_test.load_file(get_url_for_data_file("tdf140239.odt")): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FormProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:FormProperties", close_button=""): xURL = self.ui_test.wait_until_child_is_available('urlcontrol-URL') xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "1"})) @@ -62,7 +62,7 @@ class Forms(UITestCase): self.xUITest.executeCommand(".uno:JumpToNextFrame") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xAction = self.ui_test.wait_until_child_is_available('listbox-Action') xURL = self.ui_test.wait_until_child_is_available('urlcontrol-URL') xEntry = self.ui_test.wait_until_child_is_available('entry') @@ -106,7 +106,7 @@ class Forms(UITestCase): self.xUITest.executeCommand(".uno:JumpToNextFrame") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xChild = self.ui_test.wait_until_child_is_available('combobox-Data field') xChild.executeAction("TYPE", mkPropertyValues({"TEXT": "1"})) @@ -133,7 +133,7 @@ class Forms(UITestCase): self.assertEqual(13996, shape.getSize().Width) self.assertEqual(2408, shape.getSize().Height) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xWidth = self.ui_test.wait_until_child_is_available('numericfield-Width') xHeight = self.ui_test.wait_until_child_is_available('numericfield-Height') @@ -173,7 +173,7 @@ class Forms(UITestCase): for i, name in enumerate(['formattedcontrol-Value min.', 'formattedcontrol-Value max.']): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xChild = self.ui_test.wait_until_child_is_available(name) self.assertEqual(aOldValue[i], get_state_as_dict(xChild)['Text']) @@ -186,7 +186,7 @@ class Forms(UITestCase): #Close the dialog and open it again self.xUITest.executeCommand(".uno:ControlProperties") - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:ControlProperties", close_button=""): + with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""): xChild = self.ui_test.wait_until_child_is_available(name) # Without the fix in place, this test would have failed here because diff --git a/sw/qa/uitest/writer_tests7/tdf140731.py b/sw/qa/uitest/writer_tests7/tdf140731.py index 99648f5978fb..dfe825dc523c 100644 --- a/sw/qa/uitest/writer_tests7/tdf140731.py +++ b/sw/qa/uitest/writer_tests7/tdf140731.py @@ -33,7 +33,7 @@ class tdf140731(UITestCase): self.assertTrue(document.Redlines.createEnumeration().hasMoreElements()) #Removing all the redlines. - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: xAccBtn = xTrackDlg.getChild("rejectall") xAccBtn.executeAction("CLICK", tuple()) diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py b/sw/qa/uitest/writer_tests7/tdf90401.py index ce01492efced..5fa131be7839 100644 --- a/sw/qa/uitest/writer_tests7/tdf90401.py +++ b/sw/qa/uitest/writer_tests7/tdf90401.py @@ -82,7 +82,7 @@ class tdf90401(UITestCase): self.assertEqual(year, 0) # check removed personal info on tracked changes - with self.ui_test.execute_modeless_dialog_through_command_guarded('.uno:AcceptTrackedChanges', close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges', close_button="close") as xTrackDlg: xTreeList = xTrackDlg.getChild('writerchanges') state = get_state_as_dict(xTreeList) # This was 'NL\t11/03/2020 19:19:05\t', containing personal info @@ -162,7 +162,7 @@ class tdf90401(UITestCase): # check removed personal info on tracked changes - with self.ui_test.execute_modeless_dialog_through_command_guarded('.uno:AcceptTrackedChanges', close_button="close") as xTrackDlg: + with self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges', close_button="close") as xTrackDlg: xTreeList = xTrackDlg.getChild('writerchanges') state = get_state_as_dict(xTreeList) # This was 'NL\t11/03/2020 19:19:05\t', containing personal info diff --git a/uitest/demo_ui/combobox.py b/uitest/demo_ui/combobox.py index d2e8491c161c..00080b3fa2b0 100644 --- a/uitest/demo_ui/combobox.py +++ b/uitest/demo_ui/combobox.py @@ -16,7 +16,7 @@ class ComboBoxTest(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AddName", close_button="cancel") as xAddNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", close_button="cancel") as xAddNameDlg: scopeCB = xAddNameDlg.getChild("scope") select_pos(scopeCB, "1") diff --git a/uitest/demo_ui/edit.py b/uitest/demo_ui/edit.py index 94b86c639d0a..e6ac12a7d8e9 100644 --- a/uitest/demo_ui/edit.py +++ b/uitest/demo_ui/edit.py @@ -18,7 +18,7 @@ class EditTest(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AddName", close_button="cancel") as xAddNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", close_button="cancel") as xAddNameDlg: xEdit = xAddNameDlg.getChild("edit") @@ -30,7 +30,7 @@ class EditTest(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:AddName", close_button="cancel") as xAddNameDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:AddName", close_button="cancel") as xAddNameDlg: xEdit = xAddNameDlg.getChild("edit") diff --git a/uitest/demo_ui/tabcontrol.py b/uitest/demo_ui/tabcontrol.py index 505bd5690b87..883fecb0890b 100644 --- a/uitest/demo_ui/tabcontrol.py +++ b/uitest/demo_ui/tabcontrol.py @@ -23,7 +23,7 @@ class TabControlTest(UITestCase): enter_text_to_cell(xGridWindow, "B2", "=2+3+4") xGridWindow.executeAction("SELECT", mkPropertyValues({"CELL": "B2"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FunctionDialog", close_button="cancel") as xFunctionDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog", close_button="cancel") as xFunctionDlg: xTabs = xFunctionDlg.getChild("tabcontrol") diff --git a/uitest/demo_ui/treelist.py b/uitest/demo_ui/treelist.py index eb6a90b8ef1e..a8461ad7f8f3 100644 --- a/uitest/demo_ui/treelist.py +++ b/uitest/demo_ui/treelist.py @@ -23,7 +23,7 @@ class TreeListTest(UITestCase): enter_text_to_cell(xGridWindow, "B2", "=2+3+4") xGridWindow.executeAction("SELECT", mkPropertyValues({"CELL": "B2"})) - with self.ui_test.execute_modeless_dialog_through_command_guarded(".uno:FunctionDialog", close_button="cancel") as xFunctionDlg: + with self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog", close_button="cancel") as xFunctionDlg: xTabs = xFunctionDlg.getChild("tabcontrol") diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 48ddf2833035..2dddd39038c4 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -126,24 +126,10 @@ class UITest(object): time.sleep(DEFAULT_SLEEP) @contextmanager - def execute_modeless_dialog_through_command_guarded(self, command, printNames=False, close_button = "ok"): + def execute_modeless_dialog_through_command(self, command, printNames=False, close_button = "ok"): with self.execute_dialog_through_command(command, printNames, close_button, "ModelessDialogVisible") as xDialog: yield xDialog - def execute_modeless_dialog_through_command(self, command, printNames=False): - with EventListener(self._xContext, "ModelessDialogVisible", printNames = printNames) as event: - if not self._xUITest.executeCommand(command): - raise Exception("Dialog not executed for: " + command) - time_ = 0 - while time_ < MAX_WAIT: - if event.executed: - time.sleep(DEFAULT_SLEEP) - return - time_ += DEFAULT_SLEEP - time.sleep(DEFAULT_SLEEP) - - raise Exception("Dialog not executed for: " + command) - # Calls UITest.close_dialog_through_button at exit @contextmanager def execute_dialog_through_action(self, ui_object, action, parameters = None, event_name = "DialogExecute", close_button = "ok"): |