Testing Flutter Applications/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „= Testing Flutter Applications = [https://docs.flutter.dev/ Flutter] is a framework to build UIs for multiple platforms. Through this approach the resulting a…“)
 
 
Zeile 8: Zeile 8:
== Web ==
== Web ==
Web applications can be tested with the [[Selenium WebDriver Plugin/en|Selenium WebDriver Plugin]]. There are a few things to note:
Web applications can be tested with the [[Selenium WebDriver Plugin/en|Selenium WebDriver Plugin]]. There are a few things to note:
* Flutter generates the element <code><flt-glass-pane></code> which contains the content. However, not as direct children, but as [[Selenium_WebDriver_Plugin/en#Shadow_Elements|shadow tree]].
* Flutter generates the element <code><flt-glass-pane></code> which contains the content. However, not as direct children, but inside a [[Selenium_WebDriver_Plugin/en#Shadow_Elements|shadow root]] (see [https://docs.flutter.dev/release/breaking-changes/platform-views-using-html-slots-web Using HTML slots to render platform views in the web]).
* Flutter has different [https://docs.flutter.dev/platform-integration/web/renderers web renderes] to display the content: HTML renderer and CanvasKit renderer. You have to use the HTML renderer to be able to see actual elements inside the shadow tree. With the CanvasKit there is only a <code><canvas></code> node that cannot be explored further by Selenium. Even the elements you get with the HTML renderer might not be as convenient as you would like them.
* Flutter has different [https://docs.flutter.dev/platform-integration/web/renderers web renderes] to display the content: HTML renderer and CanvasKit renderer. You have to use the HTML renderer to be able to see actual elements inside the shadow tree. With the CanvasKit there is only a <code><canvas></code> node that cannot be explored further by Selenium. Even the elements you get with the HTML renderer might not be as convenient as you would like them.



Aktuelle Version vom 29. August 2023, 15:52 Uhr

Testing Flutter Applications[Bearbeiten]

Flutter is a framework to build UIs for multiple platforms. Through this approach the resulting applications can differ from applications written directly for one platform specifically. This can make those applications harder to automate with expecco than native applications.

Android[Bearbeiten]

Android apps can be automated with the Mobile Testing Plugin. There are no known problems.

Web[Bearbeiten]

Web applications can be tested with the Selenium WebDriver Plugin. There are a few things to note:

  • Flutter generates the element <flt-glass-pane> which contains the content. However, not as direct children, but inside a shadow root (see Using HTML slots to render platform views in the web).
  • Flutter has different web renderes to display the content: HTML renderer and CanvasKit renderer. You have to use the HTML renderer to be able to see actual elements inside the shadow tree. With the CanvasKit there is only a <canvas> node that cannot be explored further by Selenium. Even the elements you get with the HTML renderer might not be as convenient as you would like them.
CanvasKit is the default renderer. To start the application from the commandline with HTML renderer use
flutter run --web-renderer html

Windows Automation[Bearbeiten]

Windows applications can be automated with Windows Automation. There are no known problems.



Copyright © 2014-2024 eXept Software AG