-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update activity constants for launching Chrome #913
base: master
Are you sure you want to change the base?
Conversation
|
@@ -15,31 +15,31 @@ import {toDetailsCacheKey, getWebviewDetails, WEBVIEWS_DETAILS_CACHE} from './ca | |||
export const CHROME_BROWSER_PACKAGE_ACTIVITY = /** @type {const} */ ({ | |||
chrome: { | |||
pkg: 'com.android.chrome', | |||
activity: 'com.google.android.apps.chrome.Main', | |||
activity: 'com.google.android.apps.chrome.IntentDispatcher', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if it is a good idea to change records. Perhaps, it makes sense to just add new ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it also makes sense to autodetect the activity for the given package name using cmd package resolve-activity --brief <pkg_name>
(only works on Android 7+)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mykola-mokhnach How do we add new ones (what would the config look like?), and what advantage do we gain from keeping the old ones, assuming that the article https://automationchronicles.com/error-when-opening-chrome-on-android-13-via-adb/ is correct in its assertion that
... no one noticed it because Android was not strict about the filters until now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just try if appium/appium-uiautomator2-driver#730 works for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Sure, we will try it. Do you know which release this change will be in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to wait for a release. You can simply checkout my branch locally and then install the driver from the local filesystem using --source=local
CLI argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
appium/appium#17492 is a relevant conversation we had before. The method where uses this const in uia2 just sets the appPackage info as a return value ([update], noticed this was for known packages. https://github.com/appium/appium-android-driver/blob/acaf50709b96e95e05f7b5d0851893407718dea1/lib/commands/context/exports.js#L344C10-L344C31 unknown appPackage referred to the appActivity) so maybe this change is not necessary as Appium's usage, but perhaps it makes sense to use the resolve-activity (personally, but not sure) to show what current active activity is as the response. (?) Btw, in the past, a new session with below caps succeeded in launching chrome process for Android 13 (if my memory was correct as appium/appium#17492 (comment) ) as well. It could depend on chrome/chromedriver version as well, but perpahs all activity do not need to be
|
Based on the findings presented in this article: https://automationchronicles.com/error-when-opening-chrome-on-android-13-via-adb/