Saving a file through native dialog via set-dialog-result not working on OSX High Sierra [message #1787652] |
Wed, 30 May 2018 13:17  |
Eclipse User |
|
|
|
I've recorded the same scenario involving saving a file via File/Save using RCPTT IDEs running on Windows 10 and on Mac OS X 10.13 respectively.
Both IDEs recorded identical code for the save operation, the essence is below:
set-dialog-result File "platform:/resource/Example Models/test1234"
get-menu -path "File/Save" | click
The Windows version replays that correctly and saves the file as requested.
However, the MacOS one does not even seem to open the File/Save dialog, so basically nothing happens.
Do I maybe miss something really obvious? I'm puzzled with the native dialog not even appearing when I replay the recorded script on MacOS.
The video of recording and replaying the scenario on Mac is attached.
I used the stable RCPTT IDE 2.2. on both Mac and Win.
[Updated on: Wed, 30 May 2018 13:36] by Moderator Report message to a moderator
|
|
|
Re: Saving a file through native dialog via set-dialog-result not working on OSX High Sierra [message #1791366 is a reply to message #1787652] |
Thu, 28 June 2018 12:07   |
Eclipse User |
|
|
|
Hi Victor,
RCPTT cannot interact with OS system dialogs. To be able to replay an action that opens system dialogs it goes through the following steps:
1) When it detects a system dialog during recording it writes 'set-dialog-result' command
2) During replay it prevents showing the system dialog and send the recorded result string to the AUT
Have you tried to use an absolute path instead of recorded relative one?
For example: set-dialog-result File "/Users/example/resource/Example Models/test1234"
We cannot reproduce the issue on our tests for native macos dialogs
To help us investigate your problem you may provide the code snippet you use to open the dialog and get the result from it
|
|
|
Re: Saving a file through native dialog via set-dialog-result not working on OSX High Sierra [message #1792135 is a reply to message #1791366] |
Thu, 12 July 2018 06:13  |
Eclipse User |
|
|
|
Hi Viktoria,
I did try absolute paths and various workarounds suggested in the related thread, to no success.
Here is the full test with several options I tried (commented). None of them actually worked - there's no file in the requested location at the end; however RCPTT reports test success.
with [get-view Projects] {
click
get-tree | select "Example Models/Healthcare Training Examples/Example06-PSA.trex" | double-click
}
get-button "Run Probabilistic Sensitivity Analysis (Samples)" | click
get-window "Monte Carlo Simulation" | get-button Begin | click
//set-dialog-result File "platform:/resource/Example Models/test1234.rptx"
//set-dialog-result File "/Users/jenkins/treeage/workspace/Example Models/test1234.rptx"
//set-dialog-result File "/Users/jenkins/Downloads/test1234.rptx"
//set-dialog-result File [concat [substitute-variables "${workspace_loc}"] "/Example Models/test1234.rptx"]
//set-dialog-result File [concat [get-java-property "user.home"] "test1234.rptx"]
set-dialog-result File "test1234.rptx"
//get-menu -path "File/Save As..." | click
get-menu -path "File/Save" | click
|
|
|
Powered by
FUDForum. Page generated in 0.04870 seconds