Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertVisible randomly FAILED on displayed text #2298

Open
1 task done
poka-IT opened this issue Feb 11, 2025 · 2 comments
Open
1 task done

assertVisible randomly FAILED on displayed text #2298

poka-IT opened this issue Feb 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@poka-IT
Copy link

poka-IT commented Feb 11, 2025

Is there an existing issue for this?

  • 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

Copy link

linear bot commented Feb 11, 2025

@Fishbowler
Copy link
Contributor

Are you able to provide the hierarchy? You should find it in ~/.maestro/logs, or you can run maestro hierarchy when the test fails

@Fishbowler Fishbowler added the bug Something isn't working label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants