def click_visible_elements(self, selector, by=By.CSS_SELECTOR, limit=<NUM_LIT:0>):
elements = self.find_elements(selector, by=by)<EOL>count = <NUM_LIT:0><EOL>click_count = <NUM_LIT:0><EOL>for element in elements:<EOL><INDENT>if limit and limit > <NUM_LIT:0> and click_count >= limit:<EOL><INDENT>return<EOL><DEDENT>count += <NUM_LIT:1><EOL>if count == <NUM_LIT:1>:<EOL><INDENT>self.wait_for_ready_state_complete()<EOL>if self.is_element_visible(selector, by=by):<EOL><INDENT>self.click(selector, by=by)<EOL>click_count += <NUM_LIT:1><EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.wait_for_ready_state_complete()<EOL>try:<EOL><INDENT>if element.is_displayed():<EOL><INDENT>self.__scroll_to_element(element)<EOL>element.click()<EOL>click_count += <NUM_LIT:1><EOL><DEDENT><DEDENT>except (StaleElementReferenceException, ENI_Exception):<EOL><INDENT>self.wait_for_ready_state_complete()<EOL>time.sleep(<NUM_LIT>)<EOL>try:<EOL><INDENT>if element.is_displayed():<EOL><INDENT>self.__scroll_to_element(element)<EOL>element.click()<EOL>click_count += <NUM_LIT:1><EOL><DEDENT><DEDENT>except (StaleElementReferenceException, ENI_Exception):<EOL><INDENT>return<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Finds all matching page elements and clicks visible ones in order.
            If a click reloads or opens a new page, the clicking will stop.
            Works best for actions such as clicking all checkboxes on a page.
            Example:  self.click_visible_elements('input[type="checkbox"]')
            If "limit" is set and > 0, will only click that many elements.