Skip to content

Questing regarding ajax pull #79

@akrambek

Description

@akrambek

Hi there,

I am trying to create a block for bootsrap select2 element. Here is my code.

@Name("Select2")
public class Select2DropDownList extends HtmlElement {

    @FindBy(className = "select2-choice")
    Link selectLink;

    @FindBy(xpath = "//*[@id='select2-drop']/div/input")
    TextInput searchTextInput;

    @FindBy(xpath = "//*[@id='select2-drop']/ul")
    Ul selectResult;

    public void selectOptionThatContains(String value) {
        selectLink.click();
        searchTextInput.clear();
        searchTextInput.sendKeys(value);
        selectResult.selectOptionThatContains(value);
    }
}

The problem I am facing is that once searchTextInput.sendKeys(value) is being called it is taking sometime for result to appear. So how can I add wait after searchTextInput.sendKeys(value). Any example? Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions