
Another simple test with some more examples. Change-Id: I4188eb6a743123eee22ce7bf48915f055922f3e9 Signed-off-by: jpike <jason.pike@windriver.com>
30 lines
717 B
Python
30 lines
717 B
Python
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"
|