微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Xamarin UITest REPL 树“无法连接”

如何解决Xamarin UITest REPL 树“无法连接”

我有一个带有 UITests 的 Xamarin Android 应用程序。这些测试对我团队的其他成员运行良好,但对我来说总是失败。我收到这条消息:

System.Exception : Error while performing Query(Marked("edtLogin"))
      ----> System.Net.Http.HttpRequestException : An error occurred while sending the request.
      ----> System.Net.WebException : Unable to connect to the Remote Server
      ----> System.Net.sockets.socketException : No connection Could be made because the target machine actively refused it 127.0.0.1:60757

如果我在此之前尝试做一个 repl 树,我会得到同样的错误。我在硬件上运行(没有模拟器)。在 2 台设备上尝试了相同的结果(Zebra TC75 和三星 S9+)

编辑: 日志到此结束

18-05-2021 10:25:45.355 -04:00 - 124748 - HTTP POST { Url: { AbsolutePath: "/map",AbsoluteUri: "http://127.0.0.1:60757/map",LocalPath: "/map",Authority: "127.0.0.1:60757",HostNameType: IPv4,IsDefaultPort: False,IsFile: False,IsLoopback: True,PathAndQuery: "/map",Segments: [ "/","map" ],IsUnc: False,Host: "127.0.0.1",Port: 60757,Query: "",Fragment: "",Scheme: "http",OriginalString: "http://127.0.0.1:60757/map",DnsSafeHost: "127.0.0.1",IdnHost: "127.0.0.1",IsAbsoluteUri: True,UserEscaped: False,UserInfo: "" } }
18-05-2021 10:25:45.475 -04:00 - 124868 - POST Complete { StatusCode: OK,StatusDescription: "OK ",ResponseHeaders: "Date: Mon,17 May 2021 14:25:03 GMT
",Contents: "{"results":[{"class":"androidx.appcompat.widget.AppCompatEditText","tag":null,"description":"androidx.appcompat.widget.AppCompatEditText{977d47b VFED..CL. .F...... 0,0-536,91 #7f0e0529 app:id/edtLogin}","id":"edtLogin","text":"","visible":true,"rect":{"height":91,"width":536,"y":609,"x":92,"center_x":360,"center_y":654},"enabled":true,"contentDescription":null}],"outcome":"SUCCESS"}" }
18-05-2021 10:25:45.477 -04:00 - 124870 - HTTP POST { Url: { AbsolutePath: "/map",UserInfo: "" } }
18-05-2021 10:25:45.585 -04:00 - 124977 - POST Complete { StatusCode: OK,"outcome":"SUCCESS"}" }
18-05-2021 10:25:45.737 -04:00 - 125129 - Using element matching Id("edtLogin").
18-05-2021 10:25:45.737 -04:00 - 125129 - Tapping coordinates [ 360,654 ].
18-05-2021 10:25:45.738 -04:00 - 125130 - HTTP POST { Url: { AbsolutePath: "/",AbsoluteUri: "http://127.0.0.1:60757/",LocalPath: "/",PathAndQuery: "/",Segments: [ "/" ],OriginalString: "http://127.0.0.1:60757/",UserInfo: "" } }
18-05-2021 10:25:46.408 -04:00 - 125800 - POST Complete { StatusCode: OK,17 May 2021 14:25:04 GMT
",Contents: "{"bonusinformation":[],"message":"","success":true}" }
18-05-2021 10:25:46.416 -04:00 - 125809 - Potential Android SDK location: C:\Program Files (x86)\Android\android-sdk - Valid SDK. [ Source: ANDROID_HOME ]
18-05-2021 10:25:46.417 -04:00 - 125809 - Using Android SDK: C:\Program Files (x86)\Android\android-sdk
18-05-2021 10:26:06.612 -04:00 - 146004 - HTTP POST { Url: { AbsolutePath: "/map",UserInfo: "" } }
18-05-2021 10:26:10.724 -04:00 - 150116 - HTTP POST { Url: { AbsolutePath: "/map",UserInfo: "" } }
18-05-2021 10:26:12.772 -04:00 - 152164 - Error while performing Query(Marked("edtLogin"))
Exception: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the Remote Server ---> System.Net.sockets.socketException: No connection Could be made because the target machine actively refused it 127.0.0.1:60757
   at System.Net.sockets.socket.InternalEndConnect(IAsyncResult asyncResult)
   at System.Net.sockets.socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,Socket s4,Socket s6,Socket& socket,IPAddress& address,ConnectSocketState state,IAsyncResult asyncResult,Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult,TransportContext& context)
   at System.Net.Http.httpclienthandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at Xamarin.UITest.Shared.Http.HttpClient.SendData(String endpoint,String method,HttpContent content,ExceptionPolicy exceptionPolicy,Nullable`1 timeOut)
   at Xamarin.UITest.Shared.Http.HttpClient.Post(String endpoint,String arguments,Nullable`1 timeOut)
   at Xamarin.UITest.Android.AndroidGestures.Query[T](ITokenContainer query,Object[] args,String methodName)
   at Xamarin.UITest.Android.AndroidGestures.Query(AppQuery query)
   at Xamarin.UITest.Android.AndroidApp.<>c__displayClass12_0.<Query>b__0()
   at Xamarin.UITest.Utils.ErrorReporting.With[T](Func`1 func,String memberName)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?