0

I am trying to verify a text in a text field in a native dialog using the rcptt framework. The code I am using is:

set-dialog-result Folder

get-window "Open Project" | get-group "Project Details"
 | get-button "..." | click

get-last-message-box | get-property Folder 
| equals "apiprojects" | verify-true

However, I receive Message box info is absent error on the get-last-message-box function. I couldn't find any info on this error in the net. Could you , please help?

user3837868
  • 917
  • 1
  • 12
  • 24

1 Answers1

0

Command get-last-message-box returns a MessageBoxInfo object, which has two relevant properties only: title and message. It can not be extended with a "Folder" property.

Source Code

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25
  • Thanks for that! Is it at all possible then to get the info that I need for this native window? It is a window "Browse For Folder" and I want to get the path to the folder it is pointing to. When I am recording and I change the path, this is what is recorded: set-dialog-result Folder "C:\\Users\\Administrator\\apiprojects" – Maria Barova Apr 09 '19 at 08:34
  • And why do you want to verify that? I mean, unless you are testing RCPTT itself, verifying something you've just set is quite useless, right? – Adam Horvath Apr 09 '19 at 08:38
  • No, I am not verifying what I set. I am trying to verify what is set when I open the window. The code I sent in the last comment is just to show what I am getting when I record something related to that window. – Maria Barova Apr 09 '19 at 09:48
  • You mean like what is set by default? Or in other words, what is the default proposed location? – Adam Horvath Apr 09 '19 at 10:27
  • Yes, exactly. We had a bug with the location and now I need to verify it is pointing to the correct folder. – Maria Barova Apr 09 '19 at 11:05
  • So that's it, no answer? – Maria Barova Apr 12 '19 at 08:22