Skip to main content

I'm trying to select an option from a drop-down listdrop-down list, and I'm not able using the common methods of the Select classSelect class. 

I also tried the selectByVisibleName and selectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this drop-down list. I would thank any help on this.
enter image description here


[![enter image description here][1]][1]

Any ideas?

I'm trying to select an option from a drop-down list, and I'm not able using the common methods of the Select class. I also tried the selectByVisibleName and selectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this drop-down list. I would thank any help on this.


[![enter image description here][1]][1]

I'm trying to select an option from a drop-down list, and I'm not able using the common methods of the Select class. 

I also tried the selectByVisibleName and selectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this drop-down list.
enter image description here

Any ideas?

Bumped by Community user

Selenium web driverWebDriver Java: not able to select a value from a drop down-down list

I'm trying to select an option from a drop down-down list, and I'm not able using the common methods of the Select class. I also tried the selectByVisibleNameselectByVisibleName and selectByValueselectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this DDdrop-down list. I would thank any help on this.

enter image description here


[![enter image description here][1]][1]

Selenium web driver Java: not able to select a value from a drop down list

I'm trying to select an option from a drop down list, and I'm not able using the common methods of the Select class. I also tried the selectByVisibleName and selectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this DD list. I would thank any help on this.

enter image description here

Selenium WebDriver Java: not able to select a value from a drop-down list

I'm trying to select an option from a drop-down list, and I'm not able using the common methods of the Select class. I also tried the selectByVisibleName and selectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this drop-down list. I would thank any help on this.


[![enter image description here][1]][1]
Source Link

Selenium web driver Java: not able to select a value from a drop down list

I'm trying to select an option from a drop down list, and I'm not able using the common methods of the Select class. I also tried the selectByVisibleName and selectByValue and same result.

Select oSelect = new Select(driver.findElement(By.xpath("//*[@model='typeOfCover']")));
oSelect.selectByIndex(2);

Here is the piece of HTML of this DD list. I would thank any help on this.

enter image description here