[MGNLTEST-364] Improve/fix Selenium#newRemoteWebDriver to harmonize with SaasWebdriver for random selenium-ports Created: 25/Nov/22  Updated: 18/Dec/22  Resolved: 06/Dec/22

Status: Closed
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.1

Type: Improvement Priority: Neutral
Reporter: Christoph Meier Assignee: Christoph Meier
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 2.5h
Original Estimate: Not Specified

Issue Links:
dependency
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: cucumber-and-selenide-support-by-test-fwk
Work Started:

 Description   

In Selenium#newRemoteWebDriver, we assign the URL for the remoteWebdriver, before instantiating the WebDriver (which then gets wrapped with VaadinWebDriverWrapper).

In SaasWebdriverConfiguration, we set (again!) remoteWebdriverUrl - for Selenide.
This all works totally fine, if the port is constant, and so far "we" always have used constant port 4444 (for ce, dx-core, magnolia-cloud/e2e, saas-TF ...)
but on subscription-service-ui/e2e we must use random port, random-number created on Jenkins. If randomPort !=4444, we have a missmatch, which I guess is the reason for the exception

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

I know that the driverSetup looks complicated, IS complicated.
But it makes sense, to let us use some config, browsers settings, etc. pp, for core-TF, core-tests, saas-TF, saas-tests, etc. pp

How it can be fixed hopefully:

In Selenium#newRemoteWebDriver, before assembling seleniumServerUrl:
Check whether we have systemProperty for "remote.driver.url.
If yes: Use it
Else: Assemble it as it was before


Generated at Mon Feb 12 07:48:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.