test/framework/web/web_locator.py
croy 82d417b9e6 New StarlingX Automation Framework
Fresh start for the StarlingX automation framework.

Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
2024-11-29 16:01:57 -05:00

37 lines
717 B
Python

class WebLocator:
def __init__(self, locator: str, by: str):
"""
Constructor
Args:
locator: The locator that we want to use to target this element.
by: The type of locator that is used.
"""
self.locator = locator
self.by = by
def get_locator(self):
"""
Getter for the locator.
Returns:
"""
return self.locator
def get_by(self):
"""
Getter for the Type of Locator
Returns:
"""
return self.by
def __str__(self):
"""
String representation of this object.
Returns:
"""
return f"{self.by}: {self.locator}"