Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
8677d408
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8677d408
编写于
1月 07, 2019
作者:
D
ddavison
提交者:
Sanad Liaquat
1月 09, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dont pass extraneous chrome variables to other browsers
Extract remote_grid_credentials
上级
2620efaf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
10 deletion
+20
-10
qa/qa/runtime/browser.rb
qa/qa/runtime/browser.rb
+12
-9
qa/qa/runtime/env.rb
qa/qa/runtime/env.rb
+8
-1
未找到文件。
qa/qa/runtime/browser.rb
浏览文件 @
8677d408
...
...
@@ -57,18 +57,21 @@ module QA
# QA::Runtime::Env.browser.capitalize will work for every driver type except PhantomJS.
# We will have no use to use PhantomJS so this shouldn't be a problem.
options
=
Selenium
::
WebDriver
.
const_get
(
QA
::
Runtime
::
Env
.
browser
.
capitalize
)
::
Options
.
new
options
.
add_argument
(
"window-size=1240,1680"
)
# Chrome won't work properly in a Docker container in sandbox mod
e
options
.
add_argument
(
"no-sandbox
"
)
if
QA
::
Runtime
::
Env
.
browser
==
:chrom
e
options
.
add_argument
(
"window-size=1240,1680
"
)
# Run headless by default unless CHROME_HEADLESS is false
if
QA
::
Runtime
::
Env
.
chrome_headless?
options
.
add_argument
(
"headless"
)
# Chrome won't work properly in a Docker container in sandbox mode
options
.
add_argument
(
"no-sandbox"
)
# Chrome documentation says this flag is needed for now
# https://developers.google.com/web/updates/2017/04/headless-chrome#cli
options
.
add_argument
(
"disable-gpu"
)
# Run headless by default unless CHROME_HEADLESS is false
if
QA
::
Runtime
::
Env
.
chrome_headless?
options
.
add_argument
(
"headless"
)
# Chrome documentation says this flag is needed for now
# https://developers.google.com/web/updates/2017/04/headless-chrome#cli
options
.
add_argument
(
"disable-gpu"
)
end
end
# Use the same profile on QA runs if CHROME_REUSE_PROFILE is true.
...
...
qa/qa/runtime/env.rb
浏览文件 @
8677d408
...
...
@@ -62,7 +62,10 @@ module QA
# - "http://user:pass@somehost.com/wd/hub"
# - "https://user:pass@somehost.com:443/wd/hub"
# - "http://localhost:4444/wd/hub"
"
#{
remote_grid_protocol
}
://
#{
"
#{
remote_grid_username
}
:
#{
remote_grid_access_key
}
@"
if
remote_grid_username
}#{
ENV
[
'QA_REMOTE_GRID'
]
}
/wd/hub"
if
ENV
[
'QA_REMOTE_GRID'
]
return
unless
ENV
[
'QA_REMOTE_GRID'
]
"
#{
remote_grid_protocol
}
://
#{
remote_grid_credentials
}#{
ENV
[
'QA_REMOTE_GRID'
]
}
/wd/hub"
end
def
remote_grid_username
...
...
@@ -183,6 +186,10 @@ module QA
private
def
remote_grid_credentials
remote_grid_username
?
"
#{
remote_grid_username
}
:
#{
remote_grid_access_key
}
@"
:
''
end
def
enabled?
(
value
,
default:
true
)
return
default
if
value
.
nil?
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录