def highlight(self, selector, by=By.CSS_SELECTOR,<EOL>loops=settings.HIGHLIGHTS, scroll=True):
selector, by = self.__recalculate_selector(selector, by)<EOL>element = self.find_element(<EOL>selector, by=by, timeout=settings.SMALL_TIMEOUT)<EOL>if scroll:<EOL><INDENT>self.__slow_scroll_to_element(element)<EOL><DEDENT>try:<EOL><INDENT>selector = self.convert_to_css_selector(selector, by=by)<EOL><DEDENT>except Exception:<EOL><INDENT>return<EOL><DEDENT>if self.highlights:<EOL><INDENT>loops = self.highlights<EOL><DEDENT>if self.browser == '<STR_LIT>':<EOL><INDENT>loops = <NUM_LIT:1>  <EOL><DEDENT>loops = int(loops)<EOL>o_bs = '<STR_LIT>'  <EOL>style = element.get_attribute('<STR_LIT>')<EOL>if style:<EOL><INDENT>if '<STR_LIT>' in style:<EOL><INDENT>box_start = style.find('<STR_LIT>')<EOL>box_end = style.find('<STR_LIT:;>', box_start) + <NUM_LIT:1><EOL>original_box_shadow = style[box_start:box_end]<EOL>o_bs = original_box_shadow<EOL><DEDENT><DEDENT>if "<STR_LIT>" not in selector and "<STR_LIT>" not in selector:<EOL><INDENT>selector = re.escape(selector)<EOL>selector = self.__escape_quotes_if_needed(selector)<EOL>self.__highlight_with_js(selector, loops, o_bs)<EOL><DEDENT>else:<EOL><INDENT>selector = self.__make_css_match_first_element_only(selector)<EOL>selector = re.escape(selector)<EOL>selector = self.__escape_quotes_if_needed(selector)<EOL>try:<EOL><INDENT>self.__highlight_with_jquery(selector, loops, o_bs)<EOL><DEDENT>except Exception:<EOL><INDENT>pass  <EOL><DEDENT><DEDENT>time.sleep(<NUM_LIT>)<EOL>
This method uses fancy JavaScript to highlight an element.
            Used during demo_mode.
            @Params
            selector - the selector of the element to find
            by - the type of selector to search by (Default: CSS)
            loops - # of times to repeat the highlight animation
                    (Default: 4. Each loop lasts for about 0.18s)
            scroll - the option to scroll to the element first (Default: True)