Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
2087dff9
Commit
2087dff9
authored
Sep 15, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
060cb34e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
software/seleniumrunner/test/test.py
software/seleniumrunner/test/test.py
+12
-12
No files found.
software/seleniumrunner/test/test.py
View file @
2087dff9
...
@@ -125,7 +125,7 @@ class BrowserCompatibilityMixin(WebServerMixin):
...
@@ -125,7 +125,7 @@ class BrowserCompatibilityMixin(WebServerMixin):
desired_capabilities
=
self
.
desired_capabilities
)
desired_capabilities
=
self
.
desired_capabilities
)
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
driver
.
close
()
self
.
driver
.
quit
()
super
(
BrowserCompatibilityMixin
,
self
).
tearDown
()
super
(
BrowserCompatibilityMixin
,
self
).
tearDown
()
def
test_user_agent
(
self
):
def
test_user_agent
(
self
):
...
@@ -173,7 +173,7 @@ class SeleniumServerTestCase(SlapOSInstanceTestCase):
...
@@ -173,7 +173,7 @@ class SeleniumServerTestCase(SlapOSInstanceTestCase):
return
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)),
)
return
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)),
)
class
TestBrowserSelection
(
SeleniumServerTestCase
,
WebServerMixin
):
class
TestBrowserSelection
(
WebServerMixin
,
SeleniumServerTestCase
):
def
test_firefox
(
self
):
def
test_firefox
(
self
):
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
webdriver_url
=
parameter_dict
[
'url'
]
webdriver_url
=
parameter_dict
[
'url'
]
...
@@ -236,17 +236,16 @@ class TestBrowserSelection(SeleniumServerTestCase, WebServerMixin):
...
@@ -236,17 +236,16 @@ class TestBrowserSelection(SeleniumServerTestCase, WebServerMixin):
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
webdriver_url
=
parameter_dict
[
'url'
]
webdriver_url
=
parameter_dict
[
'url'
]
return
queue
=
multiprocessing
.
Queue
()
queue
=
multiprocessing
.
Queue
()
def
_test
(
q
,
server_url
):
def
_test
(
q
,
server_url
):
driver
=
webdriver
.
Remote
(
driver
=
webdriver
.
Remote
(
command_executor
=
webdriver_url
,
command_executor
=
webdriver_url
,
desired_capabilities
=
DesiredCapabilities
.
FIREFOX
)
# XXX
# XXX we need to sleep a bit to wait for browser to be ready before using it, otherwise selenium crash
desired_capabilities
=
dict
(
DesiredCapabilities
.
FIREFOX
,
version
=
'52.9.0esr'
))
#DesiredCapabilities.FIREFOX)
sleep
(
2
)
try
:
driver
.
get
(
server_url
)
driver
.
get
(
server_url
)
q
.
put
(
driver
.
title
==
'Test page'
)
q
.
put
(
driver
.
title
==
'Test page'
)
finally
:
driver
.
quit
()
driver
.
quit
()
nb_workers
=
10
nb_workers
=
10
...
@@ -281,9 +280,10 @@ class TestChrome69(BrowserCompatibilityMixin, SeleniumServerTestCase):
...
@@ -281,9 +280,10 @@ class TestChrome69(BrowserCompatibilityMixin, SeleniumServerTestCase):
user_agent
=
'Chrome/69.0.3497.0'
user_agent
=
'Chrome/69.0.3497.0'
#del TestFirefox52
del
TestChrome69
del
TestFirefox52
del
TestFirefox60
del
TestFirefox60
del
TestBrowserSelection
#
del TestBrowserSelection
# more test:
# more test:
# XXX run ERP5 test !
# XXX run ERP5 test !
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