appium-adb
Advanced tools
Comparing version 2.0.0-beta1 to 2.0.0-beta2
@@ -469,2 +469,17 @@ import log from '../logger.js'; | ||
methods.getDeviceProperty = async function (property) { | ||
let stdout = await this.shell(`getprop ${property}`); | ||
let val = stdout.trim(); | ||
log.debug(`Current device property '${property}': ${val}`); | ||
return val; | ||
}; | ||
methods.getDeviceLanguage = async function () { | ||
return this.getDeviceProperty("persist.sys.language"); | ||
}; | ||
methods.getDeviceCountry = async function () { | ||
return this.getDeviceProperty("persist.sys.country"); | ||
}; | ||
export default methods; |
{ | ||
"name": "appium-adb", | ||
"version": "2.0.0-beta1", | ||
"version": "2.0.0-beta2", | ||
"description": "appium-adb", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
@@ -68,2 +68,6 @@ import chai from 'chai'; | ||
}); | ||
it('should get device language and country', async () => { | ||
await adb.getDeviceLanguage().should.eventually.equal('en'); | ||
await adb.getDeviceCountry().should.eventually.equal('us'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21614167
60
3022