Hi all,

I have started to work on tdf#160018.
https://gerrit.libreoffice.org/c/core/+/198849

I want to add a test to
sc/qa/uitest/autofilter/autofilterBugs.py
Something like:

def test_tdf160018_use_on_database_range(self):
    with
self.ui_test.load_file(get_url_for_data_file("tdf160018_use_on_database_range.ods")):
        xGridWin =
self.xUITest.getTopFocusWindow().getChild("grid_window")
        # select database range with name "upper"
        # ???

        # Open Autofilter and cancel immediately
        xGridWindow.executeAction("LAUNCH",
mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "2"}))
        xFloatWindow = self.xUITest.getFloatWindow()
        xButton = xFloatWindow.getChild("cancel")
        xButton.executeAction("CLICK", tuple())

        # select database range with name "upper"
        # ???

        # verify size. Error was, that the range was extended to row B18
        gridWinState = get_state_as_dict(xGridWin)
        self.assertEqual(gridWinState["MarkedArea"],
"Sheet1.A3:Sheet1.B11")

How do I select a specific named database range?
In Basic, using dispatcher it would be:

dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "DbName"
args2(0).Value = "upper"
dispatcher.executeDispatch(document, ".uno:SelectDB", "", 0, args2())

Kind regards,
Regina

Reply via email to