Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

SilkTest Open Agent fails to record Javascript

SilkTest Open Agent fails to record Javascript

This problem occurs in SilkTest 14.x, SilkTest 15.0 and SilkTest 15.0 HF 1 running under IE 8/9/10/11. It can be reproduced as follows;

1. Create a javascript file and save as “C:\index.html” as below:

  <script >
  function clickfunc(){
    func = function(){
      alert(1);
    }
  window.setTimeout("func()", 10);
  }
  </script >
  <a href="#" onclick="javascript:clickfunc()" >click me </a >

2. Start SilkTest Classic
3. Select New Project | Generic | Open Agent | Project Name
4. Click “Configure Applications”
5. Select Web Site Test Configuration | Browser type: IE | Browser Instance: Start new browser:
6. Browse to URL: C:\index.html
7. Click “Record Testcase”
8. Click “click me” under the “index.html”

The 'Alert 1' popup dialog does not appear.

The workaround solution is to modify

  window.setTimeout("func()", 10)
 
to

  window.setTimeout(func, 10)
 
SilkTest can then record this script as normal. This has been confirmed as a defect and will be fixed in a future release of SilkTest.

Tags (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2014-03-18 12:20
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.