WebAudits.For Method

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

Use the WebAudits.For method to create a web audits checkpoint for the specified web page.

By default, the created checkpoint will include all the available audits, and their threshold values will be set to 90.

Requirements
  • TestComplete version 14.1.

  • An active license for the Web module.

  • An active license for the Intelligent Quality add-on.

  • The Intelligent Quality add-on and its Web Audits plugin must be enabled in TestComplete.

    You can enable the add-on and plugin during TestComplete installation. If you did not enable them during the installation, you can do this at any moment later via the File > Install Extensions dialog. To do that, select File > Install Extensions from the TestComplete main menu and enable the Intelligent Quality > Intelligent Quality Core and Web Audits plugins in the resulting dialog.

  • Google Chrome must be installed on your computer.

Declaration

WebAudits.For(URL)

URL [in]    Required    String    
Result A WebAuditsCheckpoint object

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

URL

The URL address of the web page against which you want to run audits.

Result Value

The WebAuditsCheckpoint object you can use to configure and run audits.

Example

The following example demonstrates how to run web audits against the specified web page:

JavaScript, JScript

function VerifyWebPage()
{
 var url = "http://services.smartbear.com/samples/TestComplete14/smartstore";
 WebAudits.For(url).Check();
}

Python

def VerifyWebPage():
  url = "http://services.smartbear.com/samples/TestComplete14/smartstore"
  WebAudits.For(url).Check()

VBScript

Sub VerifyWebPage
 url = "http://services.smartbear.com/samples/TestComplete14/smartstore"
 WebAudits.For(url).Check()
End Sub

DelphiScript

procedure VerifyWebPage();
var url;
begin
 url :='http://services.smartbear.com/samples/TestComplete14/smartstore';
 WebAudits.For(url).Check();
end;

C++Script, C#Script

function VerifyWebPage()
{
 var url = "http://services.smartbear.com/samples/TestComplete14/smartstore";
 WebAudits["For"](url)["Check"]();
}

See Also

WebAuditsCheckpoint Object
Web Audits Checkpoints

Highlight search results