Bug 147630 - UI logger can't handle Hyperlink dialog as it does not contain child "tabcontrol"
Summary: UI logger can't handle Hyperlink dialog as it does not contain child "tabcont...
Status: NEW
Alias: None
Product: QA Tools
Classification: Unclassified
Component: General (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-24 06:51 UTC by Buovjaga
Modified: 2023-09-06 06:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Python UI test file (1.49 KB, text/x-python)
2022-02-24 06:51 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2022-02-24 06:51:21 UTC
Created attachment 178499 [details]
Python UI test file

Bash script executed inside libreoffice directory:
export PYTHONPATH=/home/user/libreoffice/instdir/program/
export PYTHONPATH=$PYTHONPATH:/home/user/libreoffice/unotest/source/python/
export URE_BOOTSTRAP=file:///home/user/libreoffice/instdir/program/fundamentalrc
export TestUserDir=file:///tmp
export TDOC=/home/user/libreoffice/sw/qa/uitest/data
export SAL_USE_VCLPLUGIN=gen
export LC_ALL=C

rm -rf /tmp/libreoffice/4

SRCDIR="${SRCDIR:-$(pwd)}"
python3 "$SRCDIR"/uitest/test_main.py --debug --soffice=path:"$SRCDIR"/instdir/program/soffice --userdir=file:///tmp/libreoffice/4 --file="$SRCDIR"/sw/qa/uitest/hyperlink_test_shortcut_cleaned.py

Error after the test opens Hyperlink dialog:
======================================================================
ERROR: test_function (hyperlink_test_shortcut_cleaned.TestClass)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/libreoffice/sw/qa/uitest/hyperlink_test_shortcut_cleaned.py", line 23, in test_function
    tabcontrol = MainWindow.getChild("tabcontrol")
uno.com.sun.star.uno.RuntimeException: Could not find child with id: tabcontrol at /home/user/libreoffice/vcl/source/uitest/uiobject.cxx:467

self.xUITest.getTopFocusWindow() in a hyperlink dialog opening test does not contain the child "tabcontrol" and thus the test errors out.

Relevant code paths:
WindowUIObject::get_child in vcl/source/uitest/uiobject.cxx
UITest::getFocusTopWindow in vcl/source/uitest/uitest.cxx

UITestUnoObj::getTopFocusWindow in vcl/source/uitest/uno/uitest_uno.cxx calls UITest::getFocusTopWindow

Keep in mind the subtle naming differences FocusTop vs. TopFocus.
Comment 1 alisha oberoi 2023-09-06 06:05:10 UTC Comment hidden (spam)