From b1cd4e78339f5ad95caaea8db297a51da07281f4 Mon Sep 17 00:00:00 2001 From: Ivan Shubin Date: Wed, 5 Dec 2018 21:56:44 +0100 Subject: [PATCH 01/17] Fix for #597 now pre-creating all sections for root objects --- .../com/galenframework/generator/model/GmPageSpec.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/galen-core/src/main/java/com/galenframework/generator/model/GmPageSpec.java b/galen-core/src/main/java/com/galenframework/generator/model/GmPageSpec.java index 459a00bf..94746539 100644 --- a/galen-core/src/main/java/com/galenframework/generator/model/GmPageSpec.java +++ b/galen-core/src/main/java/com/galenframework/generator/model/GmPageSpec.java @@ -38,12 +38,7 @@ public static GmPageSpec create(PageSpecGenerationResult result) { Map pinPageSections = new HashMap<>(); - //TODO fix this for the cases when there are more than one root notes. Could be done by making sure that we always have single root element upfront. if not -> make a boundary box - PageItemNode screenPin = result.getObjects().get(0); - pinPageSections.put(screenPin, skeletonSection); - - - screenPin.getChildren().forEach(bigPin -> { + result.getObjects().forEach(rootObject -> rootObject.getChildren().forEach(bigPin -> { GmPageSection pageSection = pageSpec.createNewSection(bigPin.getPageItem().getName() + " elements"); bigPin.visitTree(p -> { if (p == bigPin) { @@ -52,7 +47,7 @@ public static GmPageSpec create(PageSpecGenerationResult result) { pinPageSections.put(p, pageSection); } }); - }); + })); Map> generatedRules = result.getSuggestionResults().getGeneratedRules(); From b42f899b8df38293bb3cf4827c1b8d5e01a6b025 Mon Sep 17 00:00:00 2001 From: Ivan Shubin Date: Sat, 22 Dec 2018 21:00:05 +0100 Subject: [PATCH 02/17] [maven-release-plugin] prepare release galen-2.4.1 --- galen-core/pom.xml | 2 +- galen-distribution/pom.xml | 2 +- galen-integration-tests/pom.xml | 2 +- galen-java-support/pom.xml | 2 +- galen-rainbow4j/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/galen-core/pom.xml b/galen-core/pom.xml index c5f35aca..ade38ae8 100644 --- a/galen-core/pom.xml +++ b/galen-core/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.1-SNAPSHOT + 2.4.1 diff --git a/galen-distribution/pom.xml b/galen-distribution/pom.xml index 19232aab..c6b5a65b 100644 --- a/galen-distribution/pom.xml +++ b/galen-distribution/pom.xml @@ -5,7 +5,7 @@ com.galenframework galen-parent - 2.4.1-SNAPSHOT + 2.4.1 galen-distribution diff --git a/galen-integration-tests/pom.xml b/galen-integration-tests/pom.xml index fd7050c0..5b797c98 100644 --- a/galen-integration-tests/pom.xml +++ b/galen-integration-tests/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.1-SNAPSHOT + 2.4.1 diff --git a/galen-java-support/pom.xml b/galen-java-support/pom.xml index 13cf5a73..1c3a06f7 100644 --- a/galen-java-support/pom.xml +++ b/galen-java-support/pom.xml @@ -9,7 +9,7 @@ com.galenframework galen-parent - 2.4.1-SNAPSHOT + 2.4.1 diff --git a/galen-rainbow4j/pom.xml b/galen-rainbow4j/pom.xml index 65fc4fad..3f23e0c4 100644 --- a/galen-rainbow4j/pom.xml +++ b/galen-rainbow4j/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.1-SNAPSHOT + 2.4.1 diff --git a/pom.xml b/pom.xml index 7e31c7bd..a894fcd4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.galenframework galen-parent - 2.4.1-SNAPSHOT + 2.4.1 Galen Framework Parent pom A library for layout testing of websites @@ -12,7 +12,7 @@ scm:git:ssh://git@github.com/galenframework/galen.git scm:git:ssh://git@github.com/galenframework/galen.git git@github.com/galenframework/galen.git - HEAD + galen-2.4.1 From bc79ba9aea86c66b1182641bfaa0513b7ba6f643 Mon Sep 17 00:00:00 2001 From: Ivan Shubin Date: Sat, 22 Dec 2018 21:00:19 +0100 Subject: [PATCH 03/17] [maven-release-plugin] prepare for next development iteration --- galen-core/pom.xml | 2 +- galen-distribution/pom.xml | 2 +- galen-integration-tests/pom.xml | 2 +- galen-java-support/pom.xml | 2 +- galen-rainbow4j/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/galen-core/pom.xml b/galen-core/pom.xml index ade38ae8..cf43e5ae 100644 --- a/galen-core/pom.xml +++ b/galen-core/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.1 + 2.4.2-SNAPSHOT diff --git a/galen-distribution/pom.xml b/galen-distribution/pom.xml index c6b5a65b..3dc7cd09 100644 --- a/galen-distribution/pom.xml +++ b/galen-distribution/pom.xml @@ -5,7 +5,7 @@ com.galenframework galen-parent - 2.4.1 + 2.4.2-SNAPSHOT galen-distribution diff --git a/galen-integration-tests/pom.xml b/galen-integration-tests/pom.xml index 5b797c98..58eb276e 100644 --- a/galen-integration-tests/pom.xml +++ b/galen-integration-tests/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.1 + 2.4.2-SNAPSHOT diff --git a/galen-java-support/pom.xml b/galen-java-support/pom.xml index 1c3a06f7..b8649fa1 100644 --- a/galen-java-support/pom.xml +++ b/galen-java-support/pom.xml @@ -9,7 +9,7 @@ com.galenframework galen-parent - 2.4.1 + 2.4.2-SNAPSHOT diff --git a/galen-rainbow4j/pom.xml b/galen-rainbow4j/pom.xml index 3f23e0c4..66c41f7c 100644 --- a/galen-rainbow4j/pom.xml +++ b/galen-rainbow4j/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.1 + 2.4.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index a894fcd4..6ba2968e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.galenframework galen-parent - 2.4.1 + 2.4.2-SNAPSHOT Galen Framework Parent pom A library for layout testing of websites @@ -12,7 +12,7 @@ scm:git:ssh://git@github.com/galenframework/galen.git scm:git:ssh://git@github.com/galenframework/galen.git git@github.com/galenframework/galen.git - galen-2.4.1 + HEAD From a96001230887517487296418c5b88cfb459877ed Mon Sep 17 00:00:00 2001 From: Martin Reinhardt Date: Wed, 2 Jan 2019 21:18:21 +0100 Subject: [PATCH 04/17] fix: pom.xml to reduce vulnerabilities (#598) #### Changes included in this PR - Changes to the following files to upgrade the vulnerable dependencies to a fixed version: - pom.xml #### Vulnerabilities that will be fixed ##### With an upgrade: - `pom.xml` - `com.fasterxml.jackson.core:jackson-databind@2.9.6 > com.fasterxml.jackson.core:jackson-databind@2.9.7` - [Deserialization of Untrusted Data](https://snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-72448) - [Deserialization of Untrusted Data](https://snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-72449) - [Deserialization of Untrusted Data](https://snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-72450) - [Deserialization of Untrusted Data](https://snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-72451) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6ba2968e..e5e5d34d 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 1.7.7.2 1.7.10 3.0.1 - 2.9.5 + 2.9.7 2.3.19 6.7 From da05267a689582f06bd81c23eef3fe07d58babf8 Mon Sep 17 00:00:00 2001 From: Enes Malik Terzi Date: Wed, 2 Jan 2019 23:20:04 +0300 Subject: [PATCH 05/17] fixes Locale problem when getting valueof AreaFinder (#604) --- .../java/com/galenframework/page/selenium/WebPageElement.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/galen-core/src/main/java/com/galenframework/page/selenium/WebPageElement.java b/galen-core/src/main/java/com/galenframework/page/selenium/WebPageElement.java index eb142374..962c5f8a 100644 --- a/galen-core/src/main/java/com/galenframework/page/selenium/WebPageElement.java +++ b/galen-core/src/main/java/com/galenframework/page/selenium/WebPageElement.java @@ -24,6 +24,7 @@ import org.openqa.selenium.*; +import java.util.Locale; public class WebPageElement extends PageElement { @@ -55,7 +56,7 @@ public Rect calculateArea() { private AreaFinder getAreaFinder() { String areaFinderName = GalenConfig.getConfig().getStringProperty(GalenProperty.GALEN_BROWSER_PAGELEMENT_AREAFINDER); - return AreaFinder.valueOf(areaFinderName.toUpperCase()); + return AreaFinder.valueOf(areaFinderName.toUpperCase(Locale.ENGLISH)); } private Rect correctedRect(Rect rect, CorrectionsRect corrections) { From f9bb58ae20a38c29f69713738d744973cb70ea05 Mon Sep 17 00:00:00 2001 From: Martin Reinhardt Date: Fri, 11 Jan 2019 20:33:19 +0100 Subject: [PATCH 06/17] fix: update libraries to solve security issues and bugs (#606) see #605 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index e5e5d34d..dcb173e1 100644 --- a/pom.xml +++ b/pom.xml @@ -31,12 +31,12 @@ 3.14.0 - 2.4 - 1.2 + 2.6 + 1.4 1.2.1 1.7.7.2 1.7.10 - 3.0.1 + 3.8.1 2.9.7 2.3.19 From 0458094324e740a003ff4e15a749d8ea1e4b0ee2 Mon Sep 17 00:00:00 2001 From: Ivan Shubin Date: Wed, 30 Jan 2019 21:49:21 +0100 Subject: [PATCH 07/17] fixed displaying of component specs in html report --- .../resources/html-report/galen-report.js | 39 +++++++++++-------- .../html-report/report-test.tpl.html | 13 ++++--- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/galen-core/src/main/resources/html-report/galen-report.js b/galen-core/src/main/resources/html-report/galen-report.js index 8623b932..7f4f743b 100644 --- a/galen-core/src/main/resources/html-report/galen-report.js +++ b/galen-core/src/main/resources/html-report/galen-report.js @@ -340,7 +340,7 @@ Vue.component('mutation-report', { }); Vue.component('layout-section', { - props: ['section', 'bus'], + props: ['layout', 'section', 'bus'], template: '#tpl-layout-section', methods: { toggleReportNode: toggleReportNode @@ -348,7 +348,7 @@ Vue.component('layout-section', { }); Vue.component('object-node', { - props: ['object', 'bus'], + props: ['layout', 'object', 'bus'], template: '#tpl-object-node', methods: { toggleReportNode: toggleReportNode @@ -356,7 +356,7 @@ Vue.component('object-node', { }); Vue.component('layout-spec', { - props: ['spec', 'bus'], + props: ['layout', 'spec', 'bus'], template: '#tpl-layout-spec', data: function () { return { @@ -365,7 +365,7 @@ Vue.component('layout-spec', { }, methods: { showSpec: function() { - this.bus.$emit('spec-clicked', this.spec); + this.bus.$emit('spec-clicked', this.spec, this.layout); } } }) @@ -389,15 +389,15 @@ Vue.component('layout-report', { }, methods: { toggleReportNode: toggleReportNode, - collectHighlightAreas: function (objectNames) { + collectHighlightAreas: function (objectNames, layout) { var self = this; var boundaryBox = { min: {x: 1000000, y: 1000000}, max: {x: 0, y: 0} }; var objects = _.mapNonNull(objectNames, function (objectName, index) { - if (self.layout.objects.hasOwnProperty(objectName)) { - var area = self.layout.objects[objectName].area; + if (layout.objects.hasOwnProperty(objectName)) { + var area = layout.objects[objectName].area; if (area) { var item = { name: objectName, @@ -425,17 +425,17 @@ Vue.component('layout-report', { boundaryBox: boundaryBox }; }, - findObjectArea: function(objectName) { - if (this.layout.objects.hasOwnProperty(objectName)) { - return this.layout.objects[objectName].area; + findObjectArea: function(objectName, layout) { + if (layout.objects.hasOwnProperty(objectName)) { + return layout.objects[objectName].area; } return null; }, - collectMetaGuides: function(meta) { + collectMetaGuides: function(meta, layout) { var self = this; return _.mapNonNull(meta, function (metaEntry) { - var fromArea = self.findObjectArea(metaEntry.from.object); - var toArea = self.findObjectArea(metaEntry.to.object); + var fromArea = self.findObjectArea(metaEntry.from.object, layout); + var toArea = self.findObjectArea(metaEntry.to.object, layout); if (fromArea && toArea) { var fromEdge = MetaUtils.fetchEdge(fromArea, metaEntry.from.edge); var toEdge = MetaUtils.fetchEdge(toArea, metaEntry.to.edge); @@ -448,13 +448,13 @@ Vue.component('layout-report', { return null; }); }, - specClicked: function(spec) { + specClicked: function(spec, layout) { this.screenshotPopup.metaGuides = []; if (spec.highlight && spec.highlight.length > 0) { - this.screenshotPopup.highlightAreas = this.collectHighlightAreas(spec.highlight); + this.screenshotPopup.highlightAreas = this.collectHighlightAreas(spec.highlight, layout); } if (spec.meta && spec.meta.length > 0) { - this.screenshotPopup.metaGuides = this.collectMetaGuides(spec.meta); + this.screenshotPopup.metaGuides = this.collectMetaGuides(spec.meta, layout); } this.screenshotPopup.spec = spec; this.screenshotPopup.shown = true; @@ -660,6 +660,13 @@ function enrichObjectAndReturnHasFailure(object) { if (spec.errors && spec.errors.length > 0) { object.hasFailure = true; } + if (spec.subLayout && spec.subLayout.sections) { + _.forEach(spec.subLayout.sections, function (subSection) { + if (enrichSectionAndReturnHasFailure(subSection)) { + object.hasFailure = true; + } + }); + } }); return object.hasFailure; } diff --git a/galen-core/src/main/resources/html-report/report-test.tpl.html b/galen-core/src/main/resources/html-report/report-test.tpl.html index 929b56bf..00d98ca1 100644 --- a/galen-core/src/main/resources/html-report/report-test.tpl.html +++ b/galen-core/src/main/resources/html-report/report-test.tpl.html @@ -54,7 +54,7 @@
{{childNode.name}}
- + @@ -156,7 +156,7 @@
- +
{{section.name}}
- - + +
@@ -188,7 +188,7 @@ v-on:click="toggleReportNode(object)" >{{object.name}}:
- +
@@ -202,6 +202,9 @@
  • {{error}}
+
+ +
+ + @@ -207,6 +225,8 @@ + + + + + From da054040d07374b168dca56d26452bcb0e662b81 Mon Sep 17 00:00:00 2001 From: Ivan Shubin Date: Sun, 10 Mar 2019 14:54:57 +0100 Subject: [PATCH 15/17] [maven-release-plugin] prepare release galen-2.4.4 --- galen-core/pom.xml | 2 +- galen-distribution/pom.xml | 2 +- galen-integration-tests/pom.xml | 2 +- galen-java-support/pom.xml | 2 +- galen-rainbow4j/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/galen-core/pom.xml b/galen-core/pom.xml index e3a726cb..9c6f7483 100644 --- a/galen-core/pom.xml +++ b/galen-core/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.4-SNAPSHOT + 2.4.4 diff --git a/galen-distribution/pom.xml b/galen-distribution/pom.xml index 4b02bcd3..f150d945 100644 --- a/galen-distribution/pom.xml +++ b/galen-distribution/pom.xml @@ -5,7 +5,7 @@ com.galenframework galen-parent - 2.4.4-SNAPSHOT + 2.4.4 galen-distribution diff --git a/galen-integration-tests/pom.xml b/galen-integration-tests/pom.xml index 57847c2e..c04e24c5 100644 --- a/galen-integration-tests/pom.xml +++ b/galen-integration-tests/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.4-SNAPSHOT + 2.4.4 diff --git a/galen-java-support/pom.xml b/galen-java-support/pom.xml index 1addb928..6d95539a 100644 --- a/galen-java-support/pom.xml +++ b/galen-java-support/pom.xml @@ -9,7 +9,7 @@ com.galenframework galen-parent - 2.4.4-SNAPSHOT + 2.4.4 diff --git a/galen-rainbow4j/pom.xml b/galen-rainbow4j/pom.xml index 4879aa32..99aa48a3 100644 --- a/galen-rainbow4j/pom.xml +++ b/galen-rainbow4j/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.4-SNAPSHOT + 2.4.4 diff --git a/pom.xml b/pom.xml index 234382dd..34d2c28e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.galenframework galen-parent - 2.4.4-SNAPSHOT + 2.4.4 Galen Framework Parent pom A library for layout testing of websites @@ -12,7 +12,7 @@ scm:git:ssh://git@github.com/galenframework/galen.git scm:git:ssh://git@github.com/galenframework/galen.git git@github.com/galenframework/galen.git - HEAD + galen-2.4.4 From 6c7dc1f11d097e6aa49c45d6a77ee688741657a4 Mon Sep 17 00:00:00 2001 From: Ivan Shubin Date: Sun, 10 Mar 2019 14:55:07 +0100 Subject: [PATCH 16/17] [maven-release-plugin] prepare for next development iteration --- galen-core/pom.xml | 2 +- galen-distribution/pom.xml | 2 +- galen-integration-tests/pom.xml | 2 +- galen-java-support/pom.xml | 2 +- galen-rainbow4j/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/galen-core/pom.xml b/galen-core/pom.xml index 9c6f7483..f2b52747 100644 --- a/galen-core/pom.xml +++ b/galen-core/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.4 + 2.4.5-SNAPSHOT diff --git a/galen-distribution/pom.xml b/galen-distribution/pom.xml index f150d945..2b2bdd6f 100644 --- a/galen-distribution/pom.xml +++ b/galen-distribution/pom.xml @@ -5,7 +5,7 @@ com.galenframework galen-parent - 2.4.4 + 2.4.5-SNAPSHOT galen-distribution diff --git a/galen-integration-tests/pom.xml b/galen-integration-tests/pom.xml index c04e24c5..62f1c856 100644 --- a/galen-integration-tests/pom.xml +++ b/galen-integration-tests/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.4 + 2.4.5-SNAPSHOT diff --git a/galen-java-support/pom.xml b/galen-java-support/pom.xml index 6d95539a..e30fa7fd 100644 --- a/galen-java-support/pom.xml +++ b/galen-java-support/pom.xml @@ -9,7 +9,7 @@ com.galenframework galen-parent - 2.4.4 + 2.4.5-SNAPSHOT diff --git a/galen-rainbow4j/pom.xml b/galen-rainbow4j/pom.xml index 99aa48a3..a738a2a1 100644 --- a/galen-rainbow4j/pom.xml +++ b/galen-rainbow4j/pom.xml @@ -10,7 +10,7 @@ com.galenframework galen-parent - 2.4.4 + 2.4.5-SNAPSHOT diff --git a/pom.xml b/pom.xml index 34d2c28e..9b66d712 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.galenframework galen-parent - 2.4.4 + 2.4.5-SNAPSHOT Galen Framework Parent pom A library for layout testing of websites @@ -12,7 +12,7 @@ scm:git:ssh://git@github.com/galenframework/galen.git scm:git:ssh://git@github.com/galenframework/galen.git git@github.com/galenframework/galen.git - galen-2.4.4 + HEAD From 2980b01685459fc26f61b7eb797464d2267d94d7 Mon Sep 17 00:00:00 2001 From: Tobias Doll Date: Fri, 21 Jun 2019 18:33:05 +0200 Subject: [PATCH 17/17] Use enableVnc as property from galen.config for Selenium Grid --- .../browser/SeleniumBrowserFactory.java | 7 +++++++ .../browser/SeleniumGridBrowserFactory.java | 13 +++++++++++++ .../com/galenframework/config/GalenProperty.java | 1 + 3 files changed, 21 insertions(+) diff --git a/galen-core/src/main/java/com/galenframework/browser/SeleniumBrowserFactory.java b/galen-core/src/main/java/com/galenframework/browser/SeleniumBrowserFactory.java index a651000c..a415e057 100644 --- a/galen-core/src/main/java/com/galenframework/browser/SeleniumBrowserFactory.java +++ b/galen-core/src/main/java/com/galenframework/browser/SeleniumBrowserFactory.java @@ -33,6 +33,8 @@ import org.openqa.selenium.phantomjs.PhantomJSDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.safari.SafariDriver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Collections; @@ -44,6 +46,7 @@ */ public class SeleniumBrowserFactory implements BrowserFactory { + private final static Logger LOG = LoggerFactory.getLogger(SeleniumBrowserFactory.class); public static final String FIREFOX = "firefox"; public static final String CHROME = "chrome"; public static final String IE = "ie"; @@ -82,6 +85,10 @@ private Browser createSeleniumGridBrowser() { if (platform != null && !platform.trim().isEmpty()) { gridFactory.setPlatform(Platform.valueOf(platform.toUpperCase())); } + Boolean enableVnc = GalenConfig.getConfig().getBooleanProperty(GalenProperty.GALEN_BROWSERFACTORY_SELENIUM_GRID_ENABLEVNC); + if (enableVnc != false) { + gridFactory.setEnableVnc(enableVnc); + } return gridFactory.openBrowser(); } diff --git a/galen-core/src/main/java/com/galenframework/browser/SeleniumGridBrowserFactory.java b/galen-core/src/main/java/com/galenframework/browser/SeleniumGridBrowserFactory.java index 25ecd3cf..2e1cd189 100644 --- a/galen-core/src/main/java/com/galenframework/browser/SeleniumGridBrowserFactory.java +++ b/galen-core/src/main/java/com/galenframework/browser/SeleniumGridBrowserFactory.java @@ -34,6 +34,7 @@ public class SeleniumGridBrowserFactory implements BrowserFactory { private String browser; private String browserVersion; private Platform platform; + private Boolean enableVnc; private Map desiredCapabilities = new HashMap<>(); public SeleniumGridBrowserFactory(String gridUrl) { @@ -69,6 +70,10 @@ public DesiredCapabilities createCapabilities(){ desiredCapabilities.setVersion(browserVersion); } + if (enableVnc != null && enableVnc != false) { + desiredCapabilities.setCapability("enableVNC", true); + } + for (Map.Entry dc : this.desiredCapabilities.entrySet()) { final String value = dc.getValue(); if("true".equals(value) || "false".equals(value)) { @@ -126,6 +131,14 @@ public String getGridUrl() { public void setGridUrl(String gridUrl) { this.gridUrl = gridUrl; } + + public Boolean getEnableVnc() { + return enableVnc; + } + + public void setEnableVnc(Boolean enableVnc) { + this.enableVnc = enableVnc; + } @Override public int hashCode() { diff --git a/galen-core/src/main/java/com/galenframework/config/GalenProperty.java b/galen-core/src/main/java/com/galenframework/config/GalenProperty.java index 7ce191a2..e4a4b3b5 100644 --- a/galen-core/src/main/java/com/galenframework/config/GalenProperty.java +++ b/galen-core/src/main/java/com/galenframework/config/GalenProperty.java @@ -50,6 +50,7 @@ public enum GalenProperty { GALEN_BROWSERFACTORY_SELENIUM_GRID_BROWSER("galen.browserFactory.selenium.grid.browser", null), GALEN_BROWSERFACTORY_SELENIUM_GRID_BROWSERVERSION("galen.browserFactory.selenium.grid.browserVersion", null), GALEN_BROWSERFACTORY_SELENIUM_GRID_PLATFORM("galen.browserFactory.selenium.grid.platform", null), + GALEN_BROWSERFACTORY_SELENIUM_GRID_ENABLEVNC("galen.browserFactory.selenium.grid.enableVnc", "false"), GALEN_BROWSER_VIEWPORT_ADJUSTSIZE("galen.browser.viewport.adjustSize", "false"),