For Android the Firefox version information has to be retrieved from the application on the device and not from the local machine
Categories
(Testing :: geckodriver, defect, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Depends on 1 open bug)
Details
When geckodriver is used for tests on Android (androidPackage
capability is set) and a binary is passed into the moz:firefoxOptions
capability, geckodriver tries to get the version information from the local system:
{"capabilities": {"alwaysMatch": {"moz:firefoxOptions": {"args": ["--profile", "/tmp/tmpgihc9oba.mozrunner"], "binary": "/tmp", "androidPackage": "org.mozilla.geckoview.test_runner"}, "webSocketUrl": true}}}
[task 2022-01-19T20:04:39.140Z] 20:04:39 INFO - PID 2956 | 1642622679134 geckodriver::capabilities DEBUG Trying to read firefox version from ini files
[task 2022-01-19T20:04:39.145Z] 20:04:39 INFO - PID 2956 | 1642622679134 geckodriver::capabilities DEBUG Trying to read firefox version from binary
[task 2022-01-19T20:04:39.150Z] 20:04:39 INFO - PID 2956 | 1642622679135 geckodriver::capabilities DEBUG Failed to get binary version
Instead if possible the version needs to be checked via adb on the device.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
Agi, do you know if there is a way to retrieve the Gecko (platform) version from an installed GeckoView application (Firefox, Focus, test_runner etc)? I cannot see anything useful with the dumpsys package
command.
Thanks!
Comment 2•3 years ago
|
||
This is the output of dumpsys org.mozilla.fenix
(aka Firefox Nightly) for me:
adb shell dumpsys package org.mozilla.fenix | grep -i version
versionCode=2015859339 minSdk=21 targetSdk=30
minExtensionVersions=[]
versionName=98.0a1
apkSigningVersion=2
privateFlags=[ PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION ALLOW_AUDIO_PLAYBACK_CAPTURE HAS_DOMAIN_URLS PARTIALLY_DIRECT_BOOT_AWARE PRIVATE_FLAG_ALLOW_NATIVE_HEAP_POINTER_TAGGING ]
signatures=PackageSignatures{f6b85ae version:2, signatures:[ea927945], past signatures:[]}
in particular, versionCode=2015859339
and versionName=98.0a1
seem to have what you need. I don't think you can derive the exact Gecko version if that's what you want.
Reporter | ||
Comment 3•3 years ago
|
||
Ok, so this works with Fenix but with the testrunner (and geckoview_example) I get:
versionCode=1 minSdk=21 targetSdk=31
versionName=1.0
Note that the testrunner is used most of the time for internal tests in CI. Could we make it so that both the testrunner and geckoview_example also report the correct version number? And yes versionName
would totally be enough for us to decide the feature set of a given Gecko platform version.
Comment 4•3 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #3)
Ok, so this works with Fenix but with the testrunner (and geckoview_example) I get:
versionCode=1 minSdk=21 targetSdk=31 versionName=1.0
Note that the testrunner is used most of the time for internal tests in CI. Could we make it so that both the testrunner and geckoview_example also report the correct version number? And yes
versionName
would totally be enough for us to decide the feature set of a given Gecko platform version.
sure, opened Bug 1751941 for that.
Reporter | ||
Comment 5•3 years ago
|
||
Given the required refactoring of geckodriver on bug 1751369 we should flip the dependencies. Once done we can implement the parsing of the version information.
Description
•