@@ -266,7 +266,8 @@ def get_link_attribute(self, link_text, attribute, hard_fail=True):
266
266
else :
267
267
return None
268
268
269
- def get_partial_link_attribute (self , link_text , attribute , hard_fail = True ):
269
+ def get_partial_link_text_attribute (self , link_text , attribute ,
270
+ hard_fail = True ):
270
271
""" Finds a link by partial link text and then returns the attribute's
271
272
value. If the partial link text or attribute cannot be found, an
272
273
exception will get raised if hard_fail is True (otherwise None
@@ -462,7 +463,7 @@ def click_partial_link_text(self, partial_link_text,
462
463
element .click ()
463
464
except Exception :
464
465
found_css = False
465
- text_id = self .get_partial_link_attribute (
466
+ text_id = self .get_partial_link_text_attribute (
466
467
partial_link_text , "id" , False )
467
468
if text_id :
468
469
link_css = '[id="%s"]' % partial_link_text
@@ -477,14 +478,14 @@ def click_partial_link_text(self, partial_link_text,
477
478
found_css = True
478
479
479
480
if not found_css :
480
- ngclick = self .get_partial_link_attribute (
481
+ ngclick = self .get_partial_link_text_attribute (
481
482
partial_link_text , "ng-click" , False )
482
483
if ngclick :
483
484
link_css = '[ng-click="%s"]' % ngclick
484
485
found_css = True
485
486
486
487
if not found_css :
487
- onclick = self .get_partial_link_attribute (
488
+ onclick = self .get_partial_link_text_attribute (
488
489
partial_link_text , "onclick" , False )
489
490
if onclick :
490
491
link_css = '[onclick="%s"]' % onclick
@@ -3197,7 +3198,8 @@ def __click_dropdown_link_text(self, link_text, link_css):
3197
3198
return False
3198
3199
3199
3200
def __get_href_from_partial_link_text (self , link_text , hard_fail = True ):
3200
- href = self .get_partial_link_attribute (link_text , "href" , hard_fail )
3201
+ href = self .get_partial_link_text_attribute (
3202
+ link_text , "href" , hard_fail )
3201
3203
if not href :
3202
3204
return None
3203
3205
if href .startswith ('//' ):
0 commit comments