diff options
author | Chenxiong Qi <qcxhome@gmail.com> | 2023-12-20 20:54:05 +0800 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2024-01-23 14:00:46 +0100 |
commit | 74de0ebb810f3e13c45f01c63067cb8de794ce3c (patch) | |
tree | b5f069ad74d12b5ce095b4ad9159861fd1445614 /cui/qa/uitest/dialogs | |
parent | 3a20c691ab1d6a16ad0fc144926b22c098552be4 (diff) |
tdf#97361 Make unittests more pythonic: XIndexAccess
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'cui/qa/uitest/dialogs')
-rw-r--r-- | cui/qa/uitest/dialogs/chardlg.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py index 6da1e21e2162..686cb6472ac8 100644 --- a/cui/qa/uitest/dialogs/chardlg.py +++ b/cui/qa/uitest/dialogs/chardlg.py @@ -54,7 +54,7 @@ class Test(UITestCase): editWin = doc.getChild("impress_win") # Set theme colors. - drawPage = component.getDrawPages().getByIndex(0) + drawPage = component.getDrawPages()[0] master = drawPage.MasterPage theme = mkPropertyValues({ "Name": "nameA", @@ -98,8 +98,8 @@ class Test(UITestCase): colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": "16"})) # Then make sure the doc model has the correct color theme index: - drawPage = component.getDrawPages().getByIndex(0) - shape = drawPage.getByIndex(0) + drawPage = component.getDrawPages()[0] + shape = drawPage[0] paragraphs = shape.createEnumeration() paragraph = paragraphs.nextElement() portions = paragraph.createEnumeration() |