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

Not working should/waitUntil methods called more then two times #51

Open
artsok opened this issue Feb 18, 2019 · 1 comment
Open

Not working should/waitUntil methods called more then two times #51

artsok opened this issue Feb 18, 2019 · 1 comment

Comments

@artsok
Copy link
Collaborator

artsok commented Feb 18, 2019

При вызове более двух раз методов waitUntil или should возвращается WebElement, что не позволяет сделать цепочку вызовов проверок.

Работает:

onSite().onMainPage().header().searchInput().waitUntil(displayed(), 5).should(TextMatcher.text(""));

при условии:

public interface Header extends Button, Input, Checkbox, AtlasWebElement {
    @FindBy(".//input[contains(@class,'header-search-input')]")
    AtlasWebElement<AtlasWebElement> searchInput();
}

Так не работает:

onSite().onMainPage().header().searchInput().waitUntil(displayed(), 5).should(TextMatcher.text("")).should(TextMatcher.text(""));

Второй вызов should(...)/waitUntil возвращает WebElement.

@yelenska
Copy link

Мне кажется, это решается через передачу типа в AtlasWebElement
public interface Header extends AtlasWebElement <Header>

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

2 participants