【问题标题】:Robotframework : Takescreenshot FAIL RobotNotRunningError: Cannot access execution contextRobotframework : Takescreenshot FAIL RobotNotRunningError: 无法访问执行上下文
【发布时间】:2019-07-25 04:26:16
【问题描述】:

使用 Robot framework remotelibrary/SAPguilibrary 处理 SAP 桌面应用时使用 Takescreenshot 关键字失败

from robotremoteserver import RobotRemoteServer
from SapGuiLibrary import SapGuiLibrary
from robotremoteserver import Screenshot

server = RobotRemoteServer(SapGuiLibrary(), host='192.168.101.20', port=39444, serve=False)
server.serve()

截图应该可以了。

我有这个:KEYWORD Remote_SapGuiLibrary。截图

文档:

仅在启用“错误截图”时截取屏幕截图,无论是在导入时使用关键字enable screenshots on error

开始/结束/经过:

20190722 16:42:16.621 / 20190722 16:42:16.625 / 00:00:00.004

16:42:16.625

失败

RobotNotRunningError:无法访问执行上下文

【问题讨论】:

    标签: python robotframework


    【解决方案1】:

    您不能在远程库中运行的关键字中使用内置关键字。就像错误所说的那样,远程库无权访问执行上下文。远程库对属于与其通信的程序的任何窗口一无所知。

    【讨论】:

      猜你喜欢
      • 2017-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-25
      • 2020-02-29
      • 2020-10-15
      • 2015-04-01
      • 2021-12-08
      相关资源
      最近更新 更多