Facing issue with Select Functionality of Selenium WebDriver

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Facing issue with Select Functionality of Selenium WebDriver

kusum
During the automation flow, my scripts correctly identify the Dropdown object and selects based on the value passed but as soon as it moves to next dropdown element previously selected value gets disappeared.

I am not sure why its happening for a single dropdown, rest all the dropdowns are working fine.. any leads?

My Code

public NewV1ProjectPage selectResponsiblePerson(String responsiblePersonValue){
    WebElement responsiblePerson = (new WebDriverWait(driver, 10))
              .until(ExpectedConditions.presenceOfElementLocated(By.name("responsible_person_sap_id")));
    new Select(responsiblePerson).selectByVisibleText(responsiblePersonValue);
    return this;
}