am working in . I’m using java language.I am following page object design pattern. I want to a test . After entering a single character or multiple character autocomplete should display the name in the list. I want to this scenario

Here is my code..
pageobject

@FindBy(how=How.ID,using="category")
    WebElement category;
 public void setCategory(String cat){
        category.sendKeys(cat);

        selectOptionWithText(cat);
    }

steps

AppointmentPage appointmentPageobj= PageFactory.initElements(DriverManager.driver,AppointmentPage.class);
appointmentPageobj.setCategory(cat);

test

 AppointmentPage ex=log.Valid("9845612345","naveen","[email protected]","Demo","2017-03-03","Dr. Bijoy Balakrishnan");

Screenshot
enter image description here



Source link https://sqa.stackexchange.com/questions/25888/how-to-automate-a-autocomplete-search--box

LEAVE A REPLY

Please enter your comment!
Please enter your name here