Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Documentation and examples for appium package #175

Open
chordabmx opened this issue Jan 14, 2019 · 3 comments
Open

Documentation and examples for appium package #175

chordabmx opened this issue Jan 14, 2019 · 3 comments

Comments

@chordabmx
Copy link

@abourget @sclevine Hello guys, first of all thanks for the great library! We are using agouti for Web automation and it works like a charm, so we've decided to use it for mobile automation as well. But unfortunately we've faced with same issue "failed to connect to WebDriver: failed to connect to WebDriver: failed to retrieve a session ID", Is there any sort of affordable documentation for appium package or get started example as for agouti?
line causing error is : err = device.InstallApp( "./installed-release.apk")
Code we are trying to run:


import (
	"fmt"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/sclevine/agouti"
	."github.com/sclevine/agouti/appium"

	"testing"
)

func TestAndroid(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Android")
}

var options = Desired(agouti.Capabilities{
"platformName":    "Android",
"platformVersion": "7.0",
"deviceName":      "TECNO SPARK CM",
"Debug":           true,
"automationName": "UiAutomator2",


})
var wd = New(options)


var _ = BeforeSuite(func() {
	err := wd.Start()
	device, err := wd.NewDevice()
	if err != nil {
		fmt.Println(err)
	}
	err = device.InstallApp( "./installed-release.apk")
	err = device.LaunchApp()
	if err != nil {
		fmt.Println(err)
	}

})

var _ = AfterSuite(func() {
         err = device.CloseApp()
	Expect(wd.Stop()).To(Succeed())
})
@chordabmx
Copy link
Author

@abourget @sclevine

polite bump

@sclevine
Copy link
Owner

@abourget contributed the appium integration and may be able to assist.

@mpermperpisang
Copy link

hi
i also read this one #72
this is my code and this is work
https://gist.github.com/mpermperpisang/dca9c6b6611092e9b04da0b316fc5545

maybe you can try it :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants