Limitations for Testing with Google Chrome

The following list lists the known limitations for playing back tests and recording locators with Google Chrome on a local Windows machine:
  • 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.
  • Silk Test does not recognize opening the Print dialog box in Google Chrome by using the Google Chrome menu. To add opening this dialog box in Google Chrome to a test, you have to send Ctrl+Shift+P using the TypeKeys method. Internet Explorer does not recognize this shortcut, so you have to first record your test in Internet Explorer, and then manually add pressing Ctrl+Shift+P to your test.
  • Testing on multiple Google Chrome windows at the same time is only supported if the additional windows are opened from the initial Google Chrome window by the AUT itself. If the additional Google Chrome windows are opened manually, Silk Test Classic does not recognize the elements on these Google Chrome windows. For example, Silk Test Classic recognizes the elements in a Google Chrome window that is opened by clicking on a link or a button in the AUT during recording, but Silk Test Classic does not recognize the elements in a Google Chrome window that was opened by pressing CTRL+N during recording.
  • 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")
      .executeJavaScript("foo();");

    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("window.foo = function() { alert('Silk Test'); }");
    desktop.<BrowserWindow> find("//BrowserWindow")
      .executeJavaScript("window.foo();");

    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.

  • Parallel testing on Google Chrome does not work if the user data directory for Google Chrome is set through a group policy. As a workaround, ask your administrator to remove the registry key HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\UserDataDir or HKEY_CURRENT_USER\Software\Policies\Google\Chrome\UserDataDir.