Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

Commit 7334d4e

Browse files
author
igor.tavares
committed
fix: flutter element calls
1 parent b49b97d commit 7334d4e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

‎AppiumFlutterLibrary/keywords/_element.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_element_text(self, locator):
9797

9898
def _is_visible(self, element):
9999
application = self._current_application()
100-
application.execute_script('flutter:waitFor', element, 1)
100+
application.execute_script('flutter:waitFor', element.id, 1)
101101
return 1
102102

103103
def _find_element(self, locator):

‎AppiumFlutterLibrary/keywords/_screen.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ def scroll_to_element(self, locator):
1111
application = self._current_application()
1212
element = self._element_finder.find(application, locator)
1313
self._info(element)
14-
application.execute_script('flutter:scrollIntoView', element, 0)
14+
application.execute_script('flutter:scrollIntoView', element.id, 0)

‎AppiumFlutterLibrary/keywords/_waiting.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def wait_for_element(self, locator, timeout=20):
1919
timeout=None
2020
try:
2121
if timeout is None:
22-
application.execute_script('flutter:waitFor', element)
22+
application.execute_script('flutter:waitFor', element.id)
2323
else:
24-
application.execute_script('flutter:waitFor', element, timeout)
24+
application.execute_script('flutter:waitFor', element.id, timeout)
2525
except Exception:
2626
raise AssertionError("Could not find element '%s' in %s seconds" % (locator, timeout))
2727

@@ -37,9 +37,9 @@ def wait_for_element_absent(self, locator, timeout=20):
3737
timeout=None
3838
try:
3939
if timeout is None:
40-
application.execute_script('flutter:waitForAbsent', element)
40+
application.execute_script('flutter:waitForAbsent', element.id)
4141
else:
42-
application.execute_script('flutter:waitForAbsent', element, timeout)
42+
application.execute_script('flutter:waitForAbsent', element.id, timeout)
4343
except Exception:
4444
raise AssertionError("Element '%s' still not absent in %s seconds" % (locator, timeout))
4545

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /