Tidy up WebDriver errors (mostly via __str__
)
This avoids __str__
having a trailing new line (as this makes it odd
to include in a typically single-line error message), and remove
excess whitespace (all ASCII from the message, new lines from the
stacktrace).
Additionally, make the message match the stacktrace: set it to None
unless we have a non-empty string. Both are implementation defined,
and in both cases they are sometimes empty. This makes the
if self.message is not None
work as intended within __str__
.