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

The waitUntilTypeExistsStep will not work #293

Open
SoftWyer opened this issue Jun 13, 2023 · 0 comments
Open

The waitUntilTypeExistsStep will not work #293

SoftWyer opened this issue Jun 13, 2023 · 0 comments

Comments

@SoftWyer
Copy link

SoftWyer commented Jun 13, 2023

In the waitUntilTypeExistsStep (here) the expectation is that a String parameter is converted into a Type. However, without reflection, this will not be possible and the code fails with an exception:

Exception: type 'String' is not a subtype of type 'Type'

The problem is caused by these lines where we tell the findBy method that the ofType argument is a FindType.type.

   context.world.appDriver.findBy(ofType, FindType.type),

This resolves to calling this method and the code will throw an exception.

Finder byType(Type type, {bool skipOffstage = true})

As possible solution, albeit a little clunky, could be to have a predefined Set of types that can be iterated over to match on the String via it's name. But then you have a fixed list of Types unless you could also pass new types in via the World object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant