MCPcopy Index your code
hub / github.com/InstaPy/InstaPy / dismiss_get_app_offer

Function dismiss_get_app_offer

instapy/login_util.py:551–563  ·  view source on GitHub ↗

Dismiss 'Get the Instagram App' page after a fresh login

(browser, logger)

Source from the content-addressed store, hash-verified

549
550
551def dismiss_get_app_offer(browser, logger):
552 """Dismiss 'Get the Instagram App' page after a fresh login"""
553 offer_elem = read_xpath(dismiss_get_app_offer.__name__, "offer_elem")
554 dismiss_elem = read_xpath(dismiss_get_app_offer.__name__, "dismiss_elem")
555
556 # wait a bit and see if the 'Get App' offer rises up
557 offer_loaded = explicit_wait(
558 browser, "VOEL", [offer_elem, "XPath"], logger, 5, False
559 )
560
561 if offer_loaded:
562 dismiss_elem = browser.find_element(By.XPATH, dismiss_elem)
563 click_element(browser, dismiss_elem)
564
565
566def dismiss_notification_offer(browser, logger):

Callers 2

bypass_suspicious_loginFunction · 0.85
login_userFunction · 0.85

Calls 3

read_xpathFunction · 0.85
explicit_waitFunction · 0.85
click_elementFunction · 0.85

Tested by

no test coverage detected