My html code is :
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
I tried:
1. find(:xpath, "//span[@class='sr-only']").click
2. page.find('.sr-only',visible: false).click
but was not able to find element 'sr-only'. How to find it?
Exception I got is:
Selenium::WebDriver::Error::ElementNotVisibleError:
element not visible
Note Using chrome webdriver + selenium