how to delete youtube's watch later video in selenium?
<p>I want to delete youtube's watch later videos. but my codes don't work.</p>

<pre><code>&lt;button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup pl-video-edit-remove yt-uix-tooltip" type="button" onclick=";return false;" title="Remove"&gt;&lt;/button&gt;
</code></pre>

<p>my code is this.</p>

<pre><code>_sDriver.get('https://www.youtube.com/playlist?list=WL')
_sDriver.find_element_by_class_name('pl-video-edit-remove').click()
</code></pre>

<p>exception is this.</p>

<pre><code>&gt;&gt;&gt; _sDriver.find_element_by_class_name('pl-video-edit-remove')
    &lt;selenium.webdriver.remote.webelement.WebElement (session="283d423c-5ff7-478f-89
    b9-002499413126", element="{e00dbb1e-e0ca-4f79-8652-23c955b464e7}")&gt;
&gt;&gt;&gt; _sDriver.find_element_by_class_name('pl-video-edit-remove').click()
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py",
    line 72, in click
    self._execute(Command.CLICK_ELEMENT)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py",
line 461, in _execute
    return self._parent.execute(command, params)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 236, in execute
    self.error_handler.check_response(response)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py"
, line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotVisibleException: Message: Element is not c
urrently visible and so may not be interacted with
Stacktrace:
    at fxdriver.preconditions.visible (file:///c:/users/admini~1/appdata/local/t
emp/tmppqz9zq/extensions/fxdriver@googlecode.com/components/command-processor.js
:10092)
    at DelayedCommand.prototype.checkPreconditions_ (file:///c:/users/admini~1/a
ppdata/local/temp/tmppqz9zq/extensions/fxdriver@googlecode.com/components/comman
d-processor.js:12644)
    at DelayedCommand.prototype.executeInternal_/h (file:///c:/users/admini~1/ap
pdata/local/temp/tmppqz9zq/extensions/fxdriver@googlecode.com/components/command
-processor.js:12661)
    at DelayedCommand.prototype.executeInternal_ (file:///c:/users/admini~1/appd
ata/local/temp/tmppqz9zq/extensions/fxdriver@googlecode.com/components/command-p
rocessor.js:12666)
    at DelayedCommand.prototype.execute/&lt; (file:///c:/users/admini~1/appdata/loc
al/temp/tmppqz9zq/extensions/fxdriver@googlecode.com/components/command-processo
r.js:12608)
</code></pre>

<p>I don't know what can I do for this.
I need your help.
thank you.</p>

<p>The element that you are trying to click is not visible normally. It is only visible when you hover the mouse on it. So either you fire a mouseover event before clicking and try if it works.</p>

<p>The other solution is that you can try executing the JavaScript.</p>

<pre><code>    driver.execute_script("document.getElementsByClassName('pl-video-edit-remove')[0].click()")
</code></pre>

<p>The script is working at my end.</p>

<p>you may want to add some wait before executing the script so that the page loads properly.</p>

python selenium youtube