# pause-printer-somehow.test - include file to Pause the Printer somehow # Version 0.2 # Last revised by Xerox Corporation on 99-03-02. # Copyright (c) 1999 by Xerox Corporation. All rights reserved. # User is granted the right to modify this file for use with # the IPP Server Test Tool, as described in the file # LICENSE-IppTest.txt. # Pause printer either by using the Printer's Pause-Printer operation # if the global symbol USE-PAUSE-PRINTER is defined, # or manually by prompting the person running the scripts to pause # the printer by opening a door or some other means and waiting # for a keyword response p in order to proceed with the test. # Assumes the following global symbols are defined: # $USE-PAUSE-PRINTER - defined if Pause-Printer is to be used # $target - the target printer # $prompt-for-pause-1 - prompt user to manually pause the printer somehow # $prompt-for-pause-2 - accept p that the user types AFTER pausing # the printer somehow, such as opening a door or # using the local console. # The requesting-user-name is assumed to be 'user 1'. IfDef USE-PAUSE-PRINTER Pause-Printer \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ requesting-user-name: 'user 1', \ ) \ ) Expect Response \ status-code: successful-ok, \ attributes: (...) # Get Printer state Get-Printer-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ requested-attributes: \ ) \ ) # Check to see if the Printer is 'stopped' # Could be still 'processing' with moving-to-stopped # in printer-state-reasons. # Or printer-state-reasons might not be supported Expect Response \ status-code: successful-ok | \ successful-ok-ignored-or-substituted-attributes, \ attributes: ( \ Operation: ( ... ), \ Printer: ( \ First-printer-state = printer-state: stopped, \ ), \ ... \ ) Else $prompt-for-pause-1 $prompt-for-pause-2 EndIf