appium / appium/appium-flutter-driver

flutter element doesn't exist.Driver just keeps on looking for the object to infinity. Do we have any solution for this?

Open
#573 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

NeedInfo
Dominant language
TypeScript
Stars
539
Forks
195
Avg merge
1h 11m
Merged PRs (30d)
4

Description

I set the wait time ,but it does't working.
code :
flutterDriver = new AndroidDriver(new URL("http://127.0.0.1:4723/"), capabilities);
flutterDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
appiumDriver = new AndroidDriver(new URL("http://127.0.0.1:4723/"), appiumCapabilities);
FlutterFinder finder = new FlutterFinder(flutterDriver);
Thread.sleep(10000);
FlutterElement element = finder.byText("App 11");
String text = element.getText();

The text “App 11” not exist in page, the driver keeping find this element 10 minutes.and then I get the error :
org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7'
Driver info: io.appium.java_client.AppiumDriver
Command: [9c52e412-e35e-405a-b81e-599351976e53, clickElement {id=eyJ0ZXh0IjoiQXBwIOWPjemlizExIiwiZmluZGVyVHlwZSI6IkJ5VGV4dCJ9}]
Capabilities {appium:address: 127.0.0.1, appium:allowCors: false, appium:allowInsecure: [], appium:appActivity: com.ctrip.ibu.myctrip.main...., appium:appPackage: ctrip.english.debug, appium:automationName: Flutter, appium:basePath: , appium:callbackPort: 4723, appium:debugLogSpacing: false, appium:denyInsecure: [], appium:deviceName: Galaxy Note20 5G, appium:extraArgs: [], appium:fastReset: false, appium:fullReset: false, appium:keepAliveTimeout: 600, appium:localTimezone: false, appium:logFile: D:\appium2.log, appium:logNoColors: false, appium:logTimestamp: false, appium:loglevel: debug, appium:longStacktrace: false, appium:noPermsCheck: false, appium:noReset: true, appium:port: 4723, appium:relaxedSecurityEnabled: false, appium:sessionOverride: false, appium:skipUninstall: true, appium:strictCaps: false, appium:subcommand: server, appium:tmpDir: D:\Users\j_yuan\AppData\Loc..., appium:useDrivers: [], appium:usePlugins: [], platformName: ANDROID}
Element: [io.github.ashwith.flutter.FlutterElement@9f09019e -> unknown locator]
Session ID: 9c52e412-e35e-405a-b81e-599351976e53

the appium log is:
2023-09-19 06:34:32:805 [FlutterDriver@c847 (0f49e93a)] Cached the protocol value 'W3C' for the new session 0f49e93a-d5ea-4c85-a0ba-a03400fc0281
2023-09-19 06:34:32:806 [FlutterDriver@c847 (0f49e93a)] Responding to client with driver.createSession() result: {"capabilities":{"subcommand":"server","address":"127.0.0.1","logFile":"D:\appium2.log","port":4723,"extraArgs":[],"allowCors":false,"allowInsecure":[],"basePath":"","callbackPort":4723,"debugLogSpacing":false,"denyInsecure":[],"keepAliveTimeout":600,"localTimezone":false,"loglevel":"debug","logNoColors":false,"logTimestamp":false,"longStacktrace":false,"noPermsCheck":false,"relaxedSecurityEnabled":false,"sessionOverride":false,"strictCaps":false,"useDrivers":[],"usePlugins":[],"tmpDir":"D:\Users\j_yuan\AppData\Local\Temp","platformName":"ANDROID","appActivity":"com.ctrip.ibu.myctrip.main.module.home.IBUHomeActivity","appPackage":"ctrip.english.debug","automationName":"Flutter","deviceName":"Galaxy Note20 5G","noReset":true,"fullReset":false,"fastReset":false,"skipUninstall":true}}
2023-09-19 06:34:32:810 [HTTP] <-- POST /session 200 13730 ms - 859
2023-09-19 06:34:32:810 [HTTP]
2023-09-19 06:34:32:889 [HTTP] --> POST /session/0f49e93a-d5ea-4c85-a0ba-a03400fc0281/timeouts
2023-09-19 06:34:32:889 [HTTP] {"implicit":30000}
2023-09-19 06:34:32:890 [FlutterDriver@c847 (0f49e93a)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,30000,"0f49e93a-d5ea-4c85-a0ba-a03400fc0281"]
2023-09-19 06:34:32:891 [FlutterDriver] Executing Flutter driver command 'timeouts'
2023-09-19 06:34:32:892 [FlutterDriver@c847 (0f49e93a)] W3C timeout argument: {"implicit":30000}}
2023-09-19 06:34:32:892 [FlutterDriver@c847 (0f49e93a)] Set implicit wait to 30000ms
2023-09-19 06:34:32:894 [FlutterDriver@c847 (0f49e93a)] Responding to client with driver.timeouts() result: null
2023-09-19 06:34:32:895 [HTTP] <-- POST /session/0f49e93a-d5ea-4c85-a0ba-a03400fc0281/timeouts 200 6 ms - 14
2023-09-19 06:34:32:895 [HTTP]
2023-09-19 06:34:42:949 [HTTP] --> POST /session/0f49e93a-d5ea-4c85-a0ba-a03400fc0281/element/eyJ0ZXh0IjoiQXBwIOWPjemlizExIiwiZmluZGVyVHlwZSI6IkJ5VGV4dCJ9/click
2023-09-19 06:34:42:949 [HTTP] {"id":"eyJ0ZXh0IjoiQXBwIOWPjemlizExIiwiZmluZGVyVHlwZSI6IkJ5VGV4dCJ9"}
2023-09-19 06:34:42:952 [FlutterDriver@c847 (0f49e93a)] Calling AppiumDriver.click() with args: ["eyJ0ZXh0IjoiQXBwIOWPjemlizExIiwiZmluZGVyVHlwZSI6IkJ5VGV4dCJ9","0f49e93a-d5ea-4c85-a0ba-a03400fc0281"]
2023-09-19 06:34:42:953 [FlutterDriver] Executing Flutter driver command 'click'
2023-09-19 06:34:42:954 [FlutterDriver] >>> {"command":"tap","text":"App 11","finderType":"ByText"}
2023-09-19 06:44:19:234 [HTTP] <-- POST /session/9c52e412-e35e-405a-b81e-599351976e53/element/eyJ0ZXh0IjoiQXBwIOWPjemlizExIiwiZmluZGVyVHlwZSI6IkJ5VGV4dCJ9/click - - ms - -
2023-09-19 06:44:19:239 [HTTP]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Java reproduction in the issue and the Appium log around the 30,000 ms implicit-timeout request and the later FlutterDriver click command. Trace how a missing Flutter element is handled and verify that the observed behavior matches the configured timeout; done means the missing “App 11” lookup returns an error within the expected limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter, java
Domain
mobile, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.