Skip to content

Commit

Permalink
Merge pull request #233 from SonicCloudOrg/dev
Browse files Browse the repository at this point in the history
修复获取控件快照失败的问题
  • Loading branch information
ZhouYixun authored Jul 1, 2022
2 parents 77ad74f + 1743b12 commit d4bc495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class UploadTools {
@Autowired
public void setRestTemplate(RestTemplate restTemplate) {
UploadTools.restTemplate = restTemplate;
baseUrl = "http://" + host + ":" + port + "/api/folder";
baseUrl = "http://" + host + ":" + port + "/server/api/folder".replace(":80/", "/");;
}

public static String upload(File uploadFile, String type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ public void onMessage(String message, Session session) {
result.put("img", UploadTools.upload(finalAndroidStepHandler.findEle("xpath", msg.getString("xpath")).getScreenshotAs(OutputType.FILE), "keepFiles"));
} catch (Exception e) {
result.put("errMsg", "获取元素截图失败!");
e.printStackTrace();
}
BytesTool.sendText(session, result.toJSONString());
});
Expand Down

0 comments on commit d4bc495

Please sign in to comment.