82d417b9e6
Fresh start for the StarlingX automation framework. Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
37 lines
717 B
Python
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}"
|