From dc30558833ce1194e58be7e4283cf40012dcff9d Mon Sep 17 00:00:00 2001 From: downtownallday Date: Thu, 20 Apr 2023 09:59:17 -0400 Subject: [PATCH] tests: fix logout sequence for nc 26 --- tests/lib/python/browser/NextcloudAutomation.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/lib/python/browser/NextcloudAutomation.py b/tests/lib/python/browser/NextcloudAutomation.py index df2eedf9..4c31b96c 100644 --- a/tests/lib/python/browser/NextcloudAutomation.py +++ b/tests/lib/python/browser/NextcloudAutomation.py @@ -35,8 +35,15 @@ class NextcloudAutomation(object): def logout(self): d = self.d d.say("Logout of Nextcloud") - d.find_el('#settings .avatardiv').click() - d.find_el('[data-id="logout"] a').click() + el = d.find_el('#user-menu > a', throws=False) + if not el: + # nc < 26 + d.find_el('#settings .avatardiv').click() + d.find_el('[data-id="logout"] a').click() + else: + # nc >= 26 + el.click() + d.find_el('#logout > a').click() def open_contacts(self): d = self.d