Below is a method to check if the panel is displayed or not.
def verifyNav(section)
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
wait.until { @driver.find_element(:id => section + '-panel').displayed? == true }
end
I want to add code, which says that all other elements that have an id that ends in '-panel' should not be displayed.
I found that I can use the end_with method in which there is a find_elements method that returns a list of matching elements.
a = 'radio-panel'
a.end_with?('-panel')
returns true.. but if I try to call
@driver.find_elements(:id => end_with?('-panel'))
I get an error saying that end_with is an undefined method.
Any ideas on what I can do?