How to do negative testing on webpage? Can I have to capture all error pages?
Submitted by: AdministratorCapturing all the error messages page would lengthen your script.....Capture only one page and using "*" in declaration try to make the identifier common to all the pages...
If the error message appears as a text message, get the index of the text (Generally it is fixed) and retrieve the value of the test and compare with the expected e,g
if BrowserPage.HtmlText ("#1").GetText () == "Invalid date"
Print ("Pass")
else
Print ("Fail")
Suppose first time you enter an invalid mail ID and the error page has the tag "Error Page - Invalid mail ID". 2nd time you enter invalid date and the error page has the tag "Error Page - Invalid date".
To generalize the error page, change the tag to "Error Page - Invalid*" or "Error Page*" which suffices that error page is there.....
Submitted by: Administrator
If the error message appears as a text message, get the index of the text (Generally it is fixed) and retrieve the value of the test and compare with the expected e,g
if BrowserPage.HtmlText ("#1").GetText () == "Invalid date"
Print ("Pass")
else
Print ("Fail")
Suppose first time you enter an invalid mail ID and the error page has the tag "Error Page - Invalid mail ID". 2nd time you enter invalid date and the error page has the tag "Error Page - Invalid date".
To generalize the error page, change the tag to "Error Page - Invalid*" or "Error Page*" which suffices that error page is there.....
Submitted by: Administrator
Read Online SilkTest Job Interview Questions And Answers
Top SilkTest Questions
☺ | How to search for html link? |
☺ | How to read .xls file contents without using the ddt wizard? |
☺ | Need help regd. silk test runing thr .bat file on cmd prompt? |
☺ | How to launch 2 web application windows simultaneously thru Silktest? |
☺ | Can SilkTest run on Mac? |
Top Application Program Categories
☺ | AutoCAD Interview Questions. |
☺ | Microsoft Office Interview Questions. |
☺ | Microsoft Outlook Interview Questions. |
☺ | Microsoft Excel Interview Questions. |
☺ | WPF Interview Questions. |