Coder Social home page Coder Social logo

soniccloudorg / sonic-driver-core Goto Github PK

View Code? Open in Web Editor NEW
146.0 5.0 51.0 439 KB

🎉The Sonic UIAutomation Driver Core. Sonic UI自动化Driver核心。

Home Page: https://sonic-cloud.cn/sdc

License: Apache License 2.0

Java 100.00%
java uiautomator2 wda webdriver automaton webdriveragent wda-java-client

sonic-driver-core's People

Contributors

aoliaoaoaojiao avatar caofengbin avatar dependabot[bot] avatar fossabot avatar github-actions[bot] avatar huang1988519 avatar web-flow avatar yaming116 avatar yeunghoichiu avatar zhouyixun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sonic-driver-core's Issues

[Feature] 缺少长按不松手、拖拽元素到指定位置等相关操作

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

v2.6.4

Deploy platform

Linux centos 7

Minimal reproduce step

需求背景

  • 因为我们主营业务是小程序,做小程序测试时测试不同业务场景需要删除最近使用小程序以清除应用缓存
  • 另外有一些使用场景可能需要长按之后才会显示拖动的终点元素,所以也需要长按不松手的操作

uia2-server的api提供了这些接口

// 拖拽,不同于普通滑动
register(postHandler, new Drag("/session/:sessionId/touch/drag"));
// 长按,没有时间限制
register(postHandler, new TouchDown("/session/:sessionId/touch/down"));
// 松手
register(postHandler, new TouchUp("/session/:sessionId/touch/up"));
//  类似手指移动到指定目标,与上两个操作配合起来也可以实现长按拖拽操作
register(postHandler, new TouchMove("/session/:sessionId/touch/move"));

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!

[Bug]

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

本地使用2.4.2,使用最新的2.6版本也有同样问题

Deploy platform

Linux

Minimal reproduce step

  1. cocos-lua 在已接入SDK的情况下,提示“获取控件失败”,在airtest中能获取正常控件树
  2. agent日志显示
at org.cloud.sonic.driver.poco.service.impl.SocketClientImpl.sendAndReceive(SocketClientImpl.java:84)
at org.cloud.sonic.driver.poco.service.impl.PocoClientImpl.pageSourceForJsonString(PocoClientImpl.java:104)
at org.cloud.sonic.driver.poco.PocoDriver.getPageSourceForJsonString(PocoDriver.java:95)
at org.cloud.sonic.agent.websockets.AndroidWSServer.lambda$onMessage$1(AndroidWSServer.java:252)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
[sonic-driver-core] 2023-06-25 15:35:47 [INFO] poco socket closed.
[sonic-driver-core] 2023-06-25 15:35:47 [INFO] poco input stream closed.
[sonic-driver-core] 2023-06-25 15:35:47 [INFO] poco output stream closed.

image

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!

[Bug] 安卓「华为、OPPO」获取控件元素报错

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

sonic-agent & sonic-server & sonic-web version:V2.6.4
sonic-driver-core version:V1.1.29

Deploy platform

mac book pro本地运行SonicWeb、SonicServer、SonicAgent,系统版本:Sonoma V14.4.1

Minimal reproduce step

本地运行SonicWeb、SonicServer、SonicAgent三个服务,连接华为 or OPPO手机,获取可以连接成功,但是在获取控件元素后,报以下异常「小米手机正常」,我也在尝试解决修复,但是进度可能稍慢,还请大佬们帮忙看一下!

image
image

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!

[Bug] 滑动页面出现异常 /wda/touch/multi/perform 方法不可用 org.cloud.sonic.driver.common.tool.SonicRespException: Unhandled endpoint:

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

2.6.4

Deploy platform

macbookpro m1

Minimal reproduce step

从屏幕中间滑动页面出现异常

异常信息: org.cloud.sonic.driver.common.tool.SonicRespException: Unhandled endpoint: /session/7A696A6C-7E8C-4BB0-A626-035EC29DDBFE/wda/touch/multi/perform -- http://127.0.0.1:634/ with parameters {
wildcards = (
"session/7A696A6C-718XC-4BB0-A626-025EC19DEBFA/wda/touch/multi/perform"
);
}

查了下找到了这个 mr
看起来是不支持这个方法了
appium/WebDriverAgent#847

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!

[Bug] UiAutomation not connected

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

v2.6.3

Deploy platform

mac

Minimal reproduce step

io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[sonic-driver-core] 2024-01-17 13:00:28 [ERROR] start session failed.
[sonic-driver-core] 2024-01-17 13:00:28 [ERROR] cause: ErrorMsg(error=session not created, message=java.lang.IllegalStateException: UiAutomation not connected, UiAutomation@2853e6f[id=-1, flags=0], traceback=io.appium.uiautomator2.common.exceptions.SessionNotCreatedException: java.lang.IllegalStateException: UiAutomation not connected, UiAutomation@2853e6f[id=-1, flags=0]
	at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:60)
	at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)
	at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:267)
	at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:261)
	at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
	at java.lang.Thread.run(Thread.java:930)
Caused by: java.lang.IllegalStateException: UiAutomation not connected, UiAutomation@2853e6f[id=-1, flags=0]
	at android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:1518)
	at android.app.UiAutomation.setOnAccessibilityEventListener(UiAutomation.java:445)
	at androidx.test.uiautomator.QueryController.<init>(QueryController.java:95)
	at androidx.test.uiautomator.UiDevice.<init>(UiDevice.java:109)
	at androidx.test.uiautomator.UiDevice.getInstance(UiDevice.java:261)
	at io.appium.uiautomator2.utils.Device.getUiDevice(Device.java:34)
	at io.appium.uiautomator2.core.UiAutomatorBridge.getUiAutomation(UiAutomatorBridge.java:53)
	at io.appium.uiautomator2.core.UiAutomation.<init>(UiAutomation.java:32)
	at io.appium.uiautomator2.core.UiAutomation.getInstance(UiAutomation.java:37)
	at io.appium.uiautomator2.model.NotificationListener.<init>(NotificationListener.java:43)
	at io.appium.uiautomator2.model.NotificationListener.getInstance(NotificationListener.java:48)
	at io.appium.uiautomator2.model.settings.EnableNotificationListener.getValue(EnableNotificationListener.java:31)
	at io.appium.uiautomator2.model.settings.EnableNotificationListener.getValue(EnableNotificationListener.java:21)
	at io.appium.uiautomator2.model.settings.AbstractSetting.reset(AbstractSetting.java:57)
	at io.appium.uiautomator2.model.settings.Settings.resetForNewSession(Settings.java:71)
	at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:52)
	... 34 more
)

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.