Simulate key press to clear the input.
(self, elem_or_selector)
| 571 | time.sleep(delay) |
| 572 | |
| 573 | def clear_input(self, elem_or_selector): |
| 574 | """Simulate key press to clear the input.""" |
| 575 | elem = self._get_element(elem_or_selector) |
| 576 | logger.debug("clear input with %s => %s", elem_or_selector, elem) |
| 577 | ( |
| 578 | ActionChains(self.driver) |
| 579 | .move_to_element(elem) |
| 580 | .pause(0.2) |
| 581 | .click(elem) |
| 582 | .send_keys(Keys.END) |
| 583 | .key_down(Keys.SHIFT) |
| 584 | .send_keys(Keys.HOME) |
| 585 | .key_up(Keys.SHIFT) |
| 586 | .send_keys(Keys.DELETE) |
| 587 | ).perform() |
| 588 | |
| 589 | def zoom_in_graph_by_ratio( |
| 590 | self, elem_or_selector, start_fraction=0.5, zoom_box_fraction=0.2, compare=True |