pyshadow went threw all shadow roots on reddits post site to the selector #device-upload-button but it cant click on it. Error is Element with CSS #device-upload-button is not present on screen
i tried to refresh site or find if its clickable, it is. this is my code
post_url is https://www.reddit.com/r/NFT/submit/?type=IMAGE
driver.get(post_url)
shadow = Shadow(driver)
print(f"Opened post URL for subreddit: {subreddit}")
element = shadow.find_element("#post-submit-form")
element1 = shadow.find_element('#post-submit-form > section > faceplate-form-section:nth-child(6)')
element2 = shadow.find_element("#post-composer_media")
element3 = shadow.find_element('#fileInputInnerWrapper')
element4 = shadow.find_elements('#fileInputInnerWrapper > div')
element5 = shadow.find_element('#device-upload-button')
element5.click()
i need to click on button, insert text from variable photo_path to the window which opens after button click and press enter to insert it
Y. Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.