使用python绑定selenium3webdriver进行测试自动化,使用castro记录执行步骤,但在windows7x64上失败。在
是否有其他库或模块可用于录制目的
与卡斯特罗合作
from castro import Castro
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
def my_video_record():
castroObject = Castro(filename="video/mytest.swf")
castroObject.start()
firefoxDriver = webdriver.Firefox(executable_path="firefox_geckodriver64bit/geckodriver")
firefoxDriver.get("https://www.python.org")
assert "Python" in firefoxDriver.title
sleep(1)
firefoxDriver.quit()
castroObject.stop()
if __name__ == '__main__':
my_video_record()
但它在我的Windows7 x64上引发错误
^{pr2}$
我不建议使用卡斯特罗。它真的过时了,我试着在我自己的测试中使用它,并且确实让它运行,但它太不稳定了。在
我目前使用的是ffmpeg和screen-capture-recorder(屏幕录制软件),它的工作方式就像一个符咒。它允许您设置帧速率、分辨率、比特率以及选择不同的视频编解码器。在
代码如下:
原因是您没有启用vnc环回连接。在
相关问题 更多 >
编程相关推荐