Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
28f115bc
Commit
28f115bc
authored
Nov 22, 2024
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/seleniumserver: remove deprecated DesiredCapabilities
parent
c112777d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
software/seleniumserver/test/test.py
software/seleniumserver/test/test.py
+12
-9
No files found.
software/seleniumserver/test/test.py
View file @
28f115bc
...
...
@@ -45,7 +45,6 @@ import requests
from
PIL
import
Image
from
selenium
import
webdriver
from
selenium.webdriver.common.by
import
By
from
selenium.webdriver.common.desired_capabilities
import
DesiredCapabilities
from
selenium.webdriver.remote.remote_connection
import
RemoteConnection
from
selenium.webdriver.support
import
expected_conditions
as
EC
from
selenium.webdriver.support.ui
import
WebDriverWait
...
...
@@ -252,7 +251,7 @@ class TestBrowserSelection(WebServerMixin, SeleniumServerTestCase):
driver
=
webdriver
.
Remote
(
command_executor
=
webdriver_url
,
desired_capabilities
=
DesiredCapabilities
.
CHROME
)
desired_capabilities
=
webdriver
.
ChromeOptions
().
to_capabilities
()
)
driver
.
get
(
self
.
server_url
)
self
.
assertEqual
(
'Test page'
,
driver
.
title
)
...
...
@@ -268,7 +267,7 @@ class TestBrowserSelection(WebServerMixin, SeleniumServerTestCase):
driver
=
webdriver
.
Remote
(
command_executor
=
webdriver_url
,
desired_capabilities
=
DesiredCapabilities
.
FIREFOX
)
desired_capabilities
=
webdriver
.
FirefoxOptions
().
to_capabilities
()
)
driver
.
get
(
self
.
server_url
)
self
.
assertEqual
(
'Test page'
,
driver
.
title
)
...
...
@@ -281,7 +280,7 @@ class TestBrowserSelection(WebServerMixin, SeleniumServerTestCase):
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
webdriver_url
=
parameter_dict
[
'backend-url'
]
desired_capabilities
=
DesiredCapabilities
.
FIREFOX
.
copy
()
desired_capabilities
=
webdriver
.
FirefoxOptions
().
to_capabilities
()
desired_capabilities
[
'version'
]
=
'102.15.1esr'
driver
=
webdriver
.
Remote
(
command_executor
=
webdriver_url
,
...
...
@@ -339,7 +338,7 @@ class TestFrontend(WebServerMixin, SeleniumServerTestCase):
driver
=
webdriver
.
Remote
(
command_executor
=
executor
,
desired_capabilities
=
DesiredCapabilities
.
CHROME
)
desired_capabilities
=
webdriver
.
ChromeOptions
().
to_capabilities
()
)
driver
.
get
(
self
.
server_url
)
self
.
assertEqual
(
'Test page'
,
driver
.
title
)
...
...
@@ -414,7 +413,8 @@ class TestFirefox102(
SeleniumServerTestCase
,
ImageComparisonTestCase
,
):
desired_capabilities
=
dict
(
DesiredCapabilities
.
FIREFOX
,
version
=
'102.15.1esr'
)
desired_capabilities
=
dict
(
webdriver
.
FirefoxOptions
().
to_capabilities
(),
version
=
'102.15.1esr'
)
user_agent
=
'Gecko/20100101 Firefox/102.0'
def
test_resize_window
(
self
):
...
...
@@ -426,7 +426,8 @@ class TestFirefox115(
SeleniumServerTestCase
,
ImageComparisonTestCase
,
):
desired_capabilities
=
dict
(
DesiredCapabilities
.
FIREFOX
,
version
=
'115.3.1esr'
)
desired_capabilities
=
dict
(
webdriver
.
FirefoxOptions
().
to_capabilities
(),
version
=
'115.3.1esr'
)
user_agent
=
'Gecko/20100101 Firefox/115.0'
def
test_resize_window
(
self
):
...
...
@@ -438,7 +439,8 @@ class TestChrome91(
SeleniumServerTestCase
,
ImageComparisonTestCase
,
):
desired_capabilities
=
dict
(
DesiredCapabilities
.
CHROME
,
version
=
'91.0.4472.114'
)
desired_capabilities
=
dict
(
webdriver
.
ChromeOptions
().
to_capabilities
(),
version
=
'91.0.4472.114'
)
user_agent
=
'Chrome/91.0.4472.0'
...
...
@@ -447,5 +449,6 @@ class TestChrome120(
SeleniumServerTestCase
,
ImageComparisonTestCase
,
):
desired_capabilities
=
dict
(
DesiredCapabilities
.
CHROME
,
version
=
'120.0.6099.109'
)
desired_capabilities
=
dict
(
webdriver
.
ChromeOptions
().
to_capabilities
(),
version
=
'120.0.6099.109'
)
user_agent
=
'Chrome/120.0.0.0'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment