Bug 147628 - UI logger: variable used in generated test before its definition
Summary: UI logger: variable used in generated test before its definition
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:45 UTC by Buovjaga
Modified: 2024-01-12 09:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Logger output (407 bytes, text/x-log)
2022-02-24 06:45 UTC, Buovjaga
Details
Python UI test file (1.67 KB, text/x-python)
2022-02-24 06:45 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:45:15 UTC
Created attachment 178497 [details]
Logger output

Command used to launch logging session:
PYTHONPATH=/home/user/libreoffice/instdir/program URE_BOOTSTRAP=file:////home/user/libreoffice/instdir/program/fundamentalrc LO_COLLECT_UIINFO="hyperlink_test_shortcut.log" SAL_USE_VCLPLUGIN=gen /home/user/libreoffice/instdir/program/soffice

1. Press w to open Writer
2. Press Ctrl-K to open Hyperlink dialog
3. Cancel and quit

Command used to process the log file:
python /home/user/libreoffice/uitest/ui_logger_dsldsl_core.py /home/user/libreoffice/instdir/uitest/hyperlink_test_shortcut.log /home/user/libreoffice/sw/qa/uitest/hyperlink_test_shortcut.py

The generated test has on line 17:
open_recent = MainWindow.getChild("open_recent")

but the definition comes later on line 20:
MainWindow = self.xUITest.getTopFocusWindow()

Actually, these lines are not needed at all
open_recent = MainWindow.getChild("open_recent")
open_recent.executeAction("TYPE", mkPropertyValues({"TEXT": "w"}))

as this already gets us Writer:
with self.ui_test.create_doc_in_start_center("writer") as document:

The generated test also has indentation issues, but I will report this separately.
Comment 1 Buovjaga 2022-02-24 06:45:45 UTC
Created attachment 178498 [details]
Python UI test file
Comment 2 alisha oberoi 2023-09-06 06:04:05 UTC Comment hidden (spam)
Comment 3 Shruti goyal 2024-01-12 09:11:45 UTC Comment hidden (spam)