【问题标题】:How to capture full page screen on macOS Robot Framework如何在 macOS 机器人框架上捕获整页屏幕
【发布时间】: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

感谢大家可以建议是否有其他方法可以捕获全屏。

【问题讨论】:

    标签: python-3.x robotframework


    【解决方案1】:

    你知道确切的屏幕尺寸吗?如果不是,那可能会把事情搞砸。

    【讨论】:

    • 我通过 ${currentWidth} ${currentHight}= 获取当前屏幕尺寸然后将高度加上 1000 然后通过新高度设置新窗口大小
    猜你喜欢
    • 1970-01-01
    • 2016-08-25
    • 2020-05-15
    • 1970-01-01
    • 2021-05-02
    • 2020-03-29
    • 1970-01-01
    • 1970-01-01
    • 2012-04-19
    相关资源
    最近更新 更多