appium / appium/appium-flutter-driver

how we can handle Flutter: wait for drop down list

Open
#804 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

public void selectRandomCustomerCategory() {
try {
// Step 1: Click the dropdown
FlutterElement categoryDropdown = flutterFinder
.byValueKey(TestKeys.customerCreateEditPageTestKeys.category);
categoryDropdown.click();
logger.info("Category dropdown clicked");

		// Step 2: Define possible categories
		String[] categories = { "Manager", "Founder" };

		// Step 3: Randomly choose one
		String chosen = categories[new Random().nextInt(categories.length)];
		String key = "customer_create_edit_page_category_" + capitalize(chosen);

		logger.info("Randomly selecting category: {}", key);

		// Step 4: Click the selected category directly
		FlutterElement selectedElement = flutterFinder.byValueKey(key);
		selectedElement.click();

		logger.info("Category selected: {}", key);

	} catch (Exception e) {
		logger.error("Failed to select random customer category", e);
	}
}

FlutterDriver@3815] Calling AppiumDriver.click() with args: ["eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6ImN1c3RvbWVyX2NyZWF0ZV9lZGl0X3BhZ2VfY2F0ZWdvcnkiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9","750ce59e-69ba-4af9-b1f6-3191b0867355"]
[750ce59e][FlutterDriver] Executing Flutter driver command 'click'
[750ce59e][FlutterDriver@3815] >>> {"command":"tap","keyValueType":"String","keyValueString":"customer_create_edit_page_category","finderType":"ByValueKey"}
[750ce59e][FlutterDriver@3815] <<< {"isError":false,"response":{},"type":"_extensionType","method":"ext.flutter.driver"} | previous command tap
[750ce59e][FlutterDriver@3815] Responding to client with driver.click() result: {}
[750ce59e][HTTP] <-- POST /session/750ce59e-69ba-4af9-b1f6-3191b0867355/element/eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6ImN1c3RvbWVyX2NyZWF0ZV9lZGl0X3BhZ2VfY2F0ZWdvcnkiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9/click 200 59 ms - 12 
16:41:05.976 [main] INFO Base.Helper - Category dropdown clicked
16:41:05.976 [main] INFO Base.Helper - Randomly selecting category: customer_create_edit_page_category_Founder
[750ce59e][HTTP] --> POST /session/750ce59e-69ba-4af9-b1f6-3191b0867355/element/eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6ImN1c3RvbWVyX2NyZWF0ZV9lZGl0X3BhZ2VfY2F0ZWdvcnlfRm91bmRlciIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0%3D/click {"id":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6ImN1c3RvbWVyX2NyZWF0ZV9lZGl0X3BhZ2VfY2F0ZWdvcnlfRm91bmRlciIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0="}
[750ce59e][FlutterDriver@3815] Calling AppiumDriver.click() with args: ["eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6ImN1c3RvbWVyX2NyZWF0ZV9lZGl0X3BhZ2VfY2F0ZWdvcnlfRm91bmRlciIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0=","750ce59e-69ba-4af9-b1f6-3191b0867355"]
[750ce59e][FlutterDriver] Executing Flutter driver command 'click'
[750ce59e][FlutterDriver@3815] >>> {"command":"tap","keyValueType":"String","keyValueString":"customer_create_edit_page_category_Founder","finderType":"ByValueKey"}
[8fe4b3d3][HTTP] --> GET /session/8fe4b3d3-a696-43d2-a129-e2d7060bd9a0/timeouts {}

Just the element is staying on, waiting for a long time. How can we use the drop-down selection in Flutter

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 selectRandomCustomerCategory() entry point and the FlutterDriver click calls shown in the log, especially the second click on customer_create_edit_page_category_Founder. Reproduce the dropdown interaction and determine why the selected element remains waiting; done means a category selection completes without the element hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter, java
Domain
mobile, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.