How to log the results if Waitaliaschild method returns object does not have a child
We are having a separate function to log the results in a different location in mht file format. Converted all our project to use name mapping.
Some times it fails at
w-=aliases.legaclt.wndLSPANEL3.page32770.waitAliasChild('Button1",3000)
exists neither returns true or false but it returns aliases.legaclt.wndLSPANEL3.page32770 objesct does not have a child with the name " Button1"
when the script run for 10 lines and on 11 line if it fails due to above issue a log is not generated with our function. I can see test complete generate the logs. For now we are manually exporting that logs and storing in the results folder. but is there a way to ahndle this?
This will throw an exception, so unless you have logs being exported in the GeneralEvents_OnStopTest event handler it will never get called.
You could try to catch the exception as well so the test engine isn't stopped.
IMO though this should never be a case you run into while running tests. All tests and scripts should be reviewed by someone before being put in a regression or formally running test suite.