Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 不允许启动AudioContext。它必须恢复(或创建)_Python_Selenium - Fatal编程技术网

Python 不允许启动AudioContext。它必须恢复(或创建)

Python 不允许启动AudioContext。它必须恢复(或创建),python,selenium,Python,Selenium,因此,出于某种原因,我的脚本现在在运行时给出了当前错误。这是一个selenium项目,它打开了一个无头浏览器。它工作得很好 DevTools listening on ws://127.0.0.1:50010/devtools/browser/a0bd7321-8810-4867-9a1a-44830cabb881 [0531/093705.662:INFO:CONSOLE(483)] "The AudioContext was not allowed to start. It mus

因此,出于某种原因,我的脚本现在在运行时给出了当前错误。这是一个selenium项目,它打开了一个无头浏览器。它工作得很好

DevTools listening on ws://127.0.0.1:50010/devtools/browser/a0bd7321-8810-4867-9a1a-44830cabb881
[0531/093705.662:INFO:CONSOLE(483)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio", source: https://thesite/TSPD/082a057379ab2000e04675d6650b7d08e00fa87e834636f3276a953aff91cafadccfc9f4abbb23b7?type=8 (483)
[0531/093705.665:INFO:CONSOLE(483)] "The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://developers.google.com/web/updates/2017/12/audio-worklet)", source: https://thesite/TSPD/082a057379ab2000e04675d6650b7d08e00fa87e834636f3276a953aff91cafadccfc9f4abbb23b7?type=8 (483)
[0531/093705.668:INFO:CONSOLE(487)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio", source: https://thesite/TSPD/082a057379ab2000e04675d6650b7d08e00fa87e834636f3276a953aff91cafadccfc9f4abbb23b7?type=8 (487)
[0531/093705.668:INFO:CONSOLE(488)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio", source: https://thesite/TSPD/082a057379ab2000e04675d6650b7d08e00fa87e834636f3276a953aff91cafadccfc9f4abbb23b7?type=8 (488)
[0531/093705.669:ERROR:web_contents_delegate.cc(225)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.

我将把这个站点称为“thesite”,因为它是私有的。

所以我找到了错误的答案,并找到了信息控制台

对于我刚才添加的错误:

options.add_argument("--use-fake-ui-for-media-stream")
对于信息:控制台:

options.add_argument("--log-level=3")