I want to select multiple options.
Then I want to verify it whether it is selected or not?
Here is my code:
require 'selenium-webdriver'
class Ques7
def test_multiple_select
driver = Selenium::WebDriver.for :firefox
driver.get(url)
driver.find_element(:xpath, './/*[@id="select_1"]').click
puts driver.find_element(:xpath, './/*[@id="select_1"]').selected?
driver.find_element(:xpath, './/*[@id="select_2"]').click
driver.find_element(:xpath, './/*[@id="select_4"]').click
puts driver.find_element(:xpath =>'.//*[@id="select_1"]',
:xpath => './/*[@id="select_2"]',:xpath => './/*[@id="select_4"]').selected?
end
end
obj = Ques7.new
obj.test_multiple_select