【问题标题】:add and then read info from that file using rcptt添加然后使用 rcptt 从该文件中读取信息
【发布时间】:2018-07-13 15:55:51
【问题描述】:

我正在使用 rcptt 来自动化我的应用程序。 一个测试用例是,

- add a file 
- then my app will read info from that file and proceed further if
 i click on next button.

为此,我使用以下代码

set-dialog-result File  [concat [get-workspace-location | str] "/proj/folder/sample-file.txt"]
get-editor "editor" | get-button Add | click
get-button "Save (M1+S)" | click

它可以添加文件,但当我继续进行时,它无法从文件中读取信息。

显示错误

could not be opened for reading

但是文件在那里,因为我手动检查了。

我做错了什么?

谢谢

【问题讨论】:

    标签: eclipse eclipse-rcptt


    【解决方案1】:

    如果我没记错的话,你是在尝试添加一个新文件,保存它然后打开保存的文件吗?

    您可以使用 read-file 命令来读取文件。

    示例:读取文件 -uri "C:/Users/kaneezr/Desktop/WorkspaceRcptt/XATest/dataFile"

    在这里,我可以通过使用 read-file 选项并为其提供 uri 来读取文件。

    您也可以参考以下内容: https://www.eclipse.org/rcptt/blog/2015/08/12/file-and-clipboard-content.html

    我不确定它是否会有所帮助,但您可以尝试看看。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-20
      • 2022-08-21
      • 1970-01-01
      • 2013-06-28
      • 1970-01-01
      • 2013-09-19
      • 1970-01-01
      • 2021-03-20
      相关资源
      最近更新 更多