Skip to content

Commit 4e47c57

Browse files
committed
AUT-104: fixed issue with passing debug port to RVM
1 parent ae8b084 commit 4e47c57

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed

RunOpenFin.bat

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ echo %startupURL%
3030
SET openfinLocation=%LocalAppData%\OpenFin
3131

3232
cd %openfinLocation%
33-
OpenFinRVM.exe --config=%startupURL% --runtime-arguments="--remote-debugging-port=%debuggingPort%"
33+
34+
IF "%debuggingPort%" == "0" (
35+
OpenFinRVM.exe --config=%startupURL%
36+
) else (
37+
OpenFinRVM.exe --config=%startupURL% --runtime-arguments="--remote-debugging-port=%debuggingPort%"
38+
)
3439

3540
ENDLOCAL

test/WD/Mocha/hello-openfin.js

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ describe('Hello OpenFin App testing with WD', function() {
2727
this.timeout(config.testTimeout);
2828

2929
before(function() {
30+
if (config.desiredCapabilities.chromeOptions.debuggerAddress) {
31+
// if debuggerAddress is set, ChromeDriver does NOT start "binary" and assumes it is already running,
32+
// it needs to start separately
33+
spawn(config.desiredCapabilities.chromeOptions.binary, config.desiredCapabilities.chromeOptions.args);
34+
}
35+
3036
// configure webdriver
3137
client = wd.promiseChainRemote(url.parse(config.remoteDriverUrl));
3238
return client.init(config.desiredCapabilities)

test/WebDriverIO/Mocha/hello-openfin.js

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ describe('Hello OpenFin App testing with webdriver.io', function() {
2020
this.timeout(config.testTimeout);
2121

2222
before(function(done) {
23+
if (config.desiredCapabilities.chromeOptions.debuggerAddress) {
24+
// if debuggerAddress is set, ChromeDriver does NOT start "binary" and assumes it is already running,
25+
// it needs to start separately
26+
spawn(config.desiredCapabilities.chromeOptions.binary, config.desiredCapabilities.chromeOptions.args);
27+
}
2328

2429
// configure webdriver
2530
var driverOptions = {

test/WebDriverJs/Mocha/hello-openfin.js

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ describe('Hello OpenFin App testing with selenium-webdriver', function () {
2323

2424
before(function (done) {
2525
// configure webdriver
26+
if (config.desiredCapabilities.chromeOptions.debuggerAddress) {
27+
// if debuggerAddress is set, ChromeDriver does NOT start "binary" and assumes it is already running,
28+
// it needs to start separately
29+
spawn(config.desiredCapabilities.chromeOptions.binary, config.desiredCapabilities.chromeOptions.args);
30+
}
2631
var capabilities = webdriver.Capabilities.chrome();
2732
capabilities.set('chromeOptions', config.desiredCapabilities.chromeOptions);
2833
client = new webdriver.Builder().usingServer(config.remoteDriverUrl).withCapabilities(capabilities).build();

test/app.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"devtools_port": 9090,
23
"startup_app": {
34
"name": "Hello OpenFin",
45
"url": "https://demoappdirectory.openf.in/desktop/config/apps/OpenFin/HelloOpenFin/index.html",

0 commit comments

Comments
 (0)