I am creating practice tests on a demo site, however, I am having an issue with selecting a value from a drop down list, I am getting unable to locate element, however, it is the correct ID and I've tried by ID and CSS selector as well with no luck :( I will post HTML and Selenium code below:
HTML
<select id="dropdown_7" name="dropdown_7" class=" piereg_validate[required]"><option value="Afghanistan">Afghanistan</option>
Ruby Code:
drop_list = @@wait.until { drop = @@driver.find_element :id => '#dropdown_7' drop if drop.displayed? drop.click } options=drop_list.find_element :id => '#dropdown_7' options.each do |i| if i.text == 'American Samoa' i.click break end