I have looked through several sources but so far I have not found an answer to my specific issue. Hopefully someone here has an answer.
I am trying to convert functioning Selenium IDE scripts to Webdriver by exporting them using Ruby test/unit. I have a few tests that require the user to select from a dropdown list of 2-3 choices. It apears to execute the command and try to select the correct one from the list, but it ends up selecting the default choice, which is the first one on the list. Here is the code:
@driver.find_element(:id, "roleDdl").click
Selenium::WebDriver::Support::Select.new(@driver.find_element(:id, "roleDdl")).select_by(:text, "Seller")
@driver.find_element(:css, "option[value=\"seller\"]").click
@driver.find_element(:css, "input.bf-buttonpos").click
It looks for the "role dropdown list" then it selects the dropdown and looks for "Seller" and it is supposed to select seller from the list and continue on from there. It ends up selecting "Buyer" which is the default,,
Does anyone have an idea what I am missing in my code?