enter image description here

Hi, I am trying to select item from dropdown. but I am unable to select . Please suggest me which tag I will use for select dropdown element.


The drop-down list is a select node with this id: operator_type

new Select(driver.findElement(By.id("operator_type"))).selectByVisibleText("your desired type");

you should import: import org.openqa.selenium.support.ui.Select;

|improve this answer|||||

You can use this code this POM design pattern..

WebElement status_dropdown;

public void select_List(String status)

        Select statusdropdown=new Select(status_dropdown);

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.