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

Authentication is not passed during Browser Driven Script replay

Authentication is not passed during Browser Driven Script replay

There is a known issue which occurs during Browser Driven script replay execution within Silk Performer 17.5, 18.0 and 18.5 and relates to problems passing authentication to a server, when the authentication passed, is applicable to a part of an application which is opened in a new window using JavaScript. 

The problem is applicable to TryScript with Visible Client disabled and Load test execution (both approaches use the same process - perfBrowserHost.exe). Running a TryScript with Visible Client enabled, TryScript method in which the Silk Performer Browser Application is launched, the authentication is passed successfully.

Within the Browser driven script, authentication is passed using a BrowserSetAuthentication function. The BrowserSetAuthentication function will be recorded within Silk Performer when, during manual access within Internet Explorer, the user is prompted to insert authentication details. 

The subsequent script for replay may resemble the following:

BrowserClick("//a[@textContents='Launch Authentication']"); // Link which ultimately leads to the prompting of the authentication details

BrowserSetAuthentication("user1", "password1"); // authentication details to be passed

BrowserClick("//a[@id='myButton']"); // Button to click to open the new window and part of the request for the call, contains the specified authentication details

wnd2 := BrowserWaitForNewWindow("wnd2");

As the authentication is not passed as part of the request, the application is not rendered successfully within the new window, which will ultimately lead to subsequent errors during replay execution.

The issue will be addressed within Silk Performer 19.0.

In the meantime, to workaround the behaviour, the following may be applied:

Before the logic within the script which passes the authentication, i.e

BrowserSetAuthentication("user1", "password1");

BrowserClick("//a[@id='myButton']");

Include the following:

BrowserCreateWindow();

BrowserSetAuthentication("user1", "password1");

BrowserNavigate(" "); 

BrowserActivateWindow(wnd1);

Note:

1) The BrowserNavigate function should be a call to a static resource, i.e. http://myserver/test.html, on the same server which the authentication will be against.

2) The Window within the BrowserActivateWindow function, will be the handle for the main window of your application, which was active when making the following click 

BrowserClick("//a[@textContents='Launch Authentication']");

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:
‎2018-01-29 22:34
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.