ClearTrap removes a trap set with SetTrap. The trap detects when the window comes into existence. In the example below, the trap presses the OK button when the window appears. After the call to ClearTrap, Silk Test Classic no longer watches for the window.
If there is not already a trap set with SetTrap for the current window, Silk Test Classic raises the exception E_TRAP_NOT_SET.