Limitations for Testing with Google Chrome on macOS

The following list lists the known limitations for playing back tests and recording locators with Google Chrome on macOS:
  • Silk Test Classic does not support the CMD key for the TypeKeys method.
  • Silk Test does not support testing child technology domains of the xBrowser domain with Google Chrome. For example Apache Flex or Microsoft Silverlight are not supported with Google Chrome.
  • Silk Test Classic does not support recording a test in an HTTP Basic Authentication dialog.
  • Silk Test does not provide native support for Google Chrome. You cannot test internal Google Chrome functionality. For example, in a test, you cannot change the currently displayed web page by adding text to the navigation bar through Win32. As a workaround, you can use API calls to navigate between web pages. Silk Test supports handling alerts and similar dialog boxes through the Alerts API.
  • Silk Test Classic does not support the GetFocus method of the MoveableWin class.
  • Testing on multiple Google Chrome windows at the same time is not supported on macOS.
  • Attaching to an already opened Google Chrome window on macOS is not supported.
  • When using Internet Explorer to replay a test, you can use the following code to test executeJavaScript:
    // Java code
    desktop.<BrowserWindow> find("//BrowserWindow")
      .executeJavaScript("function foo() { alert('Silk Test'); }");
    desktop.<BrowserWindow> find("//BrowserWindow")

    When replaying tests on Google Chrome, the scripts are not executed in the global context (window), but in a closure. Everything is executed within a function. The first ExecuteJavaScript call in the previous code sample will not work with Google Chrome, because the function foo is only available as long as the ExecuteJavaScript call lasts.

    To replay the same test on Google Chrome, you can use the following function expression:
    // Java code
    desktop.<BrowserWindow> find("//BrowserWindow")
      .executeJavaScript(" = function() { alert('Silk Test'); }");
    desktop.<BrowserWindow> find("//BrowserWindow")

    The previous code samples will work in Silk4J. The code for the other Silk Test clients is similar. For additional information, refer to the documentation of the ExecuteJavaScript method in the Help of your Silk Test client.