Skip to content
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

Cannot scroll up or down list and not find item by xpath in list on modal flutter #655

Open
apatheticL opened this issue Feb 2, 2024 · 1 comment

Comments

@apatheticL
Copy link

My problem is

  1. Case1: don't see view scroll when run command command flutter:scrollIntoView.
    I has modal contain list country and i want scroll up and select item into list country. but i try execute scrollView but it not work

this is my code

        element_end = self.finder.by_text('VietNam')
        self.driver.execute_script('flutter:scrollIntoView',  element_end, {'alignment': 0.5})
        element_button = FlutterElement(self.driver, element_end);
        element_button.click()

this is my view
image
this is my error in appium server
https://gist.github.com/apatheticL/b7411163509e960cdae255c81f8f44f2

  1. Case 2:

i try with code :

self.driver.switch_to.context('NATIVE_APP')
element_end = self.driver.find_element(AppiumBy.XPATH, '//android.view.View[@content-desc="VN VietNam +84"]')

but it not work and log error
['NoSuchElementError: An element could not be located on the page using the given search parameters.', ' at AndroidUiautomator2Driver.findElOrEls (C:\\Users\\tinhn\\.appium\\node_modules\\appium-flutter-driver\\node_modules\\appium-uiautomator2-driver\\node_modules\\appium-android-driver\\lib\\commands\\find.ts:87:11)', ' at runMicrotasks (<anonymous>)', ' at processTicksAndRejections (node:internal/process/task_queues:96:5)', ' at AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\\Users\\tinhn\\AppData\\Roaming\\nvm\\v16.20.0\\node_modules\\appium\\node_modules\\@appium\\base-driver\\lib\\basedriver\\commands\\find.ts:60:12)', ' at AndroidUiautomator2Driver.findElement (C:\\Users\\tinhn\\AppData\\Roaming\\nvm\\v16.20.0\\node_modules\\appium\\node_modules\\@appium\\base-driver\\lib\\basedriver\\commands\\find.ts:75:12)']

@okaruk
Copy link

okaruk commented Feb 5, 2024

@apatheticL flutter:scrollUntilVisible command scrolls up/down dropdown options list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants