Hi,
Is there a way to check a website for specific words? For example, when I receive an 'Unexpected Error' on the page, I can still navigate through the toolbar and therefore, the test passes.
What I am looking to do is to fail the test if the words 'Unexpected Error' displays on the page.
Could anyone help with this?
Thanks
Is there a way to check a website for specific words? For example, when I receive an 'Unexpected Error' on the page, I can still navigate through the toolbar and therefore, the test passes.
What I am looking to do is to fail the test if the words 'Unexpected Error' displays on the page.
Could anyone help with this?
Thanks
4 Answers, 1 is accepted
0
Accepted
Hello Eugene,
You can easily verify if the entire page contains or does not contain a certain string:
All the best,
Anthony
the Telerik team
You can easily verify if the entire page contains or does not contain a certain string:
- Click the DOM Explorer button in the Recording Toolbar.
- Locate a top level element, like <html> or <body>, right click it, and select Show Element Menu (see screen shot 1).
- Click the Build Verification button from the Elements Menu (see screen shot 2).
- Click the Content button and verify that InnerText NotContain Unexpected Error.
- Click OK to save the verification to the test.
All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
eugene
Top achievements
Rank 1
answered on 31 Jul 2012, 02:57 PM
Thank you Anthony. That's exactly what I was looking for. I was on the right track, but I was trying to use (if...else) instead of just a verify.
I have another question regarding this topic. Is there a way that I can add this verify to the entire test so that it verifies for every step?
Thanks
I have another question regarding this topic. Is there a way that I can add this verify to the entire test so that it verifies for every step?
Thanks
0
Hello Eugene,
No, there's no way to do that (short of copying and pasting it after every step).
You may be able to incorporate that Verification into a While Loop, however, to achieve your goal. That way the verification would be rechecked after each iteration of the steps within the loop, but not after every single step.
Regards,
Anthony
the Telerik team
No, there's no way to do that (short of copying and pasting it after every step).
You may be able to incorporate that Verification into a While Loop, however, to achieve your goal. That way the verification would be rechecked after each iteration of the steps within the loop, but not after every single step.
Regards,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
eugene
Top achievements
Rank 1
answered on 31 Jul 2012, 08:09 PM
I see. Well thank you for all your help Anthony. The verify step was a life saver. To run against an entire test would be a great added feature.