def __click_dropdown_link_text(self, link_text, link_css):
soup = self.get_beautiful_soup()<EOL>drop_down_list = soup.select('<STR_LIT>')<EOL>for item in soup.select('<STR_LIT>'):<EOL><INDENT>drop_down_list.append(item)<EOL><DEDENT>for item in soup.select('<STR_LIT>'):<EOL><INDENT>drop_down_list.append(item)<EOL><DEDENT>for item in soup.select('<STR_LIT>'):<EOL><INDENT>drop_down_list.append(item)<EOL><DEDENT>csstype = link_css.split('<STR_LIT:[>')[<NUM_LIT:1>].split('<STR_LIT:=>')[<NUM_LIT:0>]<EOL>for item in drop_down_list:<EOL><INDENT>if link_text in item.text.split('<STR_LIT:\n>') and csstype in item.decode():<EOL><INDENT>dropdown_css = "<STR_LIT>"<EOL>for css_class in item['<STR_LIT:class>']:<EOL><INDENT>dropdown_css += '<STR_LIT:.>'<EOL>dropdown_css += css_class<EOL><DEDENT>dropdown_css = item.name + dropdown_css<EOL>matching_dropdowns = self.find_visible_elements(dropdown_css)<EOL>for dropdown in matching_dropdowns:<EOL><INDENT>try:<EOL><INDENT>page_actions.hover_element_and_click(<EOL>self.driver, dropdown, link_text,<EOL>click_by=By.LINK_TEXT, timeout=<NUM_LIT>)<EOL>return True<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return False<EOL>
When a link may be hidden under a dropdown menu, use this.