Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
6321e40e
Unverified
Commit
6321e40e
authored
Sep 24, 2020
by
Bryce Taylor
Committed by
GitHub
Sep 24, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4420 from BryceLTaylor/pin-remote-chrome
Pin chrome version for saucelabs to chromedriver version
parents
add1dd25
2e79da8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
test/integration/selenium-helpers.js
test/integration/selenium-helpers.js
+12
-1
No files found.
test/integration/selenium-helpers.js
View file @
6321e40e
const
webdriver
=
require
(
'
selenium-webdriver
'
);
const
webdriver
=
require
(
'
selenium-webdriver
'
);
const
bindAll
=
require
(
'
lodash.bindall
'
);
const
bindAll
=
require
(
'
lodash.bindall
'
);
require
(
'
chromedriver
'
);
require
(
'
chromedriver
'
);
const
chromedriverVersion
=
require
(
'
chromedriver
'
).
version
;
const
headless
=
process
.
env
.
SMOKE_HEADLESS
||
false
;
const
headless
=
process
.
env
.
SMOKE_HEADLESS
||
false
;
const
remote
=
process
.
env
.
SMOKE_REMOTE
||
false
;
const
remote
=
process
.
env
.
SMOKE_REMOTE
||
false
;
...
@@ -62,13 +63,23 @@ class SeleniumHelper {
...
@@ -62,13 +63,23 @@ class SeleniumHelper {
return
driver
;
return
driver
;
}
}
getChromeVersionNumber
()
{
const
versionFinder
=
/
\d
+
\.\d
+/
;
const
versionArray
=
versionFinder
.
exec
(
chromedriverVersion
);
if
(
versionArray
===
null
)
{
throw
new
Error
(
'
couldn
\'
t find version of chromedriver
'
);
}
return
versionArray
[
0
];
}
getSauceDriver
(
username
,
accessKey
,
name
)
{
getSauceDriver
(
username
,
accessKey
,
name
)
{
const
chromeVersion
=
this
.
getChromeVersionNumber
();
// Driver configs can be generated with the Sauce Platform Configurator
// Driver configs can be generated with the Sauce Platform Configurator
// https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
// https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
let
driverConfig
=
{
let
driverConfig
=
{
browserName
:
'
chrome
'
,
browserName
:
'
chrome
'
,
platform
:
'
macOS 10.14
'
,
platform
:
'
macOS 10.14
'
,
version
:
'
84.0
'
version
:
chromeVersion
};
};
var
driver
=
new
webdriver
.
Builder
()
var
driver
=
new
webdriver
.
Builder
()
.
withCapabilities
({
.
withCapabilities
({
...
...
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