Testing that a value is set.
erinhouston at gmail.com
erinhouston at gmail.com
Fri Apr 8 11:43:47 EDT 2005
I am using winGuiAuto to test a program. I want to check that a
varible is set.
In the following code I am doing if(len(str(hwnd)) < 0) What is the
python way?
def clickNdSyncStopButton(hwnd=None):
....if(hwnd == None):
........hwnd = winGuiAuto.findTopWindow("NDSync")
....if(len(str(hwnd)) < 0):
........raise "Failed to find the NDSync Dialog"
....StopButton = winGuiAuto.findControl(hwnd, "Stop",
"WindowsForms10.BUTTON.app3")
....if(len(str(StopButton)) < 0):
........raise "Failed to find the StopButton"
....winGuiAuto.clickButton(StopButton)
More information about the Python-list
mailing list