Skip to content

Commit

Permalink
fix: ios sift bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Mar 17, 2023
1 parent 88962fa commit 45fa0ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM sonicorg/sonic-agent-linux-base:v1.0.1
FROM sonicorg/sonic-agent-linux-base:v1.0.2

ADD /mini /root/mini
ADD /plugins /root/plugins
ADD /src/main/docker/config /root/config
ADD /target/sonic-agent-linux-x86_64.jar /root
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENTRYPOINT ["/root/jdk-15.0.2+7/bin/java","-server","-Dfile.encoding=utf-8","-XX:-UseGCOverheadLimit","-XX:+DisableExplicitGC","-XX:SurvivorRatio=1","-XX:LargePageSizeInBytes=128M","-XX:SoftRefLRUPolicyMSPerMB=0","-Djava.security.egd=file:/dev/./urandom","--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED","-jar","sonic-agent-linux-x86_64.jar"]
ENTRYPOINT ["/root/jdk-17+20/bin/java","-server","-Dfile.encoding=utf-8","-XX:-UseGCOverheadLimit","-XX:+DisableExplicitGC","-XX:SurvivorRatio=1","-XX:LargePageSizeInBytes=128M","-XX:SoftRefLRUPolicyMSPerMB=0","-Djava.security.egd=file:/dev/./urandom","--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED","-jar","sonic-agent-linux-x86_64.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,17 @@ public void clickByImg(HandleContext handleContext, String des, String pathValue
}
if (findResult != null) {
try {
iosDriver.tap(findResult.getX(), findResult.getY());
String[] size = SibTool.getSize(udId).split("x");
WindowSize windowSize = iosDriver.getWindowSize();
int width;
int ori = SibTool.getOrientation(udId);
if (ori == 1 || ori == 2) {
width = windowSize.getWidth();
} else {
width = windowSize.getHeight();
}
iosDriver.tap(findResult.getX() / (Integer.parseInt(size[0]) / width),
findResult.getY() / (Integer.parseInt(size[0]) / width));
} catch (Exception e) {
log.sendStepLog(StepType.ERROR, "点击" + des + "失败!", "");
handleContext.setE(e);
Expand Down

0 comments on commit 45fa0ad

Please sign in to comment.