grant_volker_2
13 years agoContributor
How to handle whitespace changes within text with contentText and Excel data driver
Hi,
I have experienced some test failures where double white space in between text and at the end of sentences exists.
An Excel data driver is being used with text copied from the contentText within the Object Spy (Please refer to the
example screen shot). The text originally had no double white space. However, double whitespace was introduced
between text and at the end of the sentences during a sprint, which caused the test to fail.
I refer to contentText Property (Web Objects)
"Replaces subsequent whitespace characters (spaces, tabs, non-breaking spaces, line breaks and so on) with a single space.
Trims whitespace at the beginning and the end of the value."
I tried making use of an asterisk at the end of each line of text in the data driver text, but this did not resolve the
issue. It was necessary to re-copy the text from the Object Spy for the test to pass, but then the text was again altered
during a sprint to remove the double whitespaces, causing the test to fail yet again.
Does anyone have suggestions on how to handle whitespaces, to avoid constantly updating the data driver please?
Thank you
I have experienced some test failures where double white space in between text and at the end of sentences exists.
An Excel data driver is being used with text copied from the contentText within the Object Spy (Please refer to the
example screen shot). The text originally had no double white space. However, double whitespace was introduced
between text and at the end of the sentences during a sprint, which caused the test to fail.
I refer to contentText Property (Web Objects)
"Replaces subsequent whitespace characters (spaces, tabs, non-breaking spaces, line breaks and so on) with a single space.
Trims whitespace at the beginning and the end of the value."
I tried making use of an asterisk at the end of each line of text in the data driver text, but this did not resolve the
issue. It was necessary to re-copy the text from the Object Spy for the test to pass, but then the text was again altered
during a sprint to remove the double whitespaces, causing the test to fail yet again.
Does anyone have suggestions on how to handle whitespaces, to avoid constantly updating the data driver please?
Thank you