Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.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 3.x 如何在chrome中为selenium设置假音频路径?_Python 3.x_Selenium - Fatal编程技术网

Python 3.x 如何在chrome中为selenium设置假音频路径?

Python 3.x 如何在chrome中为selenium设置假音频路径?,python-3.x,selenium,Python 3.x,Selenium,但这是一个技能错误: [11532:17860:0428/172951.505:错误:音频管理器_base.cc(368)]接收到无效的音频输出参数;使用假音频路径。通道:0,采样率:0,每个采样位:0,每个缓冲区的帧数:0 为什么?i用户Google Chrome 66.0.3359.139可能与 audio_path = os.path.join(os.path.dirname(__file__), 'audio\01.wav') print(audio_path) options=webd

但这是一个技能错误: [11532:17860:0428/172951.505:错误:音频管理器_base.cc(368)]接收到无效的音频输出参数;使用假音频路径。通道:0,采样率:0,每个采样位:0,每个缓冲区的帧数:0
为什么?

i用户Google Chrome 66.0.3359.139可能与
audio_path = os.path.join(os.path.dirname(__file__), 'audio\01.wav')
print(audio_path)
options=webdriver.ChromeOptions()
options.add_argument("--reduce-security-for-testing")
options.add_argument('--allow-file-access-from-files')
options.add_argument("--use-fake-device-for-media-stream")
options.add_argument("--use-fake-ui-for-media-stream")
options.add_argument("--use-file-for-fake-audio-capture=‪{}".format(audio_path))


driver = webdriver.Chrome(chrome_options=options)

driver.get('')