TestProject 使用汇总
1. 截图
from addons.screenshot_utils import ScreenshotUtils
step_output = driver.addons().execute(
ScreenshotUtils.takescreenshotweb(
filePath="/Users/xxx/Downloads/images/screenshot",
fileName="login_after01_tp",
fileFormat="jpg"))
takescreenshotweb.py代码如下:
class TakeScreenshotWeb(ActionProxy):
def __init__(self, filePath: str, fileName: str, fileFormat: str):
super().__init__()
self.proxydescriptor = ProxyDescriptor(
guid="CHwK6NhvLUy-VJsv2atfcQ",
classname="io.testproject.Addon.Actions.Web.TakeScreenshotWeb"
)
self.filePath = filePath
self.fileName = fileName
self.fileFormat = fileFormat
self.resultPath = None
浙公网安备 33010602011771号