|
Re: How check clipboard? [message #1444684 is a reply to message #1439869] |
Tue, 14 October 2014 12:02 |
|
Hello!
Unfortunately now the only way to check a clipboard context is to paste data somewhere.
If untitled text files are supported by yours AUTs, the following procedure can be used:
proc "assert-clipboard" [val expected] {
get-menu "File/New/Untitled Text File" | click
// .* used because each consequent creation of new untitled
// text file creates autoincremented index (i.e. 'Untitled 1',
// 'Untitled 2', etc.)
get-editor "Untitled .*" | get-text-viewer | key-type "M1+v"
get-editor "Untitled .*" | get-text-viewer | get-property text | equals $expected | verify-true
get-editor "Untitled .*" | close
try {
get-window "Save Resource" | get-button No | click
} -catch {
// catch block here is because when clipboard is empty
// untitled text file will be unmodified, so no save resource
// window would appear
}
}
assert-clipboard "<content of clipboard>"
Yours sincerely,
Olga.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03124 seconds