I’ve been wrangling Appium for the better part of the past two days, and I still can’t get it to work! No tutorials seem to adress my issue. I have successfuly run Appium Desktop, from which I exported basic code like this:
const wdio = require('webdriverio'); const caps = {"platformName":"android", "platformVersion":"8.0", "deviceName":"Nexus_6_API_26_2", "automationName":"UiAutomator2", "app":"path/to/my/apk"}; const driver = wdio.remote({ protocol: "http", host: "127.0.0.1", port: 4723, path: "/wd/hub", capabilities: caps }); driver.init() .element("/some/xpath") .setValue("Hello World!") .end();
When I run this code with node, all I get is “driver.init is not a function”. What is happening?
I am on
Ubuntu 16.04
node 10.12.0
java 1.8.0_201
adb 1.0.36
Android studio 3.2.1