assertVisible randomly FAILED on displayed text
Is there an existing issue for this?
- [x] I have searched the existing issues and didn't find mine.
Steps to reproduce
On Android 15 on emulator, sometime a basic assertVisible failed like it doesn't find the text display on screen, when the text is actually displayed on screen (and clearly visible in the debug screenshot).
75% of the time the test runs correctly on this screen, and 25% of the time it fails, even though we're in exactly the same configuration.
Actual results
This is the test:
- assertVisible: helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !
Same result with:
- assertVisible: "helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !"
Same result with:
- assertVisible: '.*helios a besoin de recueillir quelques informations sur votre situation fiscale.*'
The log:
Assertion is false: "helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !" is visible
And this is the screenshot took bug maestro on failed:
Expected results
The test should always pass for this basic case.
About app
Flutter app.
About environment
Linux Manjaro, android 15.
Logs
22:22:58.246 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Assert that "helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !" is visible RUNNING
22:22:58.246 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Assert that "helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !" is visible metadata CommandMetadata(numberOfRuns=null, evaluatedCommand=MaestroCommand(assertConditionCommand=AssertConditionCommand(condition=Condition(platform=null, visible=ElementSelector(textRegex=helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), notVisible=null, scriptCondition=null, label=null), timeout=null, label=null, optional=false)), logMessages=[], insight=Insight(message=, level=NONE))
22:23:15.468 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
22:23:15.468 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
22:23:15.734 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Assert that "helios a besoin de recueillir quelques informations sur votre situation fiscale. Promis, c'est un jeu d'enfant !" is visible FAILED
Maestro version
1.39.11
How did you install Maestro?
install script (https://get.maestro.mobile.dev)
Anything else?
No response
Are you able to provide the hierarchy? You should find it in ~/.maestro/logs, or you can run maestro hierarchy when the test fails
Hi, any update on this?
No. We've never heard back from the original poster for debug info. Without more info, this would get closed on my next sweep through.
@poka-IT could you provide debug info? If you want people to fix your bug, you should probably provide them the information they need to do it.
I also noticed this kind of issue on an old version of maestro and just upgrading to latest version of maestro fixed it and it works much better now, so there's a good chance this is no longer an issue on latest maestro.