Skip to main content
Tweeted twitter.com/#!/StackSQA/status/647392850909495297

Order in which options are returned by getOptions() in dropdownDropdown box(Select Class) in Selenium WebDriver?

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptionsgetOptions( ) method?
I want to have the elements in the order they appear in the dropdownDropdown. Does it happenhappens that way?

Order in which options are returned by getOptions() in dropdown box(Select Class) in Selenium WebDriver?

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptions method?
I want to have the elements in the order they appear in the dropdown. Does it happen that way?

Order in which options are returned by getOptions() in Dropdown box(Select Class) in Selenium WebDriver?

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptions( ) method?
I want to have the elements in the order they appear in the Dropdown. Does it happens that way?

improved formatting of embedded code: language syntax hint
Source Link

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();
 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptions method?
I want to have the elements in the order they appear in the dropdown. Does it happen that way?

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptions method?
I want to have the elements in the order they appear in the dropdown. Does it happen that way?

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptions method?
I want to have the elements in the order they appear in the dropdown. Does it happen that way?

Source Link
Neeraj Kumar
  • 143
  • 1
  • 2
  • 4

Order in which options are returned by getOptions() in dropdown box(Select Class) in Selenium WebDriver?

When we get options of a dropdown in Selenium Webdriver the following way

 Select dropdown = new Select(driver.findElement(By.id(dropDownId)));
 List<WebElement> options = dropdown.getOptions();

What is order of elements in the list returned by getOptions method?
I want to have the elements in the order they appear in the dropdown. Does it happen that way?