Scroll down the page by 50 pixels This is intended mainly for accept_follow_requests(), since user could have several request to be accepted. By default only 10 users are shown, but InstaPy user could requested to accept more than 10. :param y: number of pixels to be moved
(browser, y: int = 50)
| 1014 | |
| 1015 | |
| 1016 | def scroll_down(browser, y: int = 50): |
| 1017 | """ |
| 1018 | Scroll down the page by 50 pixels |
| 1019 | |
| 1020 | This is intended mainly for accept_follow_requests(), since user could |
| 1021 | have several request to be accepted. By default only 10 users are shown, |
| 1022 | but InstaPy user could requested to accept more than 10. |
| 1023 | |
| 1024 | :param y: number of pixels to be moved |
| 1025 | """ |
| 1026 | |
| 1027 | browser.execute_script("window.scrollBy(0, {})".format(y)) |
| 1028 | # update server calls |
| 1029 | update_activity(browser, state=None) |
| 1030 | sleep(randint(1, 5)) |
| 1031 | |
| 1032 | return |
| 1033 | |
| 1034 | |
| 1035 | def click_element(browser, element, tryNum=0): |
no test coverage detected