qxf2-page-object-model
qxf2-page-object-model copied to clipboard
Add method to print coloured text
We use print
statements in except
blocks to display exception information on the console. Printing the info in white is not very useful.
Add a method to the LoggingObject
object to print a text in red:
>>> def red_text(text):
... return '\033[91m'+text+'\033[0m'
...
And use it in print
statement as: