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
ebc54bb1
Commit
ebc54bb1
authored
Sep 23, 2020
by
BryceLTaylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get chromedriver version from the package
parent
8d5b1395
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
test/integration/selenium-helpers.js
test/integration/selenium-helpers.js
+4
-2
No files found.
test/integration/selenium-helpers.js
View file @
ebc54bb1
const
webdriver
=
require
(
'
selenium-webdriver
'
);
const
webdriver
=
require
(
'
selenium-webdriver
'
);
const
bindAll
=
require
(
'
lodash.bindall
'
);
const
bindAll
=
require
(
'
lodash.bindall
'
);
require
(
'
chromedriver
'
);
require
(
'
chromedriver
'
);
let
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
;
...
@@ -8,7 +9,6 @@ const ci = process.env.CI || false;
...
@@ -8,7 +9,6 @@ const ci = process.env.CI || false;
const
buildID
=
process
.
env
.
TRAVIS_BUILD_NUMBER
;
const
buildID
=
process
.
env
.
TRAVIS_BUILD_NUMBER
;
const
{
SAUCE_USERNAME
,
SAUCE_ACCESS_KEY
}
=
process
.
env
;
const
{
SAUCE_USERNAME
,
SAUCE_ACCESS_KEY
}
=
process
.
env
;
const
{
By
,
Key
,
until
}
=
webdriver
;
const
{
By
,
Key
,
until
}
=
webdriver
;
const
pkg
=
require
(
'
../../package.json
'
);
const
DEFAULT_TIMEOUT_MILLISECONDS
=
20
*
1000
;
const
DEFAULT_TIMEOUT_MILLISECONDS
=
20
*
1000
;
...
@@ -64,9 +64,11 @@ class SeleniumHelper {
...
@@ -64,9 +64,11 @@ class SeleniumHelper {
}
}
getChromeVersionNumber
()
{
getChromeVersionNumber
()
{
let
chromedriverVersion
=
pkg
.
devDependencies
.
chromedriver
;
let
versionFinder
=
/
\d
+
\.\d
+/
;
let
versionFinder
=
/
\d
+
\.\d
+/
;
let
versionArray
=
versionFinder
.
exec
(
chromedriverVersion
);
let
versionArray
=
versionFinder
.
exec
(
chromedriverVersion
);
if
(
versionArray
===
null
)
{
throw
new
Error
(
'
couldn
\'
t find version of chromedriver
'
);
}
return
versionArray
[
0
];
return
versionArray
[
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