Adding some more check for exists in web ui classes

Another simple test with some more examples.

Change-Id: I4188eb6a743123eee22ce7bf48915f055922f3e9
Signed-off-by: jpike <jason.pike@windriver.com>
This commit is contained in:
jpike
2025-08-20 08:39:43 -04:00
committed by Jason Pike
parent 1f838ec6a4
commit ca9c131486

View File

@@ -0,0 +1,29 @@
from selenium.webdriver.remote.webelement import WebElement
from framework.web.action.web_action import WebAction
class WebActionIsExists(WebAction):
"""
Class representing a Web Is Exists action.
"""
def perform_action(self, web_element: WebElement, *args):
"""
Override the parent's perform action with a check for exists
Args:
web_element: Element to check if it exists.
*args: Unused arguments to follow the override signature.
Returns: None
"""
return web_element.is_displayed()
def __str__(self):
"""
String representation of this action.
Returns:
"""
return "IS_EXISTS"