{"id":13494355,"url":"https://github.com/electricbubble/gwda","last_synced_at":"2025-04-06T02:08:55.157Z","repository":{"id":39782687,"uuid":"227794646","full_name":"electricbubble/gwda","owner":"electricbubble","description":"WebDriverAgent ( iOS ) Client Library in Golang","archived":false,"fork":false,"pushed_at":"2023-08-06T11:57:42.000Z","size":270,"stargazers_count":310,"open_issues_count":8,"forks_count":39,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-30T00:09:53.708Z","etag":null,"topics":["appium-ios","appium-webdriveragent","facebook-wda","golang","ios","iphone","wda","webdriveragent"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electricbubble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-13T08:41:48.000Z","updated_at":"2025-03-16T15:06:25.000Z","dependencies_parsed_at":"2024-01-16T09:01:37.996Z","dependency_job_id":null,"html_url":"https://github.com/electricbubble/gwda","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbubble%2Fgwda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbubble%2Fgwda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbubble%2Fgwda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbubble%2Fgwda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electricbubble","download_url":"https://codeload.github.com/electricbubble/gwda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appium-ios","appium-webdriveragent","facebook-wda","golang","ios","iphone","wda","webdriveragent"],"created_at":"2024-07-31T19:01:24.235Z","updated_at":"2025-04-06T02:08:55.136Z","avatar_url":"https://github.com/electricbubble.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Golang-WDA\n\n[![go doc](https://godoc.org/github.com/electricbubble/gwda?status.svg)](https://pkg.go.dev/github.com/electricbubble/gwda?tab=doc#pkg-index)\n[![go report](https://goreportcard.com/badge/github.com/electricbubble/gwda)](https://goreportcard.com/report/github.com/electricbubble/gwda)\n[![license](https://img.shields.io/github/license/electricbubble/gwda)](https://github.com/electricbubble/gwda/blob/master/LICENSE)\n\n[appium/WebDriverAgent](https://github.com/appium/WebDriverAgent) Client Library in Golang\n\n\u003e `Android` can use [electricbubble/guia2](https://github.com/electricbubble/guia2)\n\nEnglish | [🇨🇳中文](README_CN.md)\n\n## Installation\n\n\u003e First, install WebDriverAgent for iOS devices\n\n```shell script\ngo get github.com/electricbubble/gwda\n```\n\n## QuickStart\n\n#### [Connection Device](examples/connect/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n\t\"log\"\n)\n\nfunc main() {\n\t// var urlPrefix = \"http://localhost:8100\"\n\t// The function may also require 'iproxy 8100 8100' to forward the device port first\n\t// driver, _ := gwda.NewDriver(nil, urlPrefix)\n\n\t// Connect devices via USB\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tlog.Println(driver.IsWdaHealthy())\n}\n\n```\n\n#### [Touch](examples/touch/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tx, y := 50, 256\n\n\tdriver.Tap(x, y)\n\n\tdriver.DoubleTap(x, y)\n\n\tdriver.TouchAndHold(x, y)\n\n\tfromX, fromY, toX, toY := 50, 256, 100, 256\n\n\tdriver.Drag(fromX, fromY, toX, toY)\n\n\tdriver.Swipe(fromX, fromY, toX, toY)\n\n\t// requires hardware support: 3D Touch \n\t// driver.ForceTouch(x, y, 0.8)\n}\n\n```\n\n\u003e [AssistiveTouch](examples/touch/main.go) `driver.PerformW3CActions` `driver.PerformAppiumTouchActions`\n\n#### [App Actions](examples/app/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tvar bundleId = \"com.apple.Preferences\"\n\n\tdriver.AppLaunchUnattached(bundleId)\n\n\tdriver.AppDeactivate(2)\n\n\tdriver.AppTerminate(bundleId)\n\n\tdriver.AppActivate(bundleId)\n\n\t// Resets the 📷 camera authorization status of the current application\n\t// driver.AppAuthReset(gwda.ProtectedResourceCamera)\n}\n\n```\n\n#### [Keyboard](examples/keyboard/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tdriver.SendKeys(\"hello\")\n}\n\n```\n\n\u003e [specified element](examples/keyboard/main.go) `element.SendKeys`\n\n#### [Siri](examples/siri/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tdriver.SiriActivate(\"What's the weather like today\")\n}\n\n```\n\n#### [Alert](examples/alert/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n\t\"log\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\ttext, _ := driver.AlertText()\n\tlog.Println(text)\n\n\talertButtons, _ := driver.AlertButtons()\n\tlog.Println(alertButtons)\n\n\tdriver.AlertAccept()\n\t// driver.AlertDismiss()\n\n\t// driver.SendKeys(\"ah\")\n}\n\n```\n\n#### [Device information](examples/info/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n\t\"log\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tdeviceInfo, _ := driver.DeviceInfo()\n\tlog.Println(deviceInfo.Name)\n\n\tbatteryInfo, _ := driver.BatteryInfo()\n\tlog.Println(batteryInfo.State)\n\n\twindowSize, _ := driver.WindowSize()\n\tlog.Println(windowSize)\n\n\tlocation, err := driver.Location()\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\tlog.Println(location)\n\n\t// screen, _ := driver.Screen()\n\t// log.Println(screen)\n}\n\n```\n\n#### [Hardware button](examples/button/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\t// driver.Homescreen()\n\n\tdriver.PressButton(gwda.DeviceButtonHome)\n\tdriver.PressButton(gwda.DeviceButtonVolumeUp)\n\tdriver.PressButton(gwda.DeviceButtonVolumeDown)\n}\n\n```\n\n#### [Screenshot](examples/screenshot/main.go)\n\n```go\npackage main\n\nimport (\n\t\"github.com/electricbubble/gwda\"\n\t\"image\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tscreenshot, _ := driver.Screenshot()\n\n\timg, format, _ := image.Decode(screenshot)\n\t_, _ = img, format\n}\n\n```\n\n#### [Debug](examples/debug/main.go)\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/electricbubble/gwda\"\n)\n\nfunc main() {\n\tdriver, _ := gwda.NewUSBDriver(nil)\n\n\tsource, _ := driver.Source()\n\tfmt.Println(source)\n\n\t// fmt.Println(driver.AccessibleSource())\n\n\t// gwda.SetDebug(true)\n}\n\n```\n\n## Extensions\n\n| |About|\n|---|---|\n|[electricbubble/gwda-ext-opencv](https://github.com/electricbubble/gwda-ext-opencv)|Operate with pictures|\n\n## Alternatives\n\n| |About|\n|---|---|\n|[openatx/facebook-wda](https://github.com/openatx/facebook-wda)|Facebook WebDriverAgent Python Client Library (not official)|\n\n## Thanks\n\nThank you [JetBrains](https://www.jetbrains.com/?from=gwda) for providing free open source licenses\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectricbubble%2Fgwda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectricbubble%2Fgwda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectricbubble%2Fgwda/lists"}