【发布时间】:2023-01-12 19:06:23
【问题描述】:
我在 macOS 上捕获全屏时遇到问题,我在 Windows 中尝试这些代码并且它有效
Test_Capture
Set Window Size 2000 2500 #set new window size
${currentWidth} ${currentHight} Get Window Size True
Log ${currentWidth},${currentHight}
sleep 0.5
SeleniumLibrary.Capture Page Screenshot
但在 macOS 中,它可以捕获屏幕,但它只捕获可见屏幕,当我检查 ${currentWidth} 和 ${currentHight} 的日志时,它仍然是原始大小,它没有设置新的窗口大小。
附言。我通过 ${currentWidth} ${currentHight}= 获取当前屏幕尺寸然后将高度加上 1000 然后通过新高度设置新窗口大小
浏览器:火狐
操作系统:mac
感谢大家可以建议是否有其他方法可以捕获全屏。
【问题讨论】: