MCPcopy
hub / github.com/InstaPy/InstaPy / open_comment_section

Function open_comment_section

instapy/comment_util.py:49–67  ·  view source on GitHub ↗
(browser, logger)

Source from the content-addressed store, hash-verified

47
48
49def open_comment_section(browser, logger):
50 missing_comment_elem_warning = (
51 "--> Comment Button Not Found!"
52 "\t~may cause issues with browser windows of smaller widths"
53 )
54
55 comment_elem = browser.find_elements(
56 By.XPATH, read_xpath(open_comment_section.__name__, "comment_elem")
57 )
58
59 if len(comment_elem) > 0:
60 try:
61 click_element(browser, comment_elem[0])
62
63 except WebDriverException:
64 logger.warning(missing_comment_elem_warning)
65
66 else:
67 logger.warning(missing_comment_elem_warning)
68
69
70def comment_image(browser, username, comments, blacklist, logger, logfolder):

Callers 1

comment_imageFunction · 0.85

Calls 2

read_xpathFunction · 0.85
click_elementFunction · 0.85

Tested by

no test coverage detected