Refactor screenshot capturing

Takes a screenshot when test fails, not just when command fails.
Allow doselectdropdown command to select blank values.