@@ -105,7 +105,7 @@ def below(self, element_or_locator: Union[WebElement, Dict] = None) -> "Relative
105
105
- element_or_locator: Element to look below
106
106
"""
107
107
if not element_or_locator :
108
- raise WebDriverException ("Element or locator must be given when calling above method" )
108
+ raise WebDriverException ("Element or locator must be given when calling below method" )
109
109
110
110
self .filters .append ({"kind" : "below" , "args" : [element_or_locator ]})
111
111
return self
@@ -117,7 +117,7 @@ def to_left_of(self, element_or_locator: Union[WebElement, Dict] = None) -> "Rel
117
117
- element_or_locator: Element to look to the left of
118
118
"""
119
119
if not element_or_locator :
120
- raise WebDriverException ("Element or locator must be given when calling above method" )
120
+ raise WebDriverException ("Element or locator must be given when calling to_left_of method" )
121
121
122
122
self .filters .append ({"kind" : "left" , "args" : [element_or_locator ]})
123
123
return self
@@ -129,7 +129,7 @@ def to_right_of(self, element_or_locator: Union[WebElement, Dict] = None) -> "Re
129
129
- element_or_locator: Element to look right of
130
130
"""
131
131
if not element_or_locator :
132
- raise WebDriverException ("Element or locator must be given when calling above method" )
132
+ raise WebDriverException ("Element or locator must be given when calling to_right_of method" )
133
133
134
134
self .filters .append ({"kind" : "right" , "args" : [element_or_locator ]})
135
135
return self
@@ -141,7 +141,7 @@ def near(self, element_or_locator_distance: Union[WebElement, Dict, int] = None)
141
141
- element_or_locator_distance: Element to look near by the element or within a distance
142
142
"""
143
143
if not element_or_locator_distance :
144
- raise WebDriverException ("Element or locator or distance must be given when calling above method" )
144
+ raise WebDriverException ("Element or locator or distance must be given when calling near method" )
145
145
146
146
self .filters .append ({"kind" : "near" , "args" : [element_or_locator_distance ]})
147
147
return self
0 commit comments