electricbubble / gwda Goto Github PK
View Code? Open in Web Editor NEWWebDriverAgent ( iOS ) Client Library in Golang
License: MIT License
WebDriverAgent ( iOS ) Client Library in Golang
License: MIT License
开启抖音,跑测试的时候程序卡死了,抖音也卡死了
版本:
- webdriveragent-xcode_12.3.zip
v2.32.2
- github.com/electricbubble/gwda
v0.1.1
- iOS
13.4.1
bs, err := driver.Screenshot()
session, _ := driver.ActiveSession()
t.Log(session.SessionId)
if nil != err {
t.Error("screenshot", err)
} else {
// dst := base64.StdEncoding.EncodeToString(bs.Bytes())
// t.Log(dst)
img, format, err := image.Decode(bs)
if nil != err {
t.Error("decode", err) // image: unknown format <===
} else {
t.Log(bs.Len(), img, format)
}
}
经浏览器直接请求截图看到,返回的图片 base64 是带有 \r\n
换行符的,是否因这个问题解析失败呢?
如下图所示:
请问有支持安卓手机的版本吗?
I found this code in NewUSBDriver
if wd.urlPrefix, err = url.Parse("http://" + dev.serialNumber); err != nil {
return nil, err
}
but why http://xxxxxx
can work in code?
With the info example i get the following error:
2021/07/16 18:44:36 create connection: usbmux receive: connection refused
exit status 1
并且只要出现一次这个错误,接下来短时间内大概率还会出现多次。
然后过一会儿,又自己恢复了
不想连数据线
使用这个gwda给视频点赞(或者点关注),会掉赞(掉关注),可能的原因有哪些,流程肯定没问题,我在担心是不是gwda这个东西被抖音标记了
如果多个设备连接到pc,怎么去识别多个设备呢?
您好,一台Mac上有4台手机,通过usb连接,如何指定某个手机进行连接,请问是不是需要我修改代码,因为gwda.NewUSBDriver(nil)方法中的device参数没有公共成员。
我的代码是这样的
driver, err := gwda.NewUSBDriver(nil)
if err != nil {
log.Fatalln(err)
}
log.Println(driver.IsWdaHealthy())
但运行时报了个这个错
src/github.com/electricbubble/gidevice/pkg/ipa/ipa.go:35:17: undefined: io.ReadAll
测试了 其他的指令都能用 点击不能用
func main() {
driver, _ := gwda.NewUSBDriver(nil)
x, y := 50, 256
driver.Tap(x, y)
}
报错:
2024/03/10 20:35:58 unknown command: Unhandled endpoint: /session/320F2B62-A685-4848-B6CF-C2AFE4542E1E/wda/tap/0 -- http://00008101-0016191811C2001E/ with parameters {
wildcards = (
"session/320F2B62-A685-4848-B6CF-C2AFE4542E1E/wda/tap/0"
);
}
driver, _ := gwda.NewUSBDriver(nil)
传参中 如何指定某一台设备
$ go get -v github.com/ElectricBubble/gwda
go: finding github.com/ElectricBubble/gwda latest
go: downloading github.com/ElectricBubble/gwda v0.0.0-20200511015801-0e9736d3712a
go: extracting github.com/ElectricBubble/gwda v0.0.0-20200511015801-0e9736d3712a
go get: github.com/ElectricBubble/[email protected]: parsing go.mod:
module declares its path as: github.com/electricbubble/gwda
but was required as: github.com/ElectricBubble/gwda
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.