How to verify the selected element in disable dropdown using selenium

Steps:

1. Navigate to the web Page.
2. Find disable dropdown by help of locators.
3. Then Use getFirstSelectedOption()
4. Then use getText() method.

Ex :

Select dropdown = new Select(driver.findElement(By.xpath" "));
WebElement dropdownOption = dropdown.getFirstSelectedOption();
String SelectedContent = dropdownOption.getText();
System.out.println("selected Value " + SelectedContent);

Copyright © 2017 qatoolsguide.blogspot.com || ALL RIGHTS RESERVED