-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Bug 🐛good first picka reasonable task to start getting familiar with the code basea reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
2.0.0-beta.66
Node.js Version
19.8.1
Mode
Standalone Mode
Which capabilities are you using?
{
platformName: 'Android',
'appium:automationName': 'UiAutomator2',
'appium:appPackage': 'com.android.settings',
'appium:appActivity': '.Settings'
}What happened?
Using the above capabilities with TypeScript 5.0.2 results in the type error Type 'string' is not assignable to type 'WebdriverIO'. for each key of the capabilities. Removing the appium:appActivity key resolves this issue.
It appears that:
- the
appium:appActivitykey is not in the type(s) forcapabilities, and - the type(s) for
capabilities, for some reason, start to enforce a key type ofWebdriverIOif an unfamiliar key is present
What is your expected behavior?
There is no type error.
How to reproduce the bug.
Use the following code:
import type { RemoteOptions } from 'webdriverio';
import { remote } from "webdriverio";
const capabilities: RemoteOptions['capabilities'] = {
platformName: 'Android',
'appium:automationName': 'UiAutomator2',
'appium:appPackage': 'com.android.settings',
'appium:appActivity': '.Settings',
}
const remoteOpts: RemoteOptions = {
hostname: '0.0.0.0',
port: 4723,
capabilities,
}
const sampleTest = async () => {
const driver = await remote(remoteOpts);
console.info(driver);
}
sampleTest();Relevant log output
N/ACode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug 🐛good first picka reasonable task to start getting familiar with the code basea reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested