Description
The Check
method compares the audit scores the WebAudits.For(…)….Query
object contains against the threshold values specified for that object and reports the results to the test log.
Declaration
WebAuditsCheckpointResult.Check()
Result | Boolean |
Applies To
The method is applied to the following object:
Result Value
True if all audit scores are equal to or greater than the specified threshold values. Otherwise, False.
Example
The following example shows how to get audit scores for a web page and then compare them against threshold values:
JavaScript, JScript
function VerifyWebPage(){
var url = "http://services.smartbear.com/samples/TestComplete15/smartstore";
WebAudits.For(url).AddSEOAudits(30).AddAccessibilityAudits(50).Query().Check();
}
Python
def VerifyWebPage():
url = "http://services.smartbear.com/samples/TestComplete14/smartstore"
auditsResult = WebAudits.For(url).AddSEOAudits(30).AddAccessibilityAudits(50).Query()
auditsResult.Check()
VBScript
Sub VerifyWebPage
url = "http://services.smartbear.com/samples/TestComplete15/smartstore"
WebAudits.For(url).AddSEOAudits(30).AddAccessibilityAudits(50).Query().Check()
End Sub
DelphiScript
procedure VerifyWebPage();
var url;
begin
url := 'http://services.smartbear.com/samples/TestComplete15/smartstore';
WebAudits.For(url).AddSEOAudits(30).AddAccessibilityAudits(50).Query().Check();
end;
C++Script, C#Script
function VerifyWebPage(){
var url = "http://services.smartbear.com/samples/TestComplete15/smartstore";
WebAudits["For"](url)["AddSEOAudits"](30)["AddAccessibilityAudits"](50)["Query"]()["Check"]();
}