What is the recommended way of comparing text between a data string and what is in the div/label/whatever?
I've got an issue where there looks to be a soft return within a string in the data but Test Studio is not picking up on this
Ie when I view source code of the page it has shows in line break within the text string but which is not represented with any html characters
From the error log:
[Expected:An excess of $100.00 applies to all claim events under the policy, unless the No Excess option
has been selected, in which case there will be no excess charged on each claim.],
[Actual:An excess of $100.00 applies to all claim events under the policy, unless the No Excess option has been selected, in which case there will be no excess charged on each claim.]
Any suggestions?
I've got an issue where there looks to be a soft return within a string in the data but Test Studio is not picking up on this
Ie when I view source code of the page it has shows in line break within the text string but which is not represented with any html characters
From the error log:
[Expected:An excess of $100.00 applies to all claim events under the policy, unless the No Excess option
has been selected, in which case there will be no excess charged on each claim.],
[Actual:An excess of $100.00 applies to all claim events under the policy, unless the No Excess option has been selected, in which case there will be no excess charged on each claim.]
Any suggestions?
5 Answers, 1 is accepted
0
Hi Cheryl,
But looking at the Actual string this <br> is missing. My suggestion is to remove this <br> from the expected string and (if not already set) change the verification to InnerText.
Also, I'm not sure what you mean by a "soft return". Can you clarify this and give me some examples? The actual HTML behind it would also be helpful. Right click on the browser and select View Source to get at the raw HTML.
Kind regards,
Cody
the Telerik team
I apologize for the delay responding back to you.
Looking at your Expected string I see a hard break in it. In other words the HTML actually looks like this:
An excess of $100.00 applies to all claim events under the policy, unless the No Excess option
<
br
>
has been selected, in which case there will be no excess charged on each claim.But looking at the Actual string this <br> is missing. My suggestion is to remove this <br> from the expected string and (if not already set) change the verification to InnerText.
Also, I'm not sure what you mean by a "soft return". Can you clarify this and give me some examples? The actual HTML behind it would also be helpful. Right click on the browser and select View Source to get at the raw HTML.
Kind regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Cheryl
Top achievements
Rank 1
answered on 10 Apr 2012, 12:06 AM
Hi Cody
Sorry, I meant a break in general - as there is no html code representing the <br>
From the browser source code it show like this:
An excess of $100.00 applies to all claim events under the policy, unless the No Excess option
has been selected, in which case there will be no excess charged on each claim.
And looking directly at the data via SQL, there are no characters showing that represent this break either.
I've had to do a replace of CHAR(13) and CHAR(10) in the sql statement in order to remove these "invisible" characters
Sorry, I meant a break in general - as there is no html code representing the <br>
From the browser source code it show like this:
An excess of $100.00 applies to all claim events under the policy, unless the No Excess option
has been selected, in which case there will be no excess charged on each claim.
And looking directly at the data via SQL, there are no characters showing that represent this break either.
I've had to do a replace of CHAR(13) and CHAR(10) in the sql statement in order to remove these "invisible" characters
0
Hi Cheryl,
Maybe I'm not fully understanding what you're asking. <br> is real HTML code. It's the only thing that can force a line break to be displayed in the browser. If there's no <br> in the HTML source code, the browser will not insert a line break... except it will break on words when the word will not fit on the current row. However this type of break will not affect Test Studio verification's. Perhaps seeing this via GoToMeeting where you can demonstrate the problem to me and we can discuss it would help. Let me know what time zone you are in and your availability and I'll setup the meeting. I'm in Austin, TX which is Central Time (GMT -6).
Kind regards,
Cody
the Telerik team
Maybe I'm not fully understanding what you're asking. <br> is real HTML code. It's the only thing that can force a line break to be displayed in the browser. If there's no <br> in the HTML source code, the browser will not insert a line break... except it will break on words when the word will not fit on the current row. However this type of break will not affect Test Studio verification's. Perhaps seeing this via GoToMeeting where you can demonstrate the problem to me and we can discuss it would help. Let me know what time zone you are in and your availability and I'll setup the meeting. I'm in Austin, TX which is Central Time (GMT -6).
Kind regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Cheryl
Top achievements
Rank 1
answered on 17 Apr 2012, 11:48 PM
Hi Cody
I agree that it looks like there is a <br> forcing the line break in the text, BUT when you view the html source in the browser there is no <br> anywhere within the text.
Cheryl
(Sorry don't have GoToMeeting)
I agree that it looks like there is a <br> forcing the line break in the text, BUT when you view the html source in the browser there is no <br> anywhere within the text.
Cheryl
(Sorry don't have GoToMeeting)
0
Hello Cheryl,
Cody
the Telerik team
GoToMeeting is an oniine screen sharing/meeting application. I have a paid GoToMeeting account. When I setup a meeting there is no cost to you. You will need to install a very small client, but that is very quick and easy. All you need to do is click on the link of a GoToMeeting invite to have the client automatically installed and join the online meeting. It really is simple and painless.
I still would very much like to see and discuss your problem first hand. Let me know what time works for you and I'll setup the online meeting (at no cost to you).
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings