AccessToChromiumContent Property

Applies to TestComplete 14.70, last modified on April 22, 2021

Description

Specifies whether the application launched by using the ClickOnce technology allows accessing its CEF contents. The property corresponds to the Allow TestComplete to interact with embedded Chromium content option specified for the application in the TestedApps editor.

Declaration

ProgObj.AccessToChromiumContent

Read-Write Property Boolean
ProgObj An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

Property Value

True if the application's Allow TestComplete to interact with embedded Chromium content option is enabled, and False otherwise.

Example

The following example demonstrates how to add a CEF application launched by using the ClickOnce technology and how to enable TestComplete to interact with the application's content:

JavaScript, JScript

function ClickOnceApp()
 {
  var index = TestedApps.AddClickOnceApp("http://www.example.com/myapp/MyApp.application", "MyApp.exe");
  var app = TestedApps.Items(index);
  app.WaitTimeout = 60000; // Launch timeout - 1 min (60000 ms)
  app.AccessToChromiumContent = true; // Enable support for ClickOnce CEF applications (by default it is disabled)
  
  app.Run();

  // Test the application
  ...

  app.Close();
 }

Python

def ClickOnceApp():
  index = TestedApps.AddClickOnceApp("http://www.example.com/myapp/MyApp.application", "MyApp.exe")
  app = TestedApps.Items[index]
  app.WaitTimeout = 60000 # Launch timeout - 1 min (60000 ms)
  app.AccessToChromiumContent = true # Enable support for ClickOnce CEF applications (by default it is disabled)

  app.Run()

  # Test the application
  # ...

  app.Close()

VBScript

Sub ClickOnceApp
  Dim index, app

  index = TestedApps.AddClickOnceApp("http://www.example.com/myapp/MyApp.application", "MyApp.exe")
  Set app = TestedApps.Items(index)
  app.WaitTimeout = 60000 ' Launch timeout - 1 min (60000 ms)
  app.AccessToChromiumContent = true ' Enable support for ClickOnce CEF applications (by default it is disabled)

  app.Run

  ' Test the application
  ...

  app.Close
End Sub

DelphiScript

procedure ClickOnceApp;
var index, app;
begin
  index := TestedApps.AddClickOnceApp('http://www.example.com/myapp/MyApp.application', 'MyApp.exe');
  app := TestedApps.Items(index);
  app.WaitTimeout := 60000; // Launch timeout - 1 min (60000 ms)
  app.AccessToChromiumContent := true; // Enable support for ClickOnce CEF applications (by default it is disabled)
  app.Run;

  // Test the application
  ...

  app.Close;
end;

C++Script, C#Script

function ClickOnceApp()
{
  var index = TestedApps["AddClickOnceApp"]("http://www.example.com/myapp/MyApp.application", "MyApp.exe");
  var app = TestedApps["Items"](index);
  app["WaitTimeout"] = 60000; // Launch timeout - 1 min (60000 ms)
  app["AccessToChromiumContent"] = true; // Enable support for ClickOnce CEF applications (by default it is disabled)
  app["Run"]();

  // Test the application
  ...

  app["Close"]();
}

See Also

Testing ClickOnce Applications
ClickOnce Application Parameters
ClickOnceTestedApp Object

Highlight search results