Skip to content

Commit ab39ce5

Browse files
committed
Update methods that handle link text in dropdowns
1 parent 3f9602d commit ab39ce5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,7 @@ def __click_dropdown_link_text(self, link_text, link_css):
31743174
csstype = link_css.split('[')[1].split('=')[0]
31753175
for item in drop_down_list:
31763176
item_text_list = item.text.split('\n')
3177-
if link_text in item.text.split('\n') and csstype in item.decode():
3177+
if link_text in item_text_list and csstype in item.decode():
31783178
dropdown_css = ""
31793179
try:
31803180
for css_class in item['class']:
@@ -3218,7 +3218,8 @@ def __click_dropdown_partial_link_text(self, link_text, link_css):
32183218
drop_down_list.append(item)
32193219
csstype = link_css.split('[')[1].split('=')[0]
32203220
for item in drop_down_list:
3221-
if link_text in item.text.split('\n') and csstype in item.decode():
3221+
item_text_list = item.text.split('\n')
3222+
if link_text in item_text_list and csstype in item.decode():
32223223
dropdown_css = ""
32233224
try:
32243225
for css_class in item['class']:

0 commit comments

Comments
 (0)