使用 python 绑定 selenium3 webdriver 进行测试自动化,使用 castro 记录执行步骤,但它在 Windows 7 x64 上失败。
是否有任何其他库或模块可用于录制目的
用卡斯特罗编码
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()
Run Code Online (Sandbox Code Playgroud)
但它在我的 Windows7 x64 上引发错误
Socket error: [Errno 10061] No connection could be made because the target machine actively refused it
Process Process-1:
Traceback (most recent call last):
File …Run Code Online (Sandbox Code Playgroud)