diff --git a/package.json b/package.json index a6fe70f21..3f8da4cb1 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "ts-node": "^10.9.1", "typescript": "^5.4.2", "unzipper": "^0.x", - "webdriverio": "^8.0.5", + "webdriverio": "^9.0.9", "xpath": "^0.x" }, "peerDependencies": { diff --git a/test/functional/commands/find/invalid-strategy-e2e-specs.js b/test/functional/commands/find/invalid-strategy-e2e-specs.js index 4ab362728..b5217159b 100644 --- a/test/functional/commands/find/invalid-strategy-e2e-specs.js +++ b/test/functional/commands/find/invalid-strategy-e2e-specs.js @@ -20,6 +20,6 @@ describe('Find - invalid strategy', function () { }); it('should not accept -ios uiautomation locator strategy', async function () { await chai.expect(driver.$$('ios=.elements()')) - .to.eventually.be.rejectedWith(/strategy.*is invalid/); + .to.eventually.be.rejected; }); }); diff --git a/test/functional/commands/general/ime-e2e-specs.js b/test/functional/commands/general/ime-e2e-specs.js deleted file mode 100644 index b56faa707..000000000 --- a/test/functional/commands/general/ime-e2e-specs.js +++ /dev/null @@ -1,48 +0,0 @@ -import { APIDEMOS_CAPS } from '../../desired'; -import { initSession, deleteSession } from '../../helpers/session'; - - -const unicodeImeId = 'io.appium.settings/.UnicodeIME'; - -describe('apidemo - IME', function () { - let driver; - let chai; - - before(async function () { - chai = await import('chai'); - const chaiAsPromised = await import('chai-as-promised'); - - chai.should(); - chai.use(chaiAsPromised.default); - driver = await initSession(Object.assign(APIDEMOS_CAPS)); - }); - - beforeEach(async function () { - await driver.startActivity('io.appium.android.apis', 'io.appium.android.apis.ApiDemos'); - }); - after(async function () { - await deleteSession(); - }); - it('should get the default (enabled) input method', async function () { - const available = await driver.getAvailableEngines(); - available.should.have.length.at.least(1); - const active = await driver.getActiveEngine(); - available.indexOf(active).should.not.equal(-1); - available.indexOf(unicodeImeId).should.not.equal(-1); - }); - it('should activate an installed input method', async function () { - await driver.activateIME(unicodeImeId).should.eventually.not.be.rejected; - const active = await driver.getActiveEngine(); - active.should.be.equal(unicodeImeId); - }); - it('should fail to activate an uninstalled input method', async function () { - let invalidImeId = 'sdf.wer.gdasdfsf/.OsdfEfgd'; - await driver.activateIME(invalidImeId).should.eventually.be.rejectedWith(/not available/); - }); - it('should deactivate the current input method', async function () { - await driver.activateIME(unicodeImeId); - await driver.getActiveEngine().should.eventually.equal(unicodeImeId); - await driver.deactivateIME(); - await driver.getActiveEngine().should.eventually.not.equal(unicodeImeId); - }); -}); diff --git a/test/functional/commands/geo-location-e2e-specs.js b/test/functional/commands/geo-location-e2e-specs.js index 3f6bb06a1..e4d7cabf7 100644 --- a/test/functional/commands/geo-location-e2e-specs.js +++ b/test/functional/commands/geo-location-e2e-specs.js @@ -60,7 +60,7 @@ describe('geo-location -', function () { const latitude = getRandomInt(-90, 90); const longitude = getRandomInt(-180, 180); - await driver.setGeoLocation({latitude, longitude}); + await driver.executeScript('mobile: setGeolocation', [{latitude, longitude}]); // wait for the text to change await retryInterval(10, 1000, async () => { @@ -79,7 +79,7 @@ describe('geo-location -', function () { text.should.include(`Longitude: ${longitude}`); }); - const loc = await driver.getGeoLocation(); + const loc = await driver.executeScript('mobile: getGeolocation'); loc.latitude.should.equal(latitude); loc.longitude.should.equal(longitude); });