[kde-linux/os-autoinst-distri-kdelinux] extensions/openqa/usr/lib/kde-linux-openqa/tests: Match file on desktop by class name, not xpath

Thomas Duckworth <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit fb17254536aed17dadf3c7da1e73236635a2f5b0 by Thomas Duckworth.
Committed on 23/07/2026 at 05:54.
Pushed by tduck into branch 'master'.

Match file on desktop by class name, not xpath

Should reduce some sources of flakiness.

M  +1    -1    extensions/openqa/usr/lib/kde-linux-openqa/tests/create_file.py

https://invent.kde.org/kde-linux/os-autoinst-distri-kdelinux/-/commit/fb17254536aed17dadf3c7da1e73236635a2f5b0

diff --git a/extensions/openqa/usr/lib/kde-linux-openqa/tests/create_file.py b/extensions/openqa/usr/lib/kde-linux-openqa/tests/create_file.py
index 8d66217..1f2ff5d 100644
--- a/extensions/openqa/usr/lib/kde-linux-openqa/tests/create_file.py
+++ b/extensions/openqa/usr/lib/kde-linux-openqa/tests/create_file.py
@@ -82,7 +82,7 @@ class CreateFileTests(unittest.TestCase):
 
         # Check if we now have an entry on the desktop
         wait.until(
-            ec.presence_of_element_located((AppiumBy.XPATH, f"//canvas[@name='{TEST_FILE_NAME}']"))
+            ec.presence_of_element_located((AppiumBy.CLASS_NAME, f"[canvas | {TEST_FILE_NAME}]"))
         )
 
     def test_2_verify_file_existence(self):
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.