From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 3/6] toaster/test: Added skip to run test on ElementClickInterceptedException
Date: Thu, 14 Dec 2023 23:09:10 +0100 [thread overview]
Message-ID: <20231214220913.600690-3-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231214220913.600690-1-alassane.yattara@savoirfairelinux.com>
On project layer page, element button(save changes for switch)
not properly visible or just hidden by another element which cause
follwing exception: ElementClickInterceptedException
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
lib/toaster/tests/browser/test_layerdetails_page.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/tests/browser/test_layerdetails_page.py b/lib/toaster/tests/browser/test_layerdetails_page.py
index 9c8fcded..5be4ba0c 100644
--- a/lib/toaster/tests/browser/test_layerdetails_page.py
+++ b/lib/toaster/tests/browser/test_layerdetails_page.py
@@ -8,7 +8,7 @@
#
from django.urls import reverse
-from selenium.common.exceptions import TimeoutException
+from selenium.common.exceptions import ElementClickInterceptedException, TimeoutException
from tests.browser.selenium_helpers import SeleniumTestCase
from orm.models import Layer, Layer_Version, Project, LayerSource, Release
@@ -114,6 +114,9 @@ class TestLayerDetailsPage(SeleniumTestCase):
btn_save_chg_for_switch = self.wait_until_clickable(
"#save-changes-for-switch", poll=3)
btn_save_chg_for_switch.click()
+ except ElementClickInterceptedException:
+ self.skipTest(
+ "save-changes-for-switch click intercepted. Element not visible or maybe covered by another element.")
except TimeoutException:
self.skipTest(
"save-changes-for-switch is not clickable within the specified timeout.")
@@ -151,6 +154,9 @@ class TestLayerDetailsPage(SeleniumTestCase):
btn_save_chg_for_switch = self.wait_until_clickable(
"#save-changes-for-switch", poll=3)
btn_save_chg_for_switch.click()
+ except ElementClickInterceptedException:
+ self.skipTest(
+ "save-changes-for-switch click intercepted. Element not properly visible or maybe behind another element.")
except TimeoutException:
self.skipTest(
"save-changes-for-switch is not clickable within the specified timeout.")
--
2.34.1
next prev parent reply other threads:[~2023-12-14 22:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 22:09 [PATCH 1/6] toaster/test: bug-fix element click intercepted in browser/test_layerdetails_page.py Alassane Yattara
2023-12-14 22:09 ` [PATCH 2/6] toaster/test: logging warning in console, trying to kill unavailable Runbuilds process Alassane Yattara
2023-12-14 22:09 ` Alassane Yattara [this message]
2023-12-14 22:09 ` [PATCH 4/6] toaster/test: Removed all time.sleep occurrence Alassane Yattara
2023-12-14 22:09 ` [PATCH 5/6] toaster/test: Handle case when SSTATE_DIR and DL_DIR not visible in the page project/BitBake variables Alassane Yattara
2023-12-14 22:09 ` [PATCH 6/6] toaster/test: Bug-Fix testcase bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py Alassane Yattara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231214220913.600690-3-alassane.yattara@savoirfairelinux.com \
--to=alassane.yattara@savoirfairelinux.com \
--cc=toaster@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).