dyarwood
11 years agoContributor
Unexpected Error using If...Then function in keyword test
Hi,
I'm doing some web testing and I find the Internet Explorer doesn't always shut down cleanly at the end of my test.
So, I've looked on the forums and found a way to kill the process using sys.process("iexplore.exe").Terminate and have added it as the last step of my test in an If...Then loop
If...Then sys.process("iexplore.exe").Exists equals False
[do nothing]
ELSE
Run Code Snippet Sys.process("iexplore.exe").Terminate()
When I run my test this code loop is executed. I'm confused though - it throws an Error everytime the iexplore.exe process doesn't exist (the do nothing condition).
Why does it throw an error and make the test report that if failed?
I'm doing some web testing and I find the Internet Explorer doesn't always shut down cleanly at the end of my test.
So, I've looked on the forums and found a way to kill the process using sys.process("iexplore.exe").Terminate and have added it as the last step of my test in an If...Then loop
If...Then sys.process("iexplore.exe").Exists equals False
[do nothing]
ELSE
Run Code Snippet Sys.process("iexplore.exe").Terminate()
When I run my test this code loop is executed. I'm confused though - it throws an Error everytime the iexplore.exe process doesn't exist (the do nothing condition).
Why does it throw an error and make the test report that if failed?