Updates
- OpenTest --version 1.2.2
- ChromeDriver 85.0.4183.87
Whenever I attempt to add the necessary external javascript files, it results in the following errors:
Caused by: java.lang.RuntimeException: Failed to evaluate JavaScript code at line number 1. The script content was:
$include(["signalr.min.js", "signalr.tests.js"]);
...
Caused by: java.lang.RuntimeException: Failed to run script file signalr.min.js
...
Caused by: javax.script.ScriptException: ReferenceError: "window" is not defined in <eval> at line number 1
I have consulted the documentation at:
Despite trying various combinations, none of them seem to be effective. It appears that I am overlooking something :(
My actor.yml file is set up with the chrome web-driver configured as follows:
# Selenium options
selenium:
# seleniumServerUrl: http://127.0.0.1:9515
desiredCapabilities:
browserName: chrome
chromeOptions:
args: [ --start-maximized ]
chromeDriverExePath: C:/Webdrivers/chromedriver.exe
chromeDriverExeArgs: [--start-maximized, --ignore-certificate-errors, --disable-popup-blocking, --disable-extensions-file-access-check, "--test-name", "--disable-extensions", "--disable-notifications", "--disable-web-security", "--disable-prompt-on-repost", "--browser-test", "--dom-automation", "--enable-caret-browsing", "--expose-internals-for-testing", "--force-login-manager-in-tests" ]
An illustration of the problematic test:
description: My Test
actors:
- actor: ACTOR1
segments:
- segment: 1
actions:
- description: include external SignalR script files
script: |
$include(["signalr.min.js", "signalr.tests.js"]);
- description: Initialize SignalR Connection
action: org.getopentest.selenium.ExecuteScript
args:
scriptArgs: $data("config").webChatUrl + $data("config").apiV1SignalRChathub
script: |
var hubUrl = arguments[0];
SignalRConnectionTest(hubUrl);
You can access the signalr.min.js file at: https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/3.1.7/signalr.min.js