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

await().until(FluentList).displayed() does not work #541

Closed
gkiszczak opened this issue Sep 29, 2017 · 1 comment
Closed

await().until(FluentList).displayed() does not work #541

gkiszczak opened this issue Sep 29, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@gkiszczak
Copy link
Contributor

gkiszczak commented Sep 29, 2017

Probably it wont work for other conditions.

...
@FindBy(css = "[data-test='custom']")
private FluentList<CustomFluentWebElement> elements;

public void customMethod() {
       await().until($("[data-test='custom']")).displayed(); 
       await().until(elements).displayed(); 
       ...
}```

both ways does not work.
@filipcynarski
Copy link
Member

@gkiszczak I did a few PoCs and was considering few options of dealing w/ the issue reported by you.

Finally I've decided to add integration tests and update documentation because I cannot be sure that everyone wants to wait for the first item of the list to be present. In terms of dynamic pages there is no one definition what mean the list was displayed or present.

I'm living it to test developers and let you to use Supplier to make your tests working so instead of example which you provided you need:

...
@FindBy(css = "[data-test='custom']")
private FluentList<CustomFluentWebElement> elements;

public void customMethod() {
      await().until(() -> $("[data-test='custom']").first().displayed()); 
      await().until(() -> elements.first().displayed()); 
      ...
}

If you are checking first element to be present you can use get(index) if you are waiting for another one.

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

No branches or pull requests

2 participants