dbaccess/source/ui/browser/sbagrid.cxx             |    5 ++++-
 dbaccess/source/ui/tabledesign/TableDesignView.cxx |    3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit fcab3bd90bfe0656a677a1b00b297eb25bea1ce3
Author:     Neil Roberts <[email protected]>
AuthorDate: Wed Oct 29 15:05:35 2025 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Oct 30 11:31:07 2025 +0100

    Add an ID for OTableEditorCtrl and SbaGridControl for UITests
    
    This makes it easier to find the two controls in UITests. Otherwise they
    are buried in a hierarchy of windows that also don’t have a name so they
    are difficult to get access to. I mainly wanted to do this to switch
    between the selected rows via key presses. There doesn’t seem to be any
    commands or any other easy way to select a row in a test.
    
    Change-Id: Ic20ee4f2b1e416e4274a2f159a27448f4b3580ef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193173
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins

diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index e962b8331b1e..72d6eb64c851 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -465,7 +465,10 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes()
 
 VclPtr<FmGridControl> SbaXGridPeer::imp_CreateControl(vcl::Window* pParent, 
WinBits nStyle)
 {
-    return VclPtr<SbaGridControl>::Create( m_xContext, pParent, this, nStyle);
+    auto pGridControl = VclPtr<SbaGridControl>::Create( m_xContext, pParent, 
this, nStyle);
+    // Set an ID on the grid to make it easier to do UI testing
+    pGridControl->set_id("DBGrid");
+    return pGridControl;
 }
 
 // SbaGridHeader
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx 
b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index cb1ed139d287..0054583af574 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -43,6 +43,9 @@ OTableBorderWindow::OTableBorderWindow(OTableDesignView* 
pParent)
     , m_xFieldDescParent(m_xBuilder->weld_container(u"fielddesc"_ustr))
     , m_xFieldDescWin(new OTableFieldDescWin(m_xFieldDescParent.get(), 
pParent))
 {
+    // Set an ID on the edit control to make it easier to do UI testing
+    m_xEditorCtrl->set_id("DBTableEditor");
+
     SetStyle(GetStyle() | WB_DIALOGCONTROL);
 
     m_xFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN);

Reply via email to