Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Aniona
java-client
提交
50557a4d
J
java-client
项目概览
Aniona
/
java-client
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
java-client
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
50557a4d
编写于
11月 23, 2017
作者:
S
Sergey Tikhomirov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#102 FIX
上级
c60cadcb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
41 deletion
+10
-41
src/main/java/io/appium/java_client/MissingParameterException.java
...java/io/appium/java_client/MissingParameterException.java
+0
-31
src/main/java/io/appium/java_client/MultiTouchAction.java
src/main/java/io/appium/java_client/MultiTouchAction.java
+10
-10
未找到文件。
src/main/java/io/appium/java_client/MissingParameterException.java
已删除
100644 → 0
浏览文件 @
c60cadcb
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
io.appium.java_client
;
public
class
MissingParameterException
extends
IllegalArgumentException
{
private
static
final
long
serialVersionUID
=
1L
;
public
MissingParameterException
(
String
reason
)
{
super
(
reason
);
}
public
MissingParameterException
(
String
reason
,
Throwable
cause
)
{
super
(
reason
,
cause
);
}
}
src/main/java/io/appium/java_client/MultiTouchAction.java
浏览文件 @
50557a4d
...
...
@@ -16,10 +16,13 @@
package
io.appium.java_client
;
import
static
com
.
google
.
common
.
base
.
Preconditions
.
checkArgument
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableMap
;
import
java.util.List
;
/**
* Used for Webdriver 3 multi-touch gestures
* See the Webriver 3 spec https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html
...
...
@@ -62,16 +65,14 @@ public class MultiTouchAction implements PerformsActions<MultiTouchAction> {
* Perform the multi-touch action on the mobile performsTouchActions.
*/
public
MultiTouchAction
perform
()
{
int
size
=
actions
.
build
().
size
();
if
(
size
>
1
)
{
List
<
TouchAction
>
touchActions
=
actions
.
build
();
checkArgument
(
touchActions
.
size
()
>
0
,
"MultiTouch action must have at least one TouchAction added before it can be performed"
);
if
(
touchActions
.
size
()
>
1
)
{
performsTouchActions
.
performMultiTouchAction
(
this
);
}
else
if
(
size
==
1
)
{
}
else
{
//android doesn't like having multi-touch actions with only a single TouchAction...
performsTouchActions
.
performTouchAction
(
actions
.
build
().
get
(
0
));
}
else
{
throw
new
MissingParameterException
(
"MultiTouch action must have at least one TouchAction "
+
"added before it can be performed"
);
}
return
this
;
}
...
...
@@ -80,9 +81,8 @@ public class MultiTouchAction implements PerformsActions<MultiTouchAction> {
ImmutableList
.
Builder
<
Object
>
listOfActionChains
=
ImmutableList
.
builder
();
ImmutableList
<
TouchAction
>
touchActions
=
actions
.
build
();
touchActions
.
forEach
(
action
->
{
listOfActionChains
.
add
(
action
.
getParameters
().
get
(
"actions"
));
});
touchActions
.
forEach
(
action
->
listOfActionChains
.
add
(
action
.
getParameters
().
get
(
"actions"
)));
return
ImmutableMap
.
of
(
"actions"
,
listOfActionChains
.
build
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录