Skip to content

Commit 7ce1a27

Browse files
fix: Get text button (#25)
* fix: get text for button * bump version
1 parent 4b6a901 commit 7ce1a27

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

server/lib/src/runner.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:package_info_plus/package_info_plus.dart';
1010
const MAX_TEST_DURATION_SECS = 24 * 60 * 60;
1111
// Need a better way to fetch this for automated release, this needs to be updated along with version bump
1212
// Can stay for now as it is not a breaking change
13-
const serverVersion = '0.0.23';
13+
const serverVersion = '0.0.24';
1414

1515
void initializeTest({Widget? app, Function? callback}) async {
1616
IntegrationTestWidgetsFlutterBinding binding =

server/lib/src/utils/element_helper.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ class ElementHelper {
163163
}
164164

165165
static Future<String> getText(FlutterElement element) async {
166-
String getElementTextRecursively(Element element, {Set<Element>? visited}) {
167-
visited ??= <Element>{};
166+
String getElementTextRecursively(dynamic element, {Set<dynamic>? visited}) {
167+
visited ??= <dynamic>{};
168168

169169
if (visited.contains(element)) {
170170
return '';
@@ -185,6 +185,8 @@ class ElementHelper {
185185
buffer.write(widget.controller.text);
186186
} else if (widget is TextField) {
187187
buffer.write(widget.controller?.value.text);
188+
} else if (widget is ButtonStyleButton) {
189+
buffer.write(getElementTextRecursively(widget.child, visited: visited));
188190
}
189191

190192
if (element is RenderObjectElement) {

server/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: appium_flutter_server
22
description: "Appium Flutter server using Integration Test package for testing Flutter apps with Appium"
3-
version: 0.0.23
3+
version: 0.0.24
44
homepage: "https://github.com/AppiumTestDistribution/appium-flutter-server"
55

66
environment:

0 commit comments

Comments
 (0)