Oct-26-2017, 08:17 PM
Hello! I'm trying to click on the button of "Suicide or self injury" inside the report menu of youtube. I have already clicked on the "Harmful dangerous acts" and open up the dropdown menu of "Choose one" but when I try to click the "Suicide or self injury" it gives me the error of ERROR:root:ElementNotVisibleException: Couldn't Click on this element.
I'm using selenium python PyChrome webdriver and the last part of my code is:
I'm using selenium python PyChrome webdriver and the last part of my code is:
#open the "choose one" drop-menu locator = "#options > paper-dropdown-menu:nth-child(11)" element = browser.findElement(css = locator) browser.clickElement(element) time.sleep(2) #trying to choose the "Suicide or self injury" option locator = "//*[@id='contentWrapper']/div/paper-listbox/paper-item[4]" element = browser.findElement(xpath = locator) browser.clickElement(element)