Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Saving a file through native dialog via set-dialog-result not working on OSX High Sierra
Saving a file through native dialog via set-dialog-result not working on OSX High Sierra [message #1787652] Wed, 30 May 2018 13:17 Go to next message
Victor Dulepov is currently offline Victor DulepovFriend
Messages: 9
Registered: December 2014
Junior Member
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]

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 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
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 Go to previous message
Victor Dulepov is currently offline Victor DulepovFriend
Messages: 9
Registered: December 2014
Junior Member
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


Previous Topic:sharing a file locally and of the test machine
Next Topic:Adding an application via .product file
Goto Forum:
  


Current Time: Sat Dec 07 18:09:31 GMT 2024

Powered by FUDForum. Page generated in 0.05339 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top