Skip to content

Commit ab376bc

Browse files
committed
[plugin-web-app] Drop support of EdgeHTML browser
Selenium 4 doesn't support EdgeHTML: SeleniumHQ/selenium#9166
1 parent b35da4b commit ab376bc

File tree

8 files changed

+14
-69
lines changed

8 files changed

+14
-69
lines changed

.github/workflows/gradle.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
shell: bash
180180
run: |
181181
if [[ -n $LAMBDATEST_USER && -n $LAMBDATEST_KEY ]]; then
182-
declare -a profiles=( iexplore chrome firefox edge safari )
182+
declare -a profiles=( iexplore chrome firefox edge/chromium safari )
183183
for profile in "${profiles[@]}"; do
184184
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/lambdatest \
185185
-Pvividus.configuration.suites=lambdatest \
@@ -200,7 +200,7 @@ jobs:
200200
shell: bash
201201
run: |
202202
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
203-
declare -a profiles=( iexplore chrome firefox edge edge/chromium safari )
203+
declare -a profiles=( iexplore chrome firefox edge/chromium safari )
204204
for profile in "${profiles[@]}"; do
205205
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs \
206206
-Pvividus.configuration.suites=grid \
@@ -344,7 +344,7 @@ jobs:
344344
shell: bash
345345
run: |
346346
if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY ]]; then
347-
declare -a profiles=( iexplore chrome firefox edge safari )
347+
declare -a profiles=( iexplore chrome firefox edge/chromium safari )
348348
for profile in "${profiles[@]}"; do
349349
./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=grid \
350350
-Pvividus.configuration.profiles=browserstack/web,web/desktop/${profile} \

vividus-plugin-web-app/src/main/java/org/vividus/selenium/WebDriverType.java

+1-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -134,24 +134,6 @@ public WebDriver getWebDriver(DesiredCapabilities desiredCapabilities, WebDriver
134134
return new SafariDriver(SafariOptions.fromCapabilities(desiredCapabilities));
135135
}
136136
},
137-
EDGE(false, false, false, Set.of(), BrowserType.EDGE)
138-
{
139-
@Override
140-
public WebDriver getWebDriver(DesiredCapabilities desiredCapabilities, WebDriverConfiguration configuration)
141-
{
142-
EdgeOptions edgeOptions = new EdgeOptions();
143-
edgeOptions.merge(desiredCapabilities);
144-
edgeOptions.setCapability("ms:inPrivate", true);
145-
return new EdgeDriver(edgeOptions);
146-
}
147-
148-
@Override
149-
void setDriverExecutablePath(Optional<String> driverExecutablePath)
150-
{
151-
setDriverExecutablePathImpl(driverExecutablePath, EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY,
152-
WebDriverManager::edgedriver);
153-
}
154-
},
155137
OPERA(true, true, false, Set.of(OperaOptions.CAPABILITY), BrowserType.OPERA_BLINK)
156138
{
157139
@Override

vividus-plugin-web-app/src/main/java/org/vividus/ui/web/action/MouseActions.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -195,9 +195,9 @@ public void moveToElement(WebElement element)
195195
{
196196
if (element != null)
197197
{
198-
// Safari, Firefox and Edge Drivers don't scroll to element before moveTo action
198+
// Safari and Firefox Drivers don't scroll to element before moveTo action
199199
if (webDriverManager.isMobile()
200-
|| webDriverManager.isTypeAnyOf(WebDriverType.SAFARI, WebDriverType.FIREFOX, WebDriverType.EDGE))
200+
|| webDriverManager.isTypeAnyOf(WebDriverType.SAFARI, WebDriverType.FIREFOX))
201201
{
202202
javascriptActions.scrollIntoView(element, true);
203203
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
selenium.browser=edge_chromium
22

33
selenium.grid.capabilities.platformName=ANY
4+
selenium.grid.capabilities.browserName=MicrosoftEdge
5+
6+
selenium.screenshot.strategy=VIEWPORT_PASTING
47

58
selenium.grid.screen-resolution=1920x1080

vividus-plugin-web-app/src/main/resources/properties/profile/web/desktop/edge/profile.properties

-8
This file was deleted.

vividus-plugin-web-app/src/test/java/org/vividus/selenium/WebDriverTypeTests.java

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -189,23 +189,6 @@ void testGetSafariWebDriver()
189189
}
190190
}
191191

192-
@Test
193-
void testGetEdgeWebDriver()
194-
{
195-
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
196-
EdgeOptions edgeOptions = new EdgeOptions();
197-
edgeOptions.merge(desiredCapabilities);
198-
edgeOptions.setCapability("ms:inPrivate", true);
199-
try (MockedConstruction<EdgeDriver> edgeDriverMock = mockConstruction(EdgeDriver.class, (mock, context) -> {
200-
assertEquals(1, context.getCount());
201-
assertEquals(List.of(edgeOptions), context.arguments());
202-
}))
203-
{
204-
WebDriver actual = WebDriverType.EDGE.getWebDriver(desiredCapabilities, new WebDriverConfiguration());
205-
assertEquals(edgeDriverMock.constructed().get(0), actual);
206-
}
207-
}
208-
209192
@Test
210193
void testGetEdgeChromiumWebDriver()
211194
{
@@ -263,7 +246,6 @@ private static void testGetOperaWebDriver(WebDriverConfiguration configuration,
263246
"IEXPLORE, false",
264247
"CHROME, true",
265248
"SAFARI, false",
266-
"EDGE, false",
267249
"EDGE_CHROMIUM, false",
268250
"OPERA, true"
269251
})
@@ -278,7 +260,6 @@ void testIsBinaryPathSupported(WebDriverType type, boolean binaryPathSupported)
278260
"IEXPLORE, true",
279261
"CHROME, true",
280262
"SAFARI, false",
281-
"EDGE, false",
282263
"EDGE_CHROMIUM, false",
283264
"OPERA, true"
284265
})
@@ -293,7 +274,6 @@ void testIsCommandLineArgumentsSupported(WebDriverType type, boolean commandLine
293274
"IEXPLORE, true",
294275
"CHROME, false",
295276
"SAFARI, false",
296-
"EDGE, false",
297277
"EDGE_CHROMIUM, false",
298278
"OPERA, false"
299279
})
@@ -308,7 +288,6 @@ void testIsUseW3C(WebDriverType type, boolean useW3C)
308288
"IEXPLORE, false",
309289
"CHROME, false",
310290
"SAFARI, false",
311-
"EDGE, true",
312291
"EDGE_CHROMIUM, true",
313292
"OPERA, false"
314293
})
@@ -322,7 +301,6 @@ void testGetDriverSpecificCapabilities(WebDriverType type, boolean empty)
322301
"FIREFOX, webdriver.gecko.driver",
323302
"IEXPLORE, webdriver.ie.driver",
324303
"CHROME, webdriver.chrome.driver",
325-
"EDGE, webdriver.edge.driver",
326304
"EDGE_CHROMIUM, webdriver.edge.driver",
327305
"OPERA, webdriver.opera.driver"
328306
})
@@ -369,12 +347,6 @@ void testSetOperaDriverExecutablePathViaAutomaticManager()
369347
testSetDriverExecutablePathViaAutomaticManager(WebDriverType.OPERA, WebDriverManager::operadriver);
370348
}
371349

372-
@Test
373-
void testSetEdgeDriverExecutablePathViaAutomaticManager()
374-
{
375-
testSetDriverExecutablePathViaAutomaticManager(WebDriverType.EDGE, WebDriverManager::edgedriver);
376-
}
377-
378350
private static void testSetDriverExecutablePathViaAutomaticManager(WebDriverType type,
379351
Supplier<WebDriverManager> managerSupplier)
380352
{

vividus-plugin-web-app/src/test/java/org/vividus/selenium/manager/WebDriverManagerTests.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -156,8 +156,6 @@ static Stream<Arguments> webDriverTypeChecks()
156156
Arguments.of(BrowserType.FIREFOX_CHROME, WebDriverType.FIREFOX, false ),
157157
Arguments.of(BrowserType.CHROME, WebDriverType.CHROME, true ),
158158
Arguments.of(BrowserType.FIREFOX_CHROME, WebDriverType.CHROME, false ),
159-
Arguments.of(BrowserType.EDGE, WebDriverType.EDGE, true ),
160-
Arguments.of(BrowserType.IE, WebDriverType.EDGE, false ),
161159
Arguments.of(BrowserType.IEXPLORE, WebDriverType.IEXPLORE, true ),
162160
Arguments.of(BrowserType.IE_HTA, WebDriverType.IEXPLORE, false ),
163161
Arguments.of(BrowserType.SAFARI, WebDriverType.SAFARI, true ),
@@ -173,7 +171,6 @@ static Stream<Arguments> webDriverTypeDetections()
173171
Arguments.of(BrowserType.FIREFOX_CHROME, null ),
174172
Arguments.of(BrowserType.CHROME, WebDriverType.CHROME ),
175173
Arguments.of(BrowserType.FIREFOX_CHROME, null ),
176-
Arguments.of(BrowserType.EDGE, WebDriverType.EDGE ),
177174
Arguments.of(BrowserType.IE, WebDriverType.IEXPLORE ),
178175
Arguments.of(BrowserType.IEXPLORE, WebDriverType.IEXPLORE ),
179176
Arguments.of(BrowserType.IE_HTA, null ),

vividus-plugin-web-app/src/test/java/org/vividus/ui/web/action/MouseActionsTests.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -495,8 +495,7 @@ void shouldScrollToElementOnBrowsersNotPerformingScrollAutomatically()
495495
when(webDriverProvider.get()).thenReturn(webDriver);
496496
when(((HasInputDevices) webDriver).getMouse()).thenReturn(mouse);
497497
when(webDriverManager.isMobile()).thenReturn(false);
498-
when(webDriverManager.isTypeAnyOf(WebDriverType.SAFARI, WebDriverType.FIREFOX, WebDriverType.EDGE))
499-
.thenReturn(true);
498+
when(webDriverManager.isTypeAnyOf(WebDriverType.SAFARI, WebDriverType.FIREFOX)).thenReturn(true);
500499
mouseActions.moveToElement(locatableWebElement);
501500
verify(javascriptActions).scrollIntoView(locatableWebElement, true);
502501
}

0 commit comments

Comments
 (0)